diff --git a/src/main.cpp b/src/main.cpp index 70602d710f..67a9779c45 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -147,6 +147,9 @@ int main(int argc, char* argv[]) 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 if(!SystemData::loadConfig(SystemData::getConfigPath(), true)) { @@ -169,6 +172,9 @@ int main(int argc, char* argv[]) window.pushGui(new GuiDetectDevice(&window)); } + //generate joystick events since we're done loading + SDL_JoystickEventState(SDL_ENABLE); + bool sleeping = false; unsigned int timeSinceLastEvent = 0; int lastTime = 0;