Don't deinit SDL before calling an SDL function
Also, it's possible for SDL to initialise without 'joystick' being set to a non-NULL value.
This commit is contained in:
parent
b81023f63c
commit
deadc396bc
1 changed files with 2 additions and 1 deletions
|
@ -18,10 +18,11 @@ void ReleaseDirectInput(void)
|
|||
// Close opened joystick (if exists)
|
||||
if (joystick != NULL)
|
||||
{
|
||||
SDL_QuitSubSystem(SDL_INIT_JOYSTICK);
|
||||
SDL_JoystickClose(joystick);
|
||||
joystick = NULL;
|
||||
}
|
||||
|
||||
SDL_QuitSubSystem(SDL_INIT_JOYSTICK);
|
||||
}
|
||||
|
||||
BOOL HookAllDirectInputDevices(void);
|
||||
|
|
Loading…
Add table
Reference in a new issue