mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Also use events for config changed
This commit is contained in:
@ -169,6 +169,8 @@ void Gfx::PresentBackbuffer()
|
||||
|
||||
void Gfx::OnConfigChanged(u32 bits)
|
||||
{
|
||||
AbstractGfx::OnConfigChanged(bits);
|
||||
|
||||
// Quad-buffer changes require swap chain recreation.
|
||||
if (bits & CONFIG_CHANGE_BIT_STEREO_MODE && m_swap_chain)
|
||||
m_swap_chain->SetStereo(SwapChain::WantsStereo());
|
||||
|
@ -437,6 +437,8 @@ SurfaceInfo Gfx::GetSurfaceInfo() const
|
||||
|
||||
void Gfx::OnConfigChanged(u32 bits)
|
||||
{
|
||||
AbstractGfx::OnConfigChanged(bits);
|
||||
|
||||
// For quad-buffered stereo we need to change the layer count, so recreate the swap chain.
|
||||
if (m_swap_chain && bits & CONFIG_CHANGE_BIT_STEREO_MODE)
|
||||
{
|
||||
|
@ -273,6 +273,8 @@ void Metal::Gfx::WaitForGPUIdle()
|
||||
|
||||
void Metal::Gfx::OnConfigChanged(u32 bits)
|
||||
{
|
||||
AbstractGfx::OnConfigChanged(bits);
|
||||
|
||||
if (bits & CONFIG_CHANGE_BIT_VSYNC)
|
||||
[m_layer setDisplaySyncEnabled:g_ActiveConfig.bVSyncActive];
|
||||
|
||||
|
@ -436,6 +436,8 @@ void OGLGfx::PresentBackbuffer()
|
||||
|
||||
void OGLGfx::OnConfigChanged(u32 bits)
|
||||
{
|
||||
AbstractGfx::OnConfigChanged(bits);
|
||||
|
||||
if (bits & CONFIG_CHANGE_BIT_VSYNC && !DriverDetails::HasBug(DriverDetails::BUG_BROKEN_VSYNC))
|
||||
m_main_gl_context->SwapInterval(g_ActiveConfig.bVSyncActive);
|
||||
|
||||
|
@ -369,6 +369,8 @@ void VKGfx::CheckForSurfaceResize()
|
||||
|
||||
void VKGfx::OnConfigChanged(u32 bits)
|
||||
{
|
||||
AbstractGfx::OnConfigChanged(bits);
|
||||
|
||||
if (bits & CONFIG_CHANGE_BIT_HOST_CONFIG)
|
||||
g_object_cache->ReloadPipelineCache();
|
||||
|
||||
|
@ -239,7 +239,7 @@ bool VideoBackend::Initialize(const WindowSystemInfo& wsi)
|
||||
auto perf_query = std::make_unique<PerfQuery>();
|
||||
auto bounding_box = std::make_unique<VKBoundingBox>();
|
||||
|
||||
return !InitializeShared(std::move(gfx), std::move(vertex_manager), std::move(perf_query),
|
||||
return InitializeShared(std::move(gfx), std::move(vertex_manager), std::move(perf_query),
|
||||
std::move(bounding_box));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user