diff --git a/src/drivers/sdl/sdl.cpp b/src/drivers/sdl/sdl.cpp index a9cec03b..0508c2d9 100644 --- a/src/drivers/sdl/sdl.cpp +++ b/src/drivers/sdl/sdl.cpp @@ -413,11 +413,15 @@ SDL_GL_LoadLibrary(0); // Initialize the configuration system g_config = InitConfig(); + if(!g_config) { SDL_Quit(); return -1; } - + + // This is here so that a default fceu.cfg will be created on first + // run, even without a valid ROM to play. + g_config->save(); // initialize the infrastructure error = FCEUI_Initialize(); if(error != 1) {