From 825a84a5d1758ca1e29b9307f326194b13442ccc Mon Sep 17 00:00:00 2001 From: Stuart Kenny Date: Sat, 11 Sep 2021 19:05:34 +0100 Subject: [PATCH] Wire inflight frames config setting to render managers. --- libretro/LibretroGLCoreContext.cpp | 3 +++ libretro/LibretroVulkanContext.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/libretro/LibretroGLCoreContext.cpp b/libretro/LibretroGLCoreContext.cpp index 0b5a57b91b..66261dea82 100644 --- a/libretro/LibretroGLCoreContext.cpp +++ b/libretro/LibretroGLCoreContext.cpp @@ -28,6 +28,9 @@ void LibretroGLCoreContext::CreateDrawContext() { } draw_ = Draw::T3DCreateGLContext(); renderManager_ = (GLRenderManager *)draw_->GetNativeObject(Draw::NativeObject::RENDER_MANAGER); + renderManager_->SetInflightFrames(g_Config.iInflightFrames); + SetGPUBackend(GPUBackend::OPENGL); + draw_->CreatePresets(); } void LibretroGLCoreContext::DestroyDrawContext() { diff --git a/libretro/LibretroVulkanContext.cpp b/libretro/LibretroVulkanContext.cpp index 5c27ef33cf..666d941de5 100644 --- a/libretro/LibretroVulkanContext.cpp +++ b/libretro/LibretroVulkanContext.cpp @@ -11,6 +11,7 @@ #include "libretro/LibretroVulkanContext.h" #include "libretro/libretro_vulkan.h" +#include static VulkanContext *vk; @@ -140,6 +141,8 @@ void LibretroVulkanContext::CreateDrawContext() { } draw_ = Draw::T3DCreateVulkanContext(vk, false); + ((VulkanRenderManager*)draw_->GetNativeObject(Draw::NativeObject::RENDER_MANAGER))->SetInflightFrames(g_Config.iInflightFrames); + SetGPUBackend(GPUBackend::VULKAN); } void LibretroVulkanContext::Shutdown() {