1
0
mirror of https://github.com/blupi-games/planetblupi synced 2024-12-30 10:15:36 +01:00

Add the restoremidi option with the config.json file

This commit is contained in:
Mathieu Schroeter 2017-12-12 22:43:56 +01:00
parent 54d7eec1a3
commit 6237cfda9f

View File

@ -79,6 +79,7 @@ enum Settings {
SETTING_RENDERER = 1 << 3,
SETTING_ZOOM = 1 << 4,
SETTING_DRIVER = 1 << 5,
SETTING_MIDI = 1 << 6,
};
static int g_settingsOverload = 0;
@ -188,6 +189,10 @@ ReadConfig ()
SDL_SetHint (SDL_HINT_RENDER_DRIVER, "opengl");
}
if (
!(g_settingsOverload & SETTING_MIDI) && j.find ("restoremidi") != j.end ())
g_restoreMidi = j["restoremidi"].get<bool> ();
return true;
}
@ -685,7 +690,10 @@ parseArgs (int argc, char * argv[], bool & exit)
g_restoreBugs = true;
if (args["restoremidi"])
{
g_restoreMidi = true;
g_settingsOverload |= SETTING_MIDI;
}
return EXIT_SUCCESS;
}