Skip to content

Commit

Permalink
display: Limit the refresh rate of the UI/common dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
Macdu committed Nov 8, 2023
1 parent e0d0196 commit ca39e6d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion vita3k/display/src/display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ static void vblank_sync_thread(EmuEnvState &emuenv) {

// in this case, even though no new game frames are being rendered, we still need to update the screen
if (emuenv.kernel.is_threads_paused() || (emuenv.common_dialog.status == SCE_COMMON_DIALOG_STATUS_RUNNING))
emuenv.renderer->should_display = true;
// only display the UI/common dialog at 30 fps
// this is necessary so that the command buffer processing doesn't get starved
// with vsync enabled and a screen with a refresh rate of 60Hz or less
if (display.vblank_count % 2 == 0)
emuenv.renderer->should_display = true;
}

// maybe we should also use a mutex for this part, but it shouldn't be an issue
Expand Down

0 comments on commit ca39e6d

Please sign in to comment.