oomek / attractplus

Attract-Mode Plus
GNU General Public License v3.0
41 stars 14 forks source link

AM retains focus if keys pressed during game launch #61

Open Chadnaut opened 7 months ago

Chadnaut commented 7 months ago

Steps to reproduce (for Mame):

  1. Launch game
  2. Immediately spam (press+release) "right-arrow" (could be any key/keys)
  3. AM retains focus instead of Mame (usually 1 in 5 attempts hits the issue)

Occurs in window & full-screen modes (AM+ 3.0.7, Win10 Pro) In window mode, AM shows a black screen but retains focus (blue border), while Mame loads with an orange flashing taskbar item (ie: wants attention). Mame must be re-focused to continue (alt+tab / mouse-click).

Emulator Option: Non-Blocking Mode Wait = 2 seconds Same steps to reproduce. However after the wait time AM now thinks it's back in control and will display the layout, with un-focused Mame still running in the background. Launching again will create another instance of Mame.

There's likely a dozen different scripts to ensure apps remain focused, but it would be super-nice if this worked out-of-the-box. Kids push buttons, and guests practice fireballs!

oomek commented 6 months ago

Thanks for your reports. I'll look into all your opened issues once I'm done with Async Loader branch.