- Defer SDL subsystem initialization since it seems to cause conflicts with GUI toolkits on some systems.
This commit is contained in:
parent
dc6b45804d
commit
8e1b1aa201
4 changed files with 23 additions and 6 deletions
|
|
@ -1,4 +1,4 @@
|
|||
#include <SDL_joystick.h>
|
||||
#include <SDL.h>
|
||||
|
||||
#include "doomdef.h"
|
||||
#include "templates.h"
|
||||
|
|
@ -266,11 +266,16 @@ static SDLInputJoystickManager *JoystickManager;
|
|||
|
||||
void I_StartupJoysticks()
|
||||
{
|
||||
JoystickManager = new SDLInputJoystickManager();
|
||||
if(SDL_InitSubSystem(SDL_INIT_JOYSTICK) >= 0)
|
||||
JoystickManager = new SDLInputJoystickManager();
|
||||
}
|
||||
void I_ShutdownJoysticks()
|
||||
{
|
||||
delete JoystickManager;
|
||||
if(JoystickManager)
|
||||
{
|
||||
delete JoystickManager;
|
||||
SDL_QuitSubSystem(SDL_INIT_JOYSTICK);
|
||||
}
|
||||
}
|
||||
|
||||
void I_GetJoysticks(TArray<IJoystickConfig *> &sticks)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue