HostDisplay: Add an option to decouple display fps from emulator fps

Makes Android so much faster...
This commit is contained in:
Connor McLaughlin
2020-11-03 15:58:40 +10:00
parent ae1e4b1b8f
commit 2c8a4ff154
10 changed files with 79 additions and 1 deletions

View File

@ -661,6 +661,19 @@ void D3D11HostDisplay::DestroyImGuiContext()
bool D3D11HostDisplay::Render()
{
#ifndef LIBRETRO
if (ShouldSkipDisplayingFrame())
{
#ifdef WITH_IMGUI
if (ImGui::GetCurrentContext())
{
ImGui::Render();
ImGui_ImplDX11_NewFrame();
}
#endif
return false;
}
static constexpr std::array<float, 4> clear_color = {};
m_context->ClearRenderTargetView(m_swap_chain_rtv.Get(), clear_color.data());
m_context->OMSetRenderTargets(1, m_swap_chain_rtv.GetAddressOf(), nullptr);