Replies: 1 comment
-
... I asked copilot ant it says ... Calling PollInputEvents() twice before checking for a key press will reset the input states twice, potentially missing any key press events between calls. The key press check should occur between these calls to capture any events accurately. So, I think it is not trivial to do what I'm trying ... except if there is a possibility to accumulate events (instead of reset them) each time PollInputEvents() is called (a function AddPollInputEvents())... but I don't know if that is possible neither if it has another effects! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello. I'm doing a wrapper for raylib and I have problems with polling input events ... this is my code (a chunk):
but sometimes it fails detecting pulsation of space key and sometimes it also fails detecting the close event. I'm not sure what's the problem ¿calling several times PollInputEvents()?
Cases tested:
1.- Execute and press several times the same key --> result: "randomly" writes the key pressed or not
2.- Execute and press X window (close) --> result: close the window at second X press or at first X press (again randomly)
3.- Execute and mix keys and X press --> result: random behavior
I'll appreciate your help resolving this issue !!!
I need to call PollInputEvents() in each one of my functions because I want to hide that function to the user of my lib.
Finally, I have several questions about PollInputEvents:
1.- ¿does it have several queues for different event types?
2.- ¿does it have only one queue? Then ...
2.1.- if I press X for closing window and I call GetKeyPressed() ¿it returns 0?
2.2.- If I press a key, and then X for closing window ¿if I call WindowShouldClose() does it return true or false?
¿Any idea?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions