forked from Mirrors/openclonk
Fix gamepads only working after game start
This affected all platforms other than SDL.liquid_container
parent
8811356141
commit
e52bf6962b
|
@ -677,6 +677,7 @@ void C4Application::GameTick()
|
||||||
case C4AS_Startup:
|
case C4AS_Startup:
|
||||||
SoundSystem.Execute();
|
SoundSystem.Execute();
|
||||||
MusicSystem.Execute();
|
MusicSystem.Execute();
|
||||||
|
if (pGamePadControl) pGamePadControl->Execute();
|
||||||
// wait for the user to start a game
|
// wait for the user to start a game
|
||||||
break;
|
break;
|
||||||
case C4AS_StartGame:
|
case C4AS_StartGame:
|
||||||
|
@ -697,6 +698,10 @@ void C4Application::GameTick()
|
||||||
Application.SetVideoMode(GetConfigWidth(), GetConfigHeight(), Config.Graphics.RefreshRate, Config.Graphics.Monitor, true);
|
Application.SetVideoMode(GetConfigWidth(), GetConfigHeight(), Config.Graphics.RefreshRate, Config.Graphics.Monitor, true);
|
||||||
if (!isEditor)
|
if (!isEditor)
|
||||||
pWindow->GrabMouse(true);
|
pWindow->GrabMouse(true);
|
||||||
|
// Gamepad events have to be polled here so that the controller
|
||||||
|
// connection state is always up-to-date before players are
|
||||||
|
// joining.
|
||||||
|
if (pGamePadControl) pGamePadControl->Execute();
|
||||||
break;
|
break;
|
||||||
case C4AS_AfterGame:
|
case C4AS_AfterGame:
|
||||||
// stop game
|
// stop game
|
||||||
|
|
Loading…
Reference in New Issue