shithub: pt2-clone

Download patch

ref: 3c5ead79ec3902eddfb91e3b53bacd5e7c483066
parent: 32a39e9d1f2080597df18700462bc14a2f5e871f
author: Stuart George <yakumo9275@gmail.com>
date: Tue Aug 23 14:29:36 EDT 2022

Fixed SDL2 patchlevel checks, they were ignoring minor version.

--- a/src/pt2_main.c
+++ b/src/pt2_main.c
@@ -118,7 +118,7 @@
 	_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
 #endif
 
-#if SDL_PATCHLEVEL < 5
+#if SDL_MAJOR_VERISON == 2 && SDL_MINOR_VERSION == 0 && SDL_PATCHLEVEL < 5
 	#pragma message("WARNING: The SDL2 dev lib is older than ver 2.0.5. You'll get fullscreen mode issues.")
 #endif
 
--- a/src/pt2_visuals.c
+++ b/src/pt2_visuals.c
@@ -2343,7 +2343,7 @@
 	uint32_t rendererFlags = 0;
 
 #ifdef _WIN32
-#if SDL_PATCHLEVEL >= 4
+#if SDL_MAJOR_VERSION == 2 && SDL_MINOR_VESRION >= 0 && SDL_PATCHLEVEL >= 4
 	SDL_SetHint(SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4, "1"); // this is for Windows only
 #endif
 #endif