aboutsummaryrefslogtreecommitdiffstats
path: root/src/vk-renderer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/vk-renderer.cpp')
-rw-r--r--src/vk-renderer.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/vk-renderer.cpp b/src/vk-renderer.cpp
index cfb437e..e3eca75 100644
--- a/src/vk-renderer.cpp
+++ b/src/vk-renderer.cpp
@@ -309,10 +309,12 @@ void vkrenderer::create_swapchain() {
if (wantedExtent.width < caps.minImageExtent.width) {
wantedExtent.width = caps.minImageExtent.width;
- } else if (wantedExtent.height < caps.minImageExtent.height) {
- wantedExtent.height = caps.minImageExtent.height;
} else if (wantedExtent.width > caps.maxImageExtent.width) {
wantedExtent.width = caps.maxImageExtent.width;
+ }
+
+ if (wantedExtent.height < caps.minImageExtent.height) {
+ wantedExtent.height = caps.minImageExtent.height;
} else if (wantedExtent.height > caps.maxImageExtent.height) {
wantedExtent.height = caps.maxImageExtent.height;
}