-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ruffle: Keyboard inputs unresponsive #443
Comments
I was about to make the exact same issue! |
Keyboard inputs work fine for me :/ I guess mouse inputs work fine if you can get ingame?
|
Here is me pressing and then releasing it. Some of the lines are missing? [libTAS f:5643] Thread 18268 (main) Generate XEvent KeyPress with keycode 116 |
I'm getting exactly the same console output as slamotas is getting:
|
The console does seem to print every time the down arrow key is being pressed, even though the game doesn't register the key press. I'm thinking the dropped inputs may only be happening when the game is laggy, which mine definitely is. The top of the window reports it's 30 FPS, but I think that's wrong as it has a lot of small lag spikes. |
In this video you can see me mashing the up/down/left/right arrow keys like a madman and how the game rarely registers any of those key presses: |
There's one thing I'm concerned in the video: there's no updated mouse coordinates in the OSD. Can you confirm that mouse inputs always show 0,0 ? |
@clementgallet I'll try to reproduce it with the latest version of libTAS + Ruffle + OpenGL once I get home. |
@clementgallet This video showcases two things on the latest version of everything:
foo.mp4 |
I looked into this (because I was trying to TAS another rust-based game engine) and found the reason for the unresponsive input events.
The code is basically // XFilterEvent tells us when an event has been discarded by the input method.
// Specifically, this involves all of the KeyPress events in compose/pre-edit sequences,
// along with an extra copy of the KeyRelease events. This also prevents backspace and
// arrow keys from being detected twice.
if(XFilterEvent(event, window)) {
// drop event
} where Why |
I can confirm that c15b9c8 fixes the issue for me |
I can confirm that the game in question works for me now, thank you @clementgallet! 👍 |
Ruffle version: nightly-2021-10-26
libTAS version: 1.4.2 interim c83a69f
Tested with this SWF: https://dagobah.net/flash/the_worlds_hardest_game.swf
Command-line options are
-g gl /path/to/dagobah_the_worlds_hardest_game.swf
. Time tracking withclock_gettime()
is required.Get into the first level and try to move around with the arrow keys (you are the red square). You usually don't move around, but sometimes the player will start moving in a direction and continue to move without any inputs. The game works properly outside of libTAS.
The text was updated successfully, but these errors were encountered: