History

SDL 2.24.0 #ifdef fixes

Olav Sørensen committed 4 years ago

Commit 4a6e1091 parent ba8d4ea3 files · +3 −3Browse files

Unified · Split

3 files
  1. src/ft2_main.c +1 −1
  2. src/ft2_sampling.c +1 −1
  3. src/ft2_video.c +1 −1
src/ft2_main.c+1−1
@@ -96,7 +96,7 @@ int main(int argc, char *argv[]) · 95 unmodified lines
9696 #ifdef _WIN32
9797
9898 // ALT+F4 is used in FT2, but is "close program" in Windows...
99−#if SDL_MAJOR_VERSION == 2 && SDL_MINOR_VERSION >= 0 && SDL_PATCHLEVEL >= 4
99+#if SDL_MINOR_VERSION >= 24 || (SDL_MINOR_VERSION == 0 && SDL_PATCHLEVEL >= 4)
100100 SDL_SetHint(SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4, "1");
101101 #endif
102102
src/ft2_sampling.c+1−1
@@ -325,7 +325,7 @@ void handleSamplingUpdates(void) · 324 unmodified lines
325325
326326 void startSampling(void)
327327 {
328−#if SDL_PATCHLEVEL < 5
328+#if SDL_MAJOR_VERSION == 2 && SDL_MINOR_VERSION == 0 && SDL_PATCHLEVEL < 5
329329 okBox(0, "System message", "This program needs to be compiled with SDL 2.0.5 or later to support audio sampling.");
330330 return;
331331 #else
src/ft2_video.c+1−1
@@ -1016,7 +1016,7 @@ bool setupRenderer(void) · 1015 unmodified lines
10161016
10171017 SDL_RenderSetLogicalSize(video.renderer, SCREEN_W, SCREEN_H);
10181018
1019−#if SDL_PATCHLEVEL >= 5
1019+#if SDL_MINOR_VERSION >= 24 || (SDL_MINOR_VERSION == 0 && SDL_PATCHLEVEL >= 5)
10201020 SDL_RenderSetIntegerScale(video.renderer, SDL_TRUE);
10211021 #endif
10221022

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t