reorder startup to core/game/config

there was an issue with the original order and cores that poll certain options much earlier than the rest (ie. gambatte and its bootloader option)
This commit is contained in:
Shaun Inman 2023-03-01 20:00:39 -05:00
parent 328661775e
commit 55754b75cc

View file

@ -3919,21 +3919,22 @@ int main(int argc , char* argv[]) {
InitSettings(); InitSettings();
Core_open(core_path, tag_name); Core_open(core_path, tag_name);
Game_open(rom_path);
// restore configs
Config_read();
setOverclock(overclock);
GFX_setVsync(prevent_tearing);
Core_init(); Core_init();
// TODO: find a better place to do this // TODO: find a better place to do this
// mixing static and loaded data is messy // mixing static and loaded data is messy
options_menu.items[1].desc = (char*)core.version; options_menu.items[1].desc = (char*)core.version;
Game_open(rom_path);
Core_load(); Core_load();
Input_init(NULL); Input_init(NULL);
// restore configs
Config_read();
setOverclock(overclock);
GFX_setVsync(prevent_tearing);
SND_init(core.sample_rate, core.fps); SND_init(core.sample_rate, core.fps);
Menu_init(); Menu_init();