need to restore deferred configs on load

changed default vsync to strict (primarily for menus)
This commit is contained in:
Shaun Inman 2023-02-06 09:03:03 -05:00
parent b33ab7f434
commit 8aca402163
2 changed files with 6 additions and 3 deletions

View file

@ -159,7 +159,7 @@ SDL_Surface* GFX_init(int mode) {
SDL_ShowCursor(0); SDL_ShowCursor(0);
TTF_Init(); TTF_Init();
gfx.vsync = VSYNC_LENIENT; gfx.vsync = VSYNC_STRICT;
gfx.mode = mode; gfx.mode = mode;
// we're drawing to the (triple-buffered) framebuffer directly // we're drawing to the (triple-buffered) framebuffer directly

View file

@ -3208,7 +3208,7 @@ static int Menu_options(MenuList* list) {
return 0; return 0;
} }
static void Menu_loop(void) { static void Menu_loop(void) {
GFX_setVsync(VSYNC_LENIENT); GFX_setVsync(VSYNC_STRICT);
POW_setCPUSpeed(CPU_SPEED_MENU); // set Hz directly POW_setCPUSpeed(CPU_SPEED_MENU); // set Hz directly
fast_forward = 0; fast_forward = 0;
@ -3669,7 +3669,10 @@ int main(int argc , char* argv[]) {
Game_open(rom_path); Game_open(rom_path);
Core_load(); Core_load();
Config_read(); // TODO: tmp // restore configs
Config_read();
setOverclock(overclock);
GFX_setVsync(prevent_tearing);
SND_init(core.sample_rate, core.fps); SND_init(core.sample_rate, core.fps);