Wintermute0110 / plugin.program.AEL.dev

Emulator frontend and app launcher for Kodi
GNU General Public License v2.0
105 stars 36 forks source link

[Feature Request] Disable Kodi Controller input during launch #151

Open zach-morris opened 2 years ago

zach-morris commented 2 years ago

Also posted in the forums, but figured I'd open an issue too: I'd like to request an advanced option for Disabling controllers when launching / then re-enabling them after the launched game is closed, similar to the option to disable Audio thats already present.

Reason: For some reason, several windows games I play do NOT disable kodi input in the background (I think it depends on if the game is displayed windowed or not). I was playing Firewatch, and I could hear movie audio starting and stopping. Took me a while to figure out that my game inputs were being also input into Kodi in the background and causing all kinds of mayhem. Also happens on a few other games I have (Windows 10 PC playing mainly GOG games).

Note that I already do this in my addon, and it works just fine. You can disable Kodi controller input with:

xbmc.executeJSONRPC('{"jsonrpc":"2.0","method":"Settings.SetSettingValue","params":{"setting":"input.enablejoystick","value":false},"id":"1"}')

And then re-enable it after return to kodi with:

xbmc.executeJSONRPC('{"jsonrpc":"2.0","method":"Settings.SetSettingValue","params":{"setting":"input.enablejoystick","value":true},"id":"1"}')
Wintermute0110 commented 2 years ago

Thanks for posting this Zack. I will implement ASAP.