-
-
Notifications
You must be signed in to change notification settings - Fork 312
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apparently in some configurations, holding a key on the keyboard makes Wx stop processing Idle events, so the emulator does not run until the key is released, freezing the game and ignoring the key. Hopefully fix this by calling wxWakeUpIdle() from OnKeyDown() and OnKeyUp(). Other Misc. Improvements: - refactor process_key_press() to only return true if the system is in a pressed key state on key presses or a game key was released on releases and always true on double releases. - call ev.StopPropagation() from OnKey* events for game keys, this may not actually do anything, but just in case. - remove static OnKeyUp and OnKeyDown events from GameArea, these are connected to the DrawingPanel dynamically now. - remove the dynamic_cast<>s from PaintEv/EraseBackground/OnSize event forwarders, since there is already a panel member to use. TODO: The state returned by process_key_press() is still not entirely correct, if a joystick button is pressed, it will return true for a non-game keyboard press, and it needs to return the correct state for double releases.
- Loading branch information
Showing
1 changed file
with
41 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters