From db54e4f2b0c4a1b1416b9f96012a02adde31ea55 Mon Sep 17 00:00:00 2001 From: Pokechu22 Date: Tue, 26 Oct 2021 14:34:39 -0700 Subject: Externals: Update imgui to 1.85 --- Source/Core/VideoCommon/ShaderCache.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Source/Core/VideoCommon/ShaderCache.cpp') diff --git a/Source/Core/VideoCommon/ShaderCache.cpp b/Source/Core/VideoCommon/ShaderCache.cpp index 655a5b6bb1..8b1196cabc 100644 --- a/Source/Core/VideoCommon/ShaderCache.cpp +++ b/Source/Core/VideoCommon/ShaderCache.cpp @@ -160,10 +160,12 @@ void ShaderCache::WaitForAsyncCompiler() m_async_shader_compiler->WaitUntilCompletion([](size_t completed, size_t total) { g_renderer->BeginUIFrame(); + const float center_x = ImGui::GetIO().DisplaySize.x * 0.5f; + const float center_y = ImGui::GetIO().DisplaySize.y * 0.5f; const float scale = ImGui::GetIO().DisplayFramebufferScale.x; ImGui::SetNextWindowSize(ImVec2(400.0f * scale, 50.0f * scale), ImGuiCond_Always); - ImGui::SetNextWindowPosCenter(ImGuiCond_Always); + ImGui::SetNextWindowPos(ImVec2(center_x, center_y), ImGuiCond_Always, ImVec2(0.5f, 0.5f)); if (ImGui::Begin(Common::GetStringT("Compiling Shaders").c_str(), nullptr, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoInputs | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoSavedSettings | -- cgit v1.2.3