From 52caf312d99a5e8e3c8473bc8286acd45de79e02 Mon Sep 17 00:00:00 2001
From: Connor McLaughlin <mclaughc@outlook.com>
Date: Fri, 8 Nov 2019 00:08:27 +1000
Subject: [PATCH] Frontend: Make about window modal

---
 src/duckstation/sdl_host_interface.cpp | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/duckstation/sdl_host_interface.cpp b/src/duckstation/sdl_host_interface.cpp
index a8e8dc4e5..304265951 100644
--- a/src/duckstation/sdl_host_interface.cpp
+++ b/src/duckstation/sdl_host_interface.cpp
@@ -1007,11 +1007,10 @@ void SDLHostInterface::DrawAboutWindow()
 {
   ImGui::SetNextWindowPos(ImVec2(ImGui::GetIO().DisplaySize.x * 0.5f, ImGui::GetIO().DisplaySize.y * 0.5f),
                           ImGuiCond_Appearing, ImVec2(0.5f, 0.5f));
-  if (!ImGui::Begin("About DuckStation", &m_about_window_open, ImGuiWindowFlags_NoResize))
-  {
-    ImGui::End();
+
+  ImGui::OpenPopup("About DuckStation");
+  if (!ImGui::BeginPopupModal("About DuckStation", &m_about_window_open, ImGuiWindowFlags_NoResize))
     return;
-  }
 
   ImGui::Text("DuckStation");
   ImGui::NewLine();
@@ -1031,7 +1030,7 @@ void SDLHostInterface::DrawAboutWindow()
   if (ImGui::Button("Close", ImVec2(60.0f, 20.0f)))
     m_about_window_open = false;
 
-  ImGui::End();
+  ImGui::EndPopup();
 }
 
 void SDLHostInterface::DrawDebugMenu()