allow playing game with joystick without the window focused

This commit is contained in:
lif 2018-12-23 13:48:11 -08:00 committed by lifning
parent 2009fa845b
commit c920120f71
2 changed files with 6 additions and 0 deletions

View File

@ -2282,6 +2282,10 @@ INT32 I_StartupSystem(void)
SDLcompiled.major, SDLcompiled.minor, SDLcompiled.patch);
I_OutputMsg("Linked with SDL version: %d.%d.%d\n",
SDLlinked.major, SDLlinked.minor, SDLlinked.patch);
// Lif: HACKED
SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS,"1");
if (SDL_Init(0) < 0)
I_Error("SRB2: SDL System Error: %s", SDL_GetError()); //Alam: Oh no....
#ifndef NOMUMBLE

View File

@ -572,6 +572,8 @@ static INT32 SDLJoyAxis(const Sint16 axis, evtype_t which)
static void Impl_HandleWindowEvent(SDL_WindowEvent evt)
{
// Lif: HACKED
return;
static SDL_bool firsttimeonmouse = SDL_TRUE;
static SDL_bool mousefocus = SDL_TRUE;
static SDL_bool kbfocus = SDL_TRUE;