Skip to content

Commit

Permalink
dash: Use xbox vblank event instead of delay
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryzee119 committed Oct 5, 2023
1 parent 1d73c78 commit b5db5b3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,16 @@ int main(int argc, char* argv[]) {
lvgl_getlock();
lv_task_handler();
lvgl_removelock();
#ifdef NXDK
pb_wait_for_vbl();
#else
e = SDL_GetTicks();
t = e - s;
if (t < LV_DISP_DEF_REFR_PERIOD)
{
SDL_Delay(LV_DISP_DEF_REFR_PERIOD - t);
}
#endif
}
dash_printf(LEVEL_TRACE, "Quitting dash with quit event %d\n", lv_get_quit());
lv_port_disp_deinit();
Expand Down

0 comments on commit b5db5b3

Please sign in to comment.