npwoods / bletchmame

Other
27 stars 5 forks source link

Input seems to stop after toggling options and settings menu and F11 #295

Closed randomuser4444 closed 2 years ago

randomuser4444 commented 2 years ago

Input seems to stop after toggling options and settings menu. UPDATE**: I just noticed F11 does this too.

npwoods commented 2 years ago

I think I may have a fix for this. I don't want to unilaterally declare victory yet... try it out!

randomuser4444 commented 2 years ago

It's I just tested with 2.12.0.20 and it's improved, but still happens when you toggle fullscreen or run aroiund the menus, but if you show the about dialoge and close it seems to fix inputs again.

randomuser4444 commented 2 years ago

Cool, I just got the latest version and spammed the emulater and the UI and it didn't loose imputs. Closing now.

randomuser4444 commented 2 years ago

Just one thing, if you bring up the debugger it seems to loose input then, not sure if this is a quick fix or a pain, but thought I would let you know.

davide125 commented 2 years ago

I can repro a variant of this issue on Linux with 2.13. When starting any game, input isn't working. If I toggle full screen with F11, then input starts working normally.

npwoods commented 2 years ago

My fix to this issue was very Windows-specific; it involved a Win32 CBT hook: https://docs.microsoft.com/en-us/previous-versions/windows/desktop/legacy/ms644977(v=vs.85)

The Windows issue was that Qt simply did not go through great lengths to ensure that the "Qt focus" and the "Win32 focus" were in sync. It is very possible that a similar issue is at play in the X11 world but you're on your own.