aboutsummaryrefslogtreecommitdiff
path: root/cube
diff options
context:
space:
mode:
authorCharles Giessen <charles@lunarg.com>2025-07-18 13:55:07 -0500
committerCharles Giessen <46324611+charles-lunarg@users.noreply.github.com>2025-07-20 12:00:16 -0500
commit36f2e7584258bea0b6d71aed7108f5afe11ea494 (patch)
treebb7a088e1edd911e75351e9b60b0e3093f96f6fb /cube
parent105d6c1fede00c3a9055e5a531ebf3d99bac406e (diff)
downloadusermoji-36f2e7584258bea0b6d71aed7108f5afe11ea494.tar.xz
cube: Fix wayland resize broken when extent is 0xFFFFFFFF
This is a 'magic value' that shouldn't be allowed to overwrite the current window width & height. There is code to handle the value, but not everywhere it can come from.
Diffstat (limited to 'cube')
-rw-r--r--cube/cube.c2
-rw-r--r--cube/cube.cpp2
2 files changed, 0 insertions, 4 deletions
diff --git a/cube/cube.c b/cube/cube.c
index a616af24..c7299e8c 100644
--- a/cube/cube.c
+++ b/cube/cube.c
@@ -1351,8 +1351,6 @@ static void demo_draw(struct demo *demo) {
assert(!err);
if (surfCapabilities.currentExtent.width != (uint32_t)demo->width ||
surfCapabilities.currentExtent.height != (uint32_t)demo->height) {
- demo->width = surfCapabilities.currentExtent.width;
- demo->height = surfCapabilities.currentExtent.height;
demo_resize(demo);
}
} else if (err == VK_ERROR_SURFACE_LOST_KHR) {
diff --git a/cube/cube.cpp b/cube/cube.cpp
index 1522ba0c..a448ddab 100644
--- a/cube/cube.cpp
+++ b/cube/cube.cpp
@@ -955,8 +955,6 @@ void Demo::draw() {
auto caps_result = gpu.getSurfaceCapabilitiesKHR(surface, &surfCapabilities);
VERIFY(caps_result == vk::Result::eSuccess);
if (surfCapabilities.currentExtent.width != width || surfCapabilities.currentExtent.height != height) {
- width = surfCapabilities.currentExtent.width;
- height = surfCapabilities.currentExtent.height;
resize();
}
} else if (present_result == vk::Result::eErrorSurfaceLostKHR) {