Re-added the old fix for the "automatically starting emulator" bug that

got removed during refactoring.
This commit is contained in:
Aloshi 2013-08-08 19:15:50 -05:00
parent 60adf05077
commit c7a150046a

View file

@ -147,6 +147,9 @@ int main(int argc, char* argv[])
return 1; return 1;
} }
//dont generate joystick events while we're loading (hopefully fixes "automatically started emulator" bug)
SDL_JoystickEventState(SDL_DISABLE);
//try loading the system config file //try loading the system config file
if(!SystemData::loadConfig(SystemData::getConfigPath(), true)) if(!SystemData::loadConfig(SystemData::getConfigPath(), true))
{ {
@ -169,6 +172,9 @@ int main(int argc, char* argv[])
window.pushGui(new GuiDetectDevice(&window)); window.pushGui(new GuiDetectDevice(&window));
} }
//generate joystick events since we're done loading
SDL_JoystickEventState(SDL_ENABLE);
bool sleeping = false; bool sleeping = false;
unsigned int timeSinceLastEvent = 0; unsigned int timeSinceLastEvent = 0;
int lastTime = 0; int lastTime = 0;