summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2023-06-02 06:43:22 +0200
committerbunnei <bunneidev@gmail.com>2023-06-03 09:06:08 +0200
commitdb6737f2ba82c7757c189a26114747b8a59322eb (patch)
treefd1edd1a9f4a3de5fe9b6c9a8296967356b20adb
parentandroid: Rename "Input Overlay" to "Overlay Options" (diff)
downloadyuzu-db6737f2ba82c7757c189a26114747b8a59322eb.tar
yuzu-db6737f2ba82c7757c189a26114747b8a59322eb.tar.gz
yuzu-db6737f2ba82c7757c189a26114747b8a59322eb.tar.bz2
yuzu-db6737f2ba82c7757c189a26114747b8a59322eb.tar.lz
yuzu-db6737f2ba82c7757c189a26114747b8a59322eb.tar.xz
yuzu-db6737f2ba82c7757c189a26114747b8a59322eb.tar.zst
yuzu-db6737f2ba82c7757c189a26114747b8a59322eb.zip
-rw-r--r--src/video_core/renderer_vulkan/vk_present_manager.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/renderer_vulkan/vk_present_manager.cpp b/src/video_core/renderer_vulkan/vk_present_manager.cpp
index dc42982e9..10ace0420 100644
--- a/src/video_core/renderer_vulkan/vk_present_manager.cpp
+++ b/src/video_core/renderer_vulkan/vk_present_manager.cpp
@@ -306,6 +306,9 @@ void PresentManager::CopyToSwapchain(Frame* frame) {
image_count = swapchain.GetImageCount();
};
+#ifdef ANDROID
+ std::unique_lock lock{recreate_surface_mutex};
+
const auto needs_recreation = [&] {
if (last_render_surface != render_window.GetWindowInfo().render_surface) {
return true;
@@ -316,9 +319,6 @@ void PresentManager::CopyToSwapchain(Frame* frame) {
return false;
};
-#ifdef ANDROID
- std::unique_lock lock{recreate_surface_mutex};
-
recreate_surface_cv.wait_for(lock, std::chrono::milliseconds(400),
[&]() { return !needs_recreation(); });