System: Move present skip check to core

This commit is contained in:
Connor McLaughlin
2022-08-18 23:51:43 +10:00
parent de21ff250c
commit c7e8233b7b
13 changed files with 39 additions and 34 deletions

View File

@ -124,7 +124,7 @@ public:
u32 width, u32 height, void* out_data, u32 out_data_stride) = 0;
/// Returns false if the window was completely occluded.
virtual bool Render() = 0;
virtual bool Render(bool skip_present) = 0;
/// Renders the display with postprocessing to the specified image.
virtual bool RenderScreenshot(u32 width, u32 height, std::vector<u32>* out_pixels, u32* out_stride,
@ -318,6 +318,6 @@ void ReleaseHostDisplay();
//void EndPresentFrame();
/// Provided by the host; renders the display.
void RenderDisplay();
void RenderDisplay(bool skip_present);
void InvalidateDisplay();
} // namespace Host

View File

@ -996,7 +996,7 @@ bool System::LoadState(const char* filename)
ResetPerformanceCounters();
ResetThrottler();
Host::RenderDisplay();
Host::RenderDisplay(false);
Log_VerbosePrintf("Loading state took %.2f msec", load_timer.GetTimeMilliseconds());
return true;
}
@ -1463,7 +1463,7 @@ void System::Execute()
PauseSystem(true);
}
Host::RenderDisplay();
Host::RenderDisplay(g_host_display->ShouldSkipDisplayingFrame());
System::UpdatePerformanceCounters();
@ -1502,7 +1502,7 @@ void System::RecreateSystem()
ResetPerformanceCounters();
ResetThrottler();
Host::RenderDisplay();
Host::RenderDisplay(false);
if (was_paused)
PauseSystem(true);