Skip to content

Commit c7a1500

Browse files
committed
Re-added the old fix for the "automatically starting emulator" bug that
got removed during refactoring.
1 parent 60adf05 commit c7a1500

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/main.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,9 @@ int main(int argc, char* argv[])
147147
return 1;
148148
}
149149

150+
//dont generate joystick events while we're loading (hopefully fixes "automatically started emulator" bug)
151+
SDL_JoystickEventState(SDL_DISABLE);
152+
150153
//try loading the system config file
151154
if(!SystemData::loadConfig(SystemData::getConfigPath(), true))
152155
{
@@ -169,6 +172,9 @@ int main(int argc, char* argv[])
169172
window.pushGui(new GuiDetectDevice(&window));
170173
}
171174

175+
//generate joystick events since we're done loading
176+
SDL_JoystickEventState(SDL_ENABLE);
177+
172178
bool sleeping = false;
173179
unsigned int timeSinceLastEvent = 0;
174180
int lastTime = 0;

0 commit comments

Comments
 (0)