Skip to content

Commit

Permalink
Re-added the old fix for the "automatically starting emulator" bug that
Browse files Browse the repository at this point in the history
got removed during refactoring.
  • Loading branch information
Aloshi committed Aug 9, 2013
1 parent 60adf05 commit c7a1500
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
{
Expand All @@ -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;
Expand Down

0 comments on commit c7a1500

Please sign in to comment.