]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Check macOS version < 12 to use old function name
authorCloudwalk <cloudwalk@icculus.org>
Tue, 23 Aug 2022 19:05:08 +0000 (15:05 -0400)
committerCloudwalk <cloudwalk@icculus.org>
Tue, 23 Aug 2022 19:05:08 +0000 (15:05 -0400)
Fixes building on macOS < 12

vid_sdl.c

index 1ddf7a399fce5a24096da6b3d4d5540f21250de9..5845e07356c1a3342641b5ccef32be31d4cb86d2 100644 (file)
--- a/vid_sdl.c
+++ b/vid_sdl.c
@@ -30,6 +30,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #include <IOKit/hidsystem/IOHIDLib.h>
 #include <IOKit/hidsystem/IOHIDParameter.h>
 #include <IOKit/hidsystem/event_status_driver.h>
+#if (MAC_OS_X_VERSION_MIN_REQUIRED < 120000)
+       #define IOMainPort IOMasterPort
+#endif
 static cvar_t apple_mouse_noaccel = {CF_CLIENT | CF_ARCHIVE, "apple_mouse_noaccel", "1", "disables mouse acceleration while DarkPlaces is active"};
 static qbool vid_usingnoaccel;
 static double originalMouseSpeed = -1.0;