shithub: ft²

Download patch

ref: 4a6e109565ce98bc7b79eccfda434fef23a9bb1a
parent: ba8d4ea83a668289d1a55d67148c0de1c389dbd5
author: Olav Sørensen <olav.sorensen@live.no>
date: Mon Sep 19 20:03:13 EDT 2022

SDL 2.24.0 #ifdef fixes

--- a/src/ft2_main.c
+++ b/src/ft2_main.c
@@ -96,7 +96,7 @@
 #ifdef _WIN32
 
 	// ALT+F4 is used in FT2, but is "close program" in Windows...
-#if SDL_MAJOR_VERSION == 2 && SDL_MINOR_VERSION >= 0 && SDL_PATCHLEVEL >= 4
+#if SDL_MINOR_VERSION >= 24 || (SDL_MINOR_VERSION == 0 && SDL_PATCHLEVEL >= 4)
 	SDL_SetHint(SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4, "1");
 #endif
 
--- a/src/ft2_sampling.c
+++ b/src/ft2_sampling.c
@@ -325,7 +325,7 @@
 
 void startSampling(void)
 {
-#if SDL_PATCHLEVEL < 5
+#if SDL_MAJOR_VERSION == 2 && SDL_MINOR_VERSION == 0 && SDL_PATCHLEVEL < 5
 	okBox(0, "System message", "This program needs to be compiled with SDL 2.0.5 or later to support audio sampling.");
 	return;
 #else
--- a/src/ft2_video.c
+++ b/src/ft2_video.c
@@ -1016,7 +1016,7 @@
 
 	SDL_RenderSetLogicalSize(video.renderer, SCREEN_W, SCREEN_H);
 
-#if SDL_PATCHLEVEL >= 5
+#if SDL_MINOR_VERSION >= 24 || (SDL_MINOR_VERSION == 0 && SDL_PATCHLEVEL >= 5)
 	SDL_RenderSetIntegerScale(video.renderer, SDL_TRUE);
 #endif