Index: game-gui-sdl.cpp
===================================================================
--- game-gui-sdl.cpp	(revision 81869efbdb02d8ba6e8c835b23334c154beeef3e)
+++ game-gui-sdl.cpp	(revision 8d96e95153a861c5e24ebad99d37fcd5710e8b9c)
@@ -157,4 +157,9 @@
    // TODO: Make sure this works on a mac (the analogous glfw function had issues on Mac retina displays)
    SDL_GetWindowSize(window, &windowWidth, &windowHeight);
+
+   if (SDL_GetWindowFlags(window) & SDL_WINDOW_MINIMIZED) {
+      windowWidth = 0;
+      windowHeight = 0;
+   }
 }
 
Index: sdl-game.cpp
===================================================================
--- sdl-game.cpp	(revision 81869efbdb02d8ba6e8c835b23334c154beeef3e)
+++ sdl-game.cpp	(revision 8d96e95153a861c5e24ebad99d37fcd5710e8b9c)
@@ -170,8 +170,7 @@
       if (shouldRecreateSwapChain) {
          gui->refreshWindowSize();
-
-         int width = gui->getWindowWidth();
-         int height = gui->getWindowHeight();
-         if (width > 0 && height > 0) {
+         const bool isMinimized = gui->getWindowWidth() == 0 || gui->getWindowHeight() == 0;
+
+         if (!isMinimized) {
             // TODO: This should be used if the min image count changes, presumably because a new surface was created
             // with a different image count or something like that. Maybe I want to add code to query for a new min image count
@@ -211,6 +210,5 @@
 
       gui->refreshWindowSize();
-
-      const bool isMinimized = gui->getWindowWidth() <= 0 || gui->getWindowHeight() <= 0;
+      const bool isMinimized = gui->getWindowWidth() == 0 || gui->getWindowHeight() == 0;
 
       if (!isMinimized) {
Index: vulkan-game.cpp
===================================================================
--- vulkan-game.cpp	(revision 81869efbdb02d8ba6e8c835b23334c154beeef3e)
+++ vulkan-game.cpp	(revision 8d96e95153a861c5e24ebad99d37fcd5710e8b9c)
@@ -938,8 +938,7 @@
       if (shouldRecreateSwapChain) {
          gui->refreshWindowSize();
-
-         int width = gui->getWindowWidth();
-         int height = gui->getWindowHeight();
-         if (width > 0 && height > 0) {
+         const bool isMinimized = gui->getWindowWidth() == 0 || gui->getWindowHeight() == 0;
+
+         if (!isMinimized) {
             // TODO: This should be used if the min image count changes, presumably because a new surface was created
             // with a different image count or something like that. Maybe I want to add code to query for a new min image count
@@ -965,5 +964,5 @@
 
       ImGui_ImplVulkan_NewFrame();
-      ImGui_ImplSDL2_NewFrame(this->window);
+      ImGui_ImplSDL2_NewFrame(window);
       ImGui::NewFrame();
 
@@ -994,6 +993,5 @@
 
       gui->refreshWindowSize();
-
-      const bool isMinimized = gui->getWindowWidth() <= 0 || gui->getWindowHeight() <= 0;
+      const bool isMinimized = gui->getWindowWidth() == 0 || gui->getWindowHeight() == 0;
 
       if (!isMinimized) {
