Index: sdl-game.cpp
===================================================================
--- sdl-game.cpp	(revision 4e2c709a2b53e4003dcc6c516f8d70b616fb8ff1)
+++ sdl-game.cpp	(revision 28ea92fde4ae4d6b46f9386663d6c432e653fbb4)
@@ -15,6 +15,4 @@
 
 #define IMGUI_UNLIMITED_FRAME_RATE
-
-static bool g_SwapChainRebuild = false;
 
 static void check_imgui_vk_result(VkResult res) {
@@ -172,5 +170,5 @@
 
       // Resize swap chain?
-      if (g_SwapChainRebuild) {
+      if (shouldRecreateSwapChain) {
          int width, height;
          SDL_GetWindowSize(window, &width, &height);
@@ -184,5 +182,5 @@
 
             imageIndex = 0;
-            g_SwapChainRebuild = false;
+            shouldRecreateSwapChain = false;
          }
       }
@@ -823,8 +821,7 @@
 
    if (result == VK_ERROR_OUT_OF_DATE_KHR) {
-      g_SwapChainRebuild = true;
+      shouldRecreateSwapChain = true;
       return;
-   }
-   else {
+   } else {
       VKUTIL_CHECK_RESULT(result, "failed to acquire swap chain image!");
    }
@@ -895,6 +892,7 @@
 
 void VulkanGame::presentFrame() {
-   if (g_SwapChainRebuild)
+   if (shouldRecreateSwapChain) {
       return;
+   }
 
    VkSemaphore signalSemaphores[] = { renderCompleteSemaphores[currentFrame] };
@@ -914,8 +912,7 @@
    // to framebufferResized, but not quite the same
    if (result == VK_ERROR_OUT_OF_DATE_KHR) {
-      g_SwapChainRebuild = true;
+      shouldRecreateSwapChain = true;
       return;
-   }
-   else if (result != VK_SUCCESS) {
+   } else if (result != VK_SUCCESS) {
       throw runtime_error("failed to present swap chain image!");
    }
Index: sdl-game.hpp
===================================================================
--- sdl-game.hpp	(revision 4e2c709a2b53e4003dcc6c516f8d70b616fb8ff1)
+++ sdl-game.hpp	(revision 28ea92fde4ae4d6b46f9386663d6c432e653fbb4)
@@ -86,4 +86,6 @@
       uint32_t currentFrame;
 
+      bool shouldRecreateSwapChain;
+
       // My code, but not complete. Skips creating the SDL renderer, probably because it doesn't use hardware acceleration.
       // I should try to get uncapped framerate and compare performance w/ and w/out an SDL renderer
Index: vulkan-game.cpp
===================================================================
--- vulkan-game.cpp	(revision 4e2c709a2b53e4003dcc6c516f8d70b616fb8ff1)
+++ vulkan-game.cpp	(revision 28ea92fde4ae4d6b46f9386663d6c432e653fbb4)
@@ -65,5 +65,5 @@
 
    this->currentFrame = 0;
-   this->framebufferResized = false;
+   shouldRecreateSwapChain = false;
 
    this->object_VP_mats = {};
@@ -812,5 +812,5 @@
             case UI_EVENT_WINDOWRESIZE:
                cout << "Window resize event detected" << endl;
-               framebufferResized = true;
+               shouldRecreateSwapChain = true;
                break;
             case UI_EVENT_KEYDOWN:
@@ -1800,6 +1800,6 @@
    VkResult result = vkQueuePresentKHR(presentQueue, &presentInfo);
 
-   if (result == VK_ERROR_OUT_OF_DATE_KHR || result == VK_SUBOPTIMAL_KHR || framebufferResized) {
-      framebufferResized = false;
+   if (result == VK_ERROR_OUT_OF_DATE_KHR || result == VK_SUBOPTIMAL_KHR || shouldRecreateSwapChain) {
+      shouldRecreateSwapChain = false;
       recreateSwapChain();
    } else if (result != VK_SUCCESS) {
Index: vulkan-game.hpp
===================================================================
--- vulkan-game.hpp	(revision 4e2c709a2b53e4003dcc6c516f8d70b616fb8ff1)
+++ vulkan-game.hpp	(revision 28ea92fde4ae4d6b46f9386663d6c432e653fbb4)
@@ -293,5 +293,5 @@
       uint32_t currentFrame;
 
-      bool framebufferResized;
+      bool shouldRecreateSwapChain;
 
       VkDescriptorPool imguiDescriptorPool;
