From c7a150046aba70b8fc0ef91a83020a401f4d11e4 Mon Sep 17 00:00:00 2001 From: Aloshi Date: Thu, 8 Aug 2013 19:15:50 -0500 Subject: [PATCH] Re-added the old fix for the "automatically starting emulator" bug that got removed during refactoring. --- src/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 70602d710..67a9779c4 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;