mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-04-05 07:16:05 +00:00
Allow gamepad input when the app doesn't have focus. Fixes #23
This commit is contained in:
@@ -23,6 +23,9 @@ const int SdlInputHandler::k_ButtonMap[] = {
|
||||
SdlInputHandler::SdlInputHandler(bool multiController)
|
||||
: m_MultiController(multiController)
|
||||
{
|
||||
// Allow gamepad input when the app doesn't have focus
|
||||
SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, "1");
|
||||
|
||||
// We need to reinit this each time, since you only get
|
||||
// an initial set of gamepad arrival events once per init.
|
||||
SDL_assert(!SDL_WasInit(SDL_INIT_GAMECONTROLLER));
|
||||
|
||||
Reference in New Issue
Block a user