Allow resizing by default and recreate swapchain on resize (#763)

* Add `stretch to window` support

* Address comment

* Allow window resizing by default and recreate swapchain on resize

---------

Co-authored-by: nmzik <Nmzik@mail.ru>
This commit is contained in:
Fayaz Shaikh
2026-09-23 09:49:38 -04:00
committed by GitHub
parent f68c77d785
commit 019929587c
2 changed files with 33 additions and 15 deletions
+1 -2
View File
@@ -783,14 +783,13 @@ static void WindowCreate(WindowContext& context) {
}
SDL_SetWindowPosition(context.window, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED);
SDL_SetWindowResizable(context.window, false);
HostInputInit(context.window);
InitializeSystemOverlayInput(context.window);
context.UpdateIcon();
}
uint32_t WindowContext::InitialWindowFlags(bool fullscreen) noexcept {
auto flags = static_cast<uint32_t>(SDL_WINDOW_VULKAN);
auto flags = static_cast<uint32_t>(SDL_WINDOW_VULKAN | SDL_WINDOW_RESIZABLE);
if (fullscreen) {
flags |= static_cast<uint32_t>(SDL_WINDOW_FULLSCREEN);
}