From 4c7b2f16e701e1c92d759b322a053842ff3ade15 Mon Sep 17 00:00:00 2001
From: Eidolon <furyhunter600@gmail.com>
Date: Sat, 24 Feb 2024 13:19:22 -0600
Subject: [PATCH] Move MIN_SLEEP_DURATION_MS macros for Apple

These were not defined for macOS despite being necessary.
---
 src/dedicated/i_system.c | 12 ++++++------
 src/sdl/i_system.c       | 12 ++++++------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/dedicated/i_system.c b/src/dedicated/i_system.c
index 13d5d1700..a85b5ebca 100644
--- a/src/dedicated/i_system.c
+++ b/src/dedicated/i_system.c
@@ -39,12 +39,6 @@ typedef LPVOID (WINAPI *p_MapViewOfFile) (HANDLE, DWORD, DWORD, DWORD, SIZE_T);
 #include <ntsecapi.h>
 #undef SystemFunction036
 
-// A little more than the minimum sleep duration on Windows.
-// May be incorrect for other platforms, but we don't currently have a way to
-// query the scheduler granularity. SDL will do what's needed to make this as
-// low as possible though.
-#define MIN_SLEEP_DURATION_MS 2.1
-
 #endif
 #include <stdio.h>
 #include <stdlib.h>
@@ -209,6 +203,12 @@ static char returnWadPath[256];
 
 #define MAX_EXIT_FUNCS 32
 
+// A little more than the minimum sleep duration on Windows.
+// May be incorrect for other platforms, but we don't currently have a way to
+// query the scheduler granularity. SDL will do what's needed to make this as
+// low as possible though.
+#define MIN_SLEEP_DURATION_MS 2.1
+
 UINT8 graphics_started = 0;
 
 UINT8 keyboard_started = 0;
diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c
index 5509f8cab..698710d06 100644
--- a/src/sdl/i_system.c
+++ b/src/sdl/i_system.c
@@ -41,12 +41,6 @@ typedef LPVOID (WINAPI *p_MapViewOfFile) (HANDLE, DWORD, DWORD, DWORD, SIZE_T);
 #include <ntsecapi.h>
 #undef SystemFunction036
 
-// A little more than the minimum sleep duration on Windows.
-// May be incorrect for other platforms, but we don't currently have a way to
-// query the scheduler granularity. SDL will do what's needed to make this as
-// low as possible though.
-#define MIN_SLEEP_DURATION_MS 2.1
-
 #endif
 #include <stdio.h>
 #include <stdlib.h>
@@ -222,6 +216,12 @@ static char returnWadPath[256];
 #include "../byteptr.h"
 #endif
 
+// A little more than the minimum sleep duration on Windows.
+// May be incorrect for other platforms, but we don't currently have a way to
+// query the scheduler granularity. SDL will do what's needed to make this as
+// low as possible though.
+#define MIN_SLEEP_DURATION_MS 2.1
+
 /**	\brief	The JoyReset function
 
 	\param	JoySet	Joystick info to reset
-- 
GitLab