Skip to content

Commit

Permalink
Fix controllers not updating in menus/console after starting a game.
Browse files Browse the repository at this point in the history
  • Loading branch information
DreamyCecil committed Sep 9, 2024
1 parent 35b096d commit d69b6f9
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions Sources/Engine/Base/Input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -519,11 +519,8 @@ void CInput::EnableInput(OS::Window hwnd)
if( inp_bInputEnabled) return;

#if SE1_PREFER_SDL
// [Cecil] SDL: Enable joysticks and hide mouse cursor
SDL_JoystickEventState(SDL_ENABLE);
// [Cecil] SDL: Hide mouse cursor and clear relative movement since last time
SDL_SetRelativeMouseMode(SDL_TRUE);

// Clear relative movement since last time
SDL_GetRelativeMouseState(NULL, NULL);

#else
Expand Down Expand Up @@ -617,8 +614,7 @@ void CInput::DisableInput( void)
if( !inp_bInputEnabled) return;

#if SE1_PREFER_SDL
// [Cecil] SDL: Disable joysticks and show mouse cursor
SDL_JoystickEventState(SDL_DISABLE);
// [Cecil] SDL: Show mouse cursor
SDL_SetRelativeMouseMode(SDL_FALSE);

#else
Expand Down

0 comments on commit d69b6f9

Please sign in to comment.