mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-18 05:05:46 -04:00
System: Move present skip check to core
This commit is contained in:
@ -394,7 +394,7 @@ void Host::DisplayLoadingScreen(const char* message, int progress_min /*= -1*/,
|
||||
ImGui::End();
|
||||
|
||||
ImGui::EndFrame();
|
||||
g_host_display->Render();
|
||||
g_host_display->Render(false);
|
||||
ImGui::NewFrame();
|
||||
}
|
||||
|
||||
|
@ -745,9 +745,9 @@ bool D3D11HostDisplay::UpdateImGuiFontTexture()
|
||||
return true;
|
||||
}
|
||||
|
||||
bool D3D11HostDisplay::Render()
|
||||
bool D3D11HostDisplay::Render(bool skip_present)
|
||||
{
|
||||
if (ShouldSkipDisplayingFrame() || !m_swap_chain)
|
||||
if (skip_present || !m_swap_chain)
|
||||
{
|
||||
if (ImGui::GetCurrentContext())
|
||||
ImGui::Render();
|
||||
|
@ -67,7 +67,7 @@ public:
|
||||
|
||||
void SetVSync(bool enabled) override;
|
||||
|
||||
bool Render() override;
|
||||
bool Render(bool skip_present) override;
|
||||
bool RenderScreenshot(u32 width, u32 height, std::vector<u32>* out_pixels, u32* out_stride,
|
||||
HostDisplayPixelFormat* out_format) override;
|
||||
|
||||
|
@ -650,9 +650,9 @@ bool D3D12HostDisplay::UpdateImGuiFontTexture()
|
||||
return ImGui_ImplDX12_CreateFontsTexture();
|
||||
}
|
||||
|
||||
bool D3D12HostDisplay::Render()
|
||||
bool D3D12HostDisplay::Render(bool skip_present)
|
||||
{
|
||||
if (ShouldSkipDisplayingFrame() || !m_swap_chain)
|
||||
if (skip_present || !m_swap_chain)
|
||||
{
|
||||
if (ImGui::GetCurrentContext())
|
||||
ImGui::Render();
|
||||
|
@ -68,7 +68,7 @@ public:
|
||||
|
||||
virtual void SetVSync(bool enabled) override;
|
||||
|
||||
virtual bool Render() override;
|
||||
virtual bool Render(bool skip_present) override;
|
||||
virtual bool RenderScreenshot(u32 width, u32 height, std::vector<u32>* out_pixels, u32* out_stride,
|
||||
HostDisplayPixelFormat* out_format) override;
|
||||
|
||||
|
@ -738,9 +738,9 @@ void OpenGLHostDisplay::DestroyResources()
|
||||
m_display_program.Destroy();
|
||||
}
|
||||
|
||||
bool OpenGLHostDisplay::Render()
|
||||
bool OpenGLHostDisplay::Render(bool skip_present)
|
||||
{
|
||||
if (ShouldSkipDisplayingFrame())
|
||||
if (skip_present || m_window_info.type == WindowInfo::Type::Surfaceless)
|
||||
{
|
||||
if (ImGui::GetCurrentContext())
|
||||
ImGui::Render();
|
||||
|
@ -58,7 +58,7 @@ public:
|
||||
|
||||
void SetVSync(bool enabled) override;
|
||||
|
||||
bool Render() override;
|
||||
bool Render(bool skip_present) override;
|
||||
bool RenderScreenshot(u32 width, u32 height, std::vector<u32>* out_pixels, u32* out_stride,
|
||||
HostDisplayPixelFormat* out_format) override;
|
||||
|
||||
|
@ -572,9 +572,9 @@ bool VulkanHostDisplay::DoneRenderContextCurrent()
|
||||
return true;
|
||||
}
|
||||
|
||||
bool VulkanHostDisplay::Render()
|
||||
bool VulkanHostDisplay::Render(bool skip_present)
|
||||
{
|
||||
if (ShouldSkipDisplayingFrame() || !m_swap_chain)
|
||||
if (skip_present || !m_swap_chain)
|
||||
{
|
||||
if (ImGui::GetCurrentContext())
|
||||
ImGui::Render();
|
||||
|
@ -63,7 +63,7 @@ public:
|
||||
|
||||
void SetVSync(bool enabled) override;
|
||||
|
||||
bool Render() override;
|
||||
bool Render(bool skip_present) override;
|
||||
bool RenderScreenshot(u32 width, u32 height, std::vector<u32>* out_pixels, u32* out_stride,
|
||||
HostDisplayPixelFormat* out_format) override;
|
||||
|
||||
|
Reference in New Issue
Block a user