blob: 4c01c8cd0dbba6a48e8df6560ab662c382a4f184 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
From e9daf03769d8408719c1b420a133155cb700b9a2 Mon Sep 17 00:00:00 2001
From: James Le Cuirot <chewi@gentoo.org>
Date: Sun, 25 Jun 2023 15:16:55 +0100
Subject: [PATCH] Skip SDL OpenGL build check when the SDL2 wrapper is detected
The wrapper does not define SDL_VIDEO_OPENGL in SDL_config.h. This
appears to be deliberate, although it's not entirely clear why.
/* Don't define most of the SDL backends, under the assumption checking for these against the headers won't work anyhow.
The exception is the X11 backend; you need its define to know if you can use its syswm interface. */
We could check SDL2's SDL_config.h instead, but that seems awkward to
pull off.
Closes: https://github.com/dxx-rebirth/dxx-rebirth/issues/689
---
SConstruct | 2 ++
1 file changed, 2 insertions(+)
diff --git a/SConstruct b/SConstruct
index c98a22bc8..59210a802 100644
--- a/SConstruct
+++ b/SConstruct
@@ -1586,9 +1586,11 @@ static void terminate_handler()
init_cdrom = '0' if sdl2 else 'SDL_INIT_CDROM'
error_text_opengl_mismatch = f'Rebirth configured with OpenGL enabled, but SDL{sdl2} configured with OpenGL disabled. Disable Rebirth OpenGL or install an SDL{sdl2} with OpenGL enabled.'
test_opengl = (f'''
+#if !((SDL_MAJOR_VERSION == 1) && (SDL_MINOR_VERSION == 2) && (SDL_PATCHLEVEL >= 50))
#ifndef SDL_VIDEO_OPENGL
#error "{error_text_opengl_mismatch}"
#endif
+#endif
''') if user_settings.opengl else ''
main = '''
SDL_RWops *ops = reinterpret_cast<SDL_RWops *>(argv);
--
2.40.1
|