Skip to content

Instantly share code, notes, and snippets.

@jnooree
Created November 23, 2021 15:52
Show Gist options
  • Save jnooree/fa5834ffd987ac37af507b570bdc79a2 to your computer and use it in GitHub Desktop.
Save jnooree/fa5834ffd987ac37af507b570bdc79a2 to your computer and use it in GitHub Desktop.
From 0522ef6a89f4202402ea4d6e3602550da89afdb4 Mon Sep 17 00:00:00 2001
From: jnooree <jnooree@snu.ac.kr>
Date: Wed, 24 Nov 2021 00:42:29 +0900
Subject: [PATCH] Fix build error on XCode 13
Resolves usr-sse2#45.
---
src/utils.h | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/utils.h b/src/utils.h
index 4c7c37a..e9ca128 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -1,3 +1,6 @@
+#include <CoreGraphics/CGDirectDisplay.h>
+#include <CoreGraphics/CGDisplayConfiguration.h>
+
#define NSStringFromCGError( value ) \
( \
@{ \
@@ -40,10 +43,10 @@ typedef union
extern "C"
{
-void CGSGetCurrentDisplayMode(CGDirectDisplayID display, int* modeNum);
-void CGSConfigureDisplayMode(CGDisplayConfigRef config, CGDirectDisplayID display, int modeNum);
-void CGSGetNumberOfDisplayModes(CGDirectDisplayID display, int* nModes);
-void CGSGetDisplayModeDescriptionOfLength(CGDirectDisplayID display, int idx, modes_D4* mode, int length);
+extern void CGSGetCurrentDisplayMode(CGDirectDisplayID display, int* modeNum);
+extern void CGSConfigureDisplayMode(CGDisplayConfigRef config, CGDirectDisplayID display, int modeNum);
+extern void CGSGetNumberOfDisplayModes(CGDirectDisplayID display, int* nModes);
+extern void CGSGetDisplayModeDescriptionOfLength(CGDirectDisplayID display, int idx, modes_D4* mode, int length);
};
--
2.34.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment