SDL: include: Removed SDL_quit.h

From 9c8c254af220d2ba0df9ccc148a8ca6924a4f336 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Mon, 15 Apr 2024 11:35:39 -0400
Subject: [PATCH] include: Removed SDL_quit.h

It only had one (sort of scary) macro in it.

Fixes #9534.
---
 VisualC-GDK/SDL/SDL.vcxproj             |  1 -
 VisualC-GDK/SDL/SDL.vcxproj.filters     |  1 -
 VisualC-WinRT/SDL-UWP.vcxproj           |  1 -
 VisualC-WinRT/SDL-UWP.vcxproj.filters   |  3 --
 VisualC/SDL/SDL.vcxproj                 |  1 -
 VisualC/SDL/SDL.vcxproj.filters         |  3 --
 Xcode/SDL/SDL.xcodeproj/project.pbxproj |  4 --
 docs/README-migration.md                | 13 ++++++
 include/SDL3/SDL_events.h               |  1 -
 include/SDL3/SDL_quit.h                 | 57 -------------------------
 10 files changed, 13 insertions(+), 72 deletions(-)
 delete mode 100644 include/SDL3/SDL_quit.h

diff --git a/VisualC-GDK/SDL/SDL.vcxproj b/VisualC-GDK/SDL/SDL.vcxproj
index f14f2186a6729..0cb341e0ebd50 100644
--- a/VisualC-GDK/SDL/SDL.vcxproj
+++ b/VisualC-GDK/SDL/SDL.vcxproj
@@ -360,7 +360,6 @@
     <ClInclude Include="..\..\include\SDL3\SDL_platform.h" />
     <ClInclude Include="..\..\include\SDL3\SDL_platform_defines.h" />
     <ClInclude Include="..\..\include\SDL3\SDL_power.h" />
-    <ClInclude Include="..\..\include\SDL3\SDL_quit.h" />
     <ClInclude Include="..\..\include\SDL3\SDL_rect.h" />
     <ClInclude Include="..\..\include\SDL3\SDL_render.h" />
     <ClInclude Include="..\..\include\SDL3\SDL_revision.h" />
diff --git a/VisualC-GDK/SDL/SDL.vcxproj.filters b/VisualC-GDK/SDL/SDL.vcxproj.filters
index b6747abd15d18..eb8308ff04cd7 100644
--- a/VisualC-GDK/SDL/SDL.vcxproj.filters
+++ b/VisualC-GDK/SDL/SDL.vcxproj.filters
@@ -270,7 +270,6 @@
     <ClInclude Include="..\..\include\SDL3\SDL_platform.h" />
     <ClInclude Include="..\..\include\SDL3\SDL_platform_defines.h" />
     <ClInclude Include="..\..\include\SDL3\SDL_power.h" />
-    <ClInclude Include="..\..\include\SDL3\SDL_quit.h" />
     <ClInclude Include="..\..\include\SDL3\SDL_rect.h" />
     <ClInclude Include="..\..\include\SDL3\SDL_render.h" />
     <ClInclude Include="..\..\include\SDL3\SDL_revision.h" />
diff --git a/VisualC-WinRT/SDL-UWP.vcxproj b/VisualC-WinRT/SDL-UWP.vcxproj
index 3dbbe892ffa14..9be0738d4c7f0 100644
--- a/VisualC-WinRT/SDL-UWP.vcxproj
+++ b/VisualC-WinRT/SDL-UWP.vcxproj
@@ -74,7 +74,6 @@
     <ClInclude Include="..\include\SDL3\SDL_platform_defines.h" />
     <ClInclude Include="..\include\SDL3\SDL_power.h" />
     <ClInclude Include="..\include\SDL3\SDL_properties.h" />
-    <ClInclude Include="..\include\SDL3\SDL_quit.h" />
     <ClInclude Include="..\include\SDL3\SDL_rect.h" />
     <ClInclude Include="..\include\SDL3\SDL_render.h" />
     <ClInclude Include="..\include\SDL3\SDL_revision.h" />
diff --git a/VisualC-WinRT/SDL-UWP.vcxproj.filters b/VisualC-WinRT/SDL-UWP.vcxproj.filters
index 092edfd292e45..7069a9566fdf9 100644
--- a/VisualC-WinRT/SDL-UWP.vcxproj.filters
+++ b/VisualC-WinRT/SDL-UWP.vcxproj.filters
@@ -144,9 +144,6 @@
     <ClInclude Include="..\include\SDL3\SDL_power.h">
       <Filter>Header Files</Filter>
     </ClInclude>
-    <ClInclude Include="..\include\SDL3\SDL_quit.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
     <ClInclude Include="..\include\SDL3\SDL_rect.h">
       <Filter>Header Files</Filter>
     </ClInclude>
diff --git a/VisualC/SDL/SDL.vcxproj b/VisualC/SDL/SDL.vcxproj
index c3143c47cffdf..6b553d9abd1b0 100644
--- a/VisualC/SDL/SDL.vcxproj
+++ b/VisualC/SDL/SDL.vcxproj
@@ -283,7 +283,6 @@
     <ClInclude Include="..\..\include\SDL3\SDL_platform_defines.h" />
     <ClInclude Include="..\..\include\SDL3\SDL_power.h" />
     <ClInclude Include="..\..\include\SDL3\SDL_properties.h" />
-    <ClInclude Include="..\..\include\SDL3\SDL_quit.h" />
     <ClInclude Include="..\..\include\SDL3\SDL_rect.h" />
     <ClInclude Include="..\..\include\SDL3\SDL_render.h" />
     <ClInclude Include="..\..\include\SDL3\SDL_revision.h" />
diff --git a/VisualC/SDL/SDL.vcxproj.filters b/VisualC/SDL/SDL.vcxproj.filters
index 66dab4deaa731..103ce22d25ed3 100644
--- a/VisualC/SDL/SDL.vcxproj.filters
+++ b/VisualC/SDL/SDL.vcxproj.filters
@@ -339,9 +339,6 @@
     <ClInclude Include="..\..\include\SDL3\SDL_properties.h">
       <Filter>API Headers</Filter>
     </ClInclude>
-    <ClInclude Include="..\..\include\SDL3\SDL_quit.h">
-      <Filter>API Headers</Filter>
-    </ClInclude>
     <ClInclude Include="..\..\include\SDL3\SDL_rect.h">
       <Filter>API Headers</Filter>
     </ClInclude>
diff --git a/Xcode/SDL/SDL.xcodeproj/project.pbxproj b/Xcode/SDL/SDL.xcodeproj/project.pbxproj
index b913cb7f895c0..3325864953db4 100644
--- a/Xcode/SDL/SDL.xcodeproj/project.pbxproj
+++ b/Xcode/SDL/SDL.xcodeproj/project.pbxproj
@@ -493,7 +493,6 @@
 		F3F7D9B12933074E00816151 /* SDL_power.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F7D8DB2933074D00816151 /* SDL_power.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		F3F7D9B92933074E00816151 /* SDL_cpuinfo.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F7D8DD2933074D00816151 /* SDL_cpuinfo.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		F3F7D9BD2933074E00816151 /* SDL_render.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F7D8DE2933074D00816151 /* SDL_render.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		F3F7D9C12933074E00816151 /* SDL_quit.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F7D8DF2933074D00816151 /* SDL_quit.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		F3F7D9C52933074E00816151 /* SDL_assert.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F7D8E02933074D00816151 /* SDL_assert.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		F3F7D9C92933074E00816151 /* SDL_opengl.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F7D8E12933074D00816151 /* SDL_opengl.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		F3F7D9CD2933074E00816151 /* SDL_rect.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F7D8E22933074D00816151 /* SDL_rect.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -1032,7 +1031,6 @@
 		F3F7D8DB2933074D00816151 /* SDL_power.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_power.h; path = SDL3/SDL_power.h; sourceTree = "<group>"; };
 		F3F7D8DD2933074D00816151 /* SDL_cpuinfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_cpuinfo.h; path = SDL3/SDL_cpuinfo.h; sourceTree = "<group>"; };
 		F3F7D8DE2933074D00816151 /* SDL_render.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_render.h; path = SDL3/SDL_render.h; sourceTree = "<group>"; };
-		F3F7D8DF2933074D00816151 /* SDL_quit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_quit.h; path = SDL3/SDL_quit.h; sourceTree = "<group>"; };
 		F3F7D8E02933074D00816151 /* SDL_assert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_assert.h; path = SDL3/SDL_assert.h; sourceTree = "<group>"; };
 		F3F7D8E12933074D00816151 /* SDL_opengl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_opengl.h; path = SDL3/SDL_opengl.h; sourceTree = "<group>"; };
 		F3F7D8E22933074D00816151 /* SDL_rect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_rect.h; path = SDL3/SDL_rect.h; sourceTree = "<group>"; };
@@ -1211,7 +1209,6 @@
 				F3F7D8AB2933074900816151 /* SDL_platform.h */,
 				F3F7D8DB2933074D00816151 /* SDL_power.h */,
 				F3E5A6EC2AD5E10800293D83 /* SDL_properties.h */,
-				F3F7D8DF2933074D00816151 /* SDL_quit.h */,
 				F3F7D8E22933074D00816151 /* SDL_rect.h */,
 				F3F7D8DE2933074D00816151 /* SDL_render.h */,
 				F3F7D8B42933074900816151 /* SDL_revision.h */,
@@ -2421,7 +2418,6 @@
 				F3B38CD3296E2E52005DA6D3 /* SDL_platform_defines.h in Headers */,
 				F3F7D9B12933074E00816151 /* SDL_power.h in Headers */,
 				F3E5A6ED2AD5E10800293D83 /* SDL_properties.h in Headers */,
-				F3F7D9C12933074E00816151 /* SDL_quit.h in Headers */,
 				F37E18622BAA40090098C111 /* SDL_sysfilesystem.h in Headers */,
 				F3F7D9CD2933074E00816151 /* SDL_rect.h in Headers */,
 				A7D8AC0323E2514100DCD162 /* SDL_rect_c.h in Headers */,
diff --git a/docs/README-migration.md b/docs/README-migration.md
index 30e50799add27..4d5590e5084c6 100644
--- a/docs/README-migration.md
+++ b/docs/README-migration.md
@@ -1033,6 +1033,19 @@ The following platform preprocessor macros have been removed:
 * `__PNACL__`
 * `__WINDOWS__`
 
+## SDL_quit.h
+
+SDL_quit.h has been completely removed. It only had one symbol in it--SDL_QuitRequested--and if you want it, you can just add this to your app...
+
+```c
+#define SDL_QuitRequested() (SDL_PumpEvents(), (SDL_PeepEvents(NULL,0,SDL_PEEKEVENT,SDL_EVENT_QUIT,SDL_EVENT_QUIT) > 0))
+```
+
+...but this macro is sort of messy, calling two functions in sequence in an expression.
+
+The following macros have been removed:
+* SDL_QuitRequested - call SDL_PumpEvents() then SDL_PeepEvents() directly, instead.
+
 ## SDL_rect.h
 
 The following functions have been renamed:
diff --git a/include/SDL3/SDL_events.h b/include/SDL3/SDL_events.h
index ba888566b3673..9e26dd64e5718 100644
--- a/include/SDL3/SDL_events.h
+++ b/include/SDL3/SDL_events.h
@@ -35,7 +35,6 @@
 #include <SDL3/SDL_keyboard.h>
 #include <SDL3/SDL_mouse.h>
 #include <SDL3/SDL_pen.h>
-#include <SDL3/SDL_quit.h>
 #include <SDL3/SDL_stdinc.h>
 #include <SDL3/SDL_touch.h>
 #include <SDL3/SDL_video.h>
diff --git a/include/SDL3/SDL_quit.h b/include/SDL3/SDL_quit.h
deleted file mode 100644
index f7b892c14751e..0000000000000
--- a/include/SDL3/SDL_quit.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_quit.h
- *
- *  Include file for SDL quit event handling.
- */
-
-#ifndef SDL_quit_h_
-#define SDL_quit_h_
-
-#include <SDL3/SDL_stdinc.h>
-
-/**
- *  \file SDL_quit.h
- *
- *  ::SDL_EVENT_QUIT is generated when the user tries to close the application
- *  window. If it is ignored or filtered out, the window will remain open.
- *  If it is not ignored or filtered, it is queued normally and the window
- *  is allowed to close. When the window is closed, screen updates will
- *  complete, but have no effect.
- *
- *  SDL_Init() installs signal handlers for SIGINT (keyboard interrupt)
- *  and SIGTERM (system termination request), if handlers do not already
- *  exist, that generate ::SDL_EVENT_QUIT as well. There is no way
- *  to determine the cause of an ::SDL_EVENT_QUIT, but setting a signal
- *  handler in your application will override the default generation of
- *  quit events for that signal.
- *
- *  \sa SDL_Quit()
- */
-
-/* There are no functions directly affecting the quit event */
-
-#define SDL_QuitRequested() \
-        (SDL_PumpEvents(), (SDL_PeepEvents(NULL,0,SDL_PEEKEVENT,SDL_EVENT_QUIT,SDL_EVENT_QUIT) > 0))
-
-#endif /* SDL_quit_h_ */