RetroFE crashed on exit when a controller was connected. This is caused by

the call to SDL_JoystickClose. It is unclear why this happens, so for now
this code is disabled.
This commit is contained in:
Pieter Hulshoff 2017-01-06 14:53:41 +01:00
parent 17d65ae8fd
commit 961a3a838d

View File

@ -37,13 +37,14 @@ UserInput::UserInput(Configuration &c)
UserInput::~UserInput() UserInput::~UserInput()
{ {
for(std::vector<SDL_Joystick *>::iterator it = joysticks_.begin(); it != joysticks_.end(); it++) // This code causes an exception when a controller is attached; it's disabled to prevent crashes on exit.
{ // for(std::vector<SDL_Joystick *>::iterator it = joysticks_.begin(); it != joysticks_.end(); it++)
if(*it) // {
{ // if(*it)
SDL_JoystickClose(*it); // {
} // SDL_JoystickClose(*it);
} // }
// }
} }
bool UserInput::initialize() bool UserInput::initialize()