Commit ccb06296b94828c86dfa2d3f0f319e97bcfbc0f1

Ozkan Sezer 2021-08-19T03:15:02

SDL_windowsevents.c: fix build against older SDKs.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/src/video/windows/SDL_windowsevents.c b/src/video/windows/SDL_windowsevents.c
index 6f4b5af..5370631 100644
--- a/src/video/windows/SDL_windowsevents.c
+++ b/src/video/windows/SDL_windowsevents.c
@@ -81,6 +81,16 @@
 #define WM_UNICHAR 0x0109
 #endif
 
+#ifndef IS_HIGH_SURROGATE
+#define IS_HIGH_SURROGATE(x)   (((x) >= 0xd800) && ((x) <= 0xdbff))
+#endif
+#ifndef IS_LOW_SURROGATE
+#define IS_LOW_SURROGATE(x)    (((x) >= 0xdc00) && ((x) <= 0xdfff))
+#endif
+#ifndef IS_SURROGATE_PAIR
+#define IS_SURROGATE_PAIR(h,l) (IS_HIGH_SURROGATE(h) && IS_LOW_SURROGATE(l))
+#endif
+
 static SDL_Scancode
 VKeytoScancodeFallback(WPARAM vkey)
 {