diff --git a/src/clock/main.c b/src/clock/main.c index 10d63cf..c942f19 100644 --- a/src/clock/main.c +++ b/src/clock/main.c @@ -291,12 +291,7 @@ int main(int argc , char* argv[]) { GFX_flip(screen); } - else { - // slow down to 60fps - uint32_t frame_duration = SDL_GetTicks() - frame_start; - #define kTargetFrameDuration 17 - if (frame_durationmod) item->value += RETRO_BUTTON_COUNT; } } - options_shortcuts_menu.desc = getSaveDesc(); Menu_options(&options_shortcuts_menu); return MENU_CALLBACK_NOP; } @@ -2687,26 +2687,21 @@ static int options_save_confirm(MenuList* list, int i) { } } - #define MESSAGE_WAIT_DELAY 250 // ms - uint32_t message_start = SDL_GetTicks(); - int ready = 0; + GFX_setMode(MODE_MAIN); + int dirty = 1; while (1) { GFX_startFrame(); PAD_poll(); - - if (!ready && SDL_GetTicks()-message_start>=MESSAGE_WAIT_DELAY) { - ready = dirty = 1; - GFX_setMode(MODE_MAIN); - } - if (ready && (PAD_justPressed(BTN_A) || PAD_justPressed(BTN_B))) break; + if (PAD_justPressed(BTN_A) || PAD_justPressed(BTN_B)) break; + POW_update(&dirty, NULL, Menu_beforeSleep, Menu_afterSleep); if (dirty) { dirty = 0; GFX_clear(screen); GFX_blitMessage(message, screen, NULL); - if (ready) GFX_blitButtonGroup((char*[]){ "A","OKAY", NULL }, screen, 1); + GFX_blitButtonGroup((char*[]){ "A","OKAY", NULL }, screen, 1); GFX_flip(screen); } else GFX_sync(); @@ -2896,6 +2891,8 @@ static int Menu_options(MenuList* list) { } } + POW_update(&dirty, NULL, Menu_beforeSleep, Menu_afterSleep); + if (dirty) { dirty = 0;