mgba-emu / mgba

mGBA Game Boy Advance Emulator
https://mgba.io/
Mozilla Public License 2.0
5.67k stars 780 forks source link

Shortcuts mapped to controller don't work unless window is active/focused #3005

Open Zeturic opened 1 year ago

Zeturic commented 1 year ago

I suspect this might be at least somewhat intentional, but I keep getting frustrated by it.

I have toggle fast forward mapped to clicking in the right stick on my controller, and use it all the time because it's so convenient.

But if mGBA isn't the currently active window, mapped shortcuts don't work. I think this definitely makes sense for keyboard shortcuts, because you wouldn't want to be triggering them while typing in another window, but I think that if it's mapped to a controller, they should still activate.

endrift commented 1 year ago

The problem is when you have multiple game windows open and using the same controller for all of them. Which one should it trigger? All of them? Probably not. Perhaps the most recently active one? That might be a little confusing, but probably the most consistent behavior.

wnlhdx commented 3 months ago

I think that was necessary.When I want to play multiplayer game like zelda four swords,I have to use Remote desktop and open muiltiple game windows.If I can only play active game,I can never play this game until you have network connect feature.

Liggliluff commented 1 month ago

@endrift "Which one should it trigger? All of them? Probably not." I came here specifically for this exact thing. I have multiple windows open and I do want all of them to trigger with the shortcut. I have set up a shortcut to pause the emulation, and I want them all to trigger all at the same time.

Best method here is to let the user choose.

- only trigger shortcuts on the active window - trigger shortcuts on the last active window - trigger shortcuts on all windows

Best to have separate settings for keyboard and controller.