Debian Codegraph @

drivers/sdl/SDL_build_config_private.h

raw symbols SCIP
1 /**************************************************************************/
2 /* SDL_build_config_private.h */
3 /**************************************************************************/
4 /* This file is part of: */
5 /* GODOT ENGINE */
6 /* https://godotengine.org */
7 /**************************************************************************/
8 /* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
9 /* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
10 /* */
11 /* Permission is hereby granted, free of charge, to any person obtaining */
12 /* a copy of this software and associated documentation files (the */
13 /* "Software"), to deal in the Software without restriction, including */
14 /* without limitation the rights to use, copy, modify, merge, publish, */
15 /* distribute, sublicense, and/or sell copies of the Software, and to */
16 /* permit persons to whom the Software is furnished to do so, subject to */
17 /* the following conditions: */
18 /* */
19 /* The above copyright notice and this permission notice shall be */
20 /* included in all copies or substantial portions of the Software. */
21 /* */
22 /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
23 /* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
24 /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
25 /* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
26 /* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
27 /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
28 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
29 /**************************************************************************/
30
31 #pragma once
32
33 #define SDL_build_config_h_
34
35 #include <SDL3/SDL_platform_defines.h>
36
37 #define HAVE_STDARG_H 1
38 #define HAVE_STDDEF_H 1
39
40 // Here we disable SDL subsystems that are not going to be used
41 #define SDL_CPUINFO_DISABLED 1
42 #define SDL_AUDIO_DISABLED 1
43 #define SDL_PROCESS_DUMMY 1
44 #define SDL_LOADSO_DUMMY 1
45 #define SDL_VIDEO_DISABLED 1
46 #define SDL_CAMERA_DISABLED 1
47 #define SDL_DIALOG_DISABLED 1
48 #define SDL_FILESYSTEM_DUMMY 1
49 #define SDL_FSOPS_DUMMY 1
50 #define SDL_GPU_DISABLED 1
51 #define SDL_RENDER_DISABLED 1
52 #define SDL_POWER_DISABLED 1
53 #define SDL_LEAN_AND_MEAN 1
54
55 // Windows defines
56 #if defined(SDL_PLATFORM_WINDOWS)
57
58 #define SDL_PLATFORM_PRIVATE_NAME "Windows"
59 #define HAVE_LIBC 1
60 #define HAVE_DINPUT_H 1
61 #define HAVE_XINPUT_H 1
62 #if defined(_WIN32_MAXVER) && _WIN32_MAXVER >= 0x0A00 /* Windows 10 SDK */
63 #define HAVE_WINDOWS_GAMING_INPUT_H 1
64 #define SDL_JOYSTICK_WGI 1
65 #endif
66 #define SDL_JOYSTICK_DINPUT 1
67 #define SDL_JOYSTICK_HIDAPI 1
68 #define SDL_JOYSTICK_RAWINPUT 1
69 #define SDL_JOYSTICK_XINPUT 1
70 #define SDL_HAPTIC_DINPUT 1
71 #define SDL_THREAD_GENERIC_COND_SUFFIX 1
72 #define SDL_THREAD_GENERIC_RWLOCK_SUFFIX 1
73 #define SDL_THREAD_WINDOWS 1
74 #define SDL_TIMER_WINDOWS 1
75 #define SDL_SENSOR_WINDOWS 1
76
77 // Linux defines
78 #elif defined(SDL_PLATFORM_LINUX)
79
80 #define SDL_PLATFORM_PRIVATE_NAME "Linux"
81 #define SDL_PLATFORM_UNIX 1
82
83 #define HAVE_STDIO_H 1
84 #define HAVE_LIBC 1
85 #define HAVE_LINUX_INPUT_H 1
86 #define HAVE_POLL 1
87
88 #ifdef __linux__
89 #define HAVE_INOTIFY 1
90 #define HAVE_INOTIFY_INIT1 1
91 // Don't add these defines, for some reason they mess with C#'s ability
92 // to use environment variables (see GH-109024)
93 //#define HAVE_GETENV 1
94 //#define HAVE_SETENV 1
95 //#define HAVE_UNSETENV 1
96 #endif
97
98 #ifdef DBUS_ENABLED
99 #define HAVE_DBUS_DBUS_H 1
100 #define SDL_USE_LIBDBUS 1
101 // SOWRAP_ENABLED is handled in thirdparty/sdl/core/linux/SDL_dbus.c
102 #endif
103
104 #ifdef UDEV_ENABLED
105 #define HAVE_LIBUDEV_H 1
106 #define SDL_USE_LIBUDEV
107 #ifdef SOWRAP_ENABLED
108 #define SDL_UDEV_DYNAMIC "libudev.so.1"
109 #endif
110 #endif
111
112 #define SDL_LOADSO_DLOPEN 1
113 #define SDL_HAPTIC_LINUX 1
114 #define SDL_TIMER_UNIX 1
115 #define SDL_JOYSTICK_LINUX 1
116 #define SDL_JOYSTICK_HIDAPI 1
117 #define SDL_INPUT_LINUXEV 1
118 #define SDL_THREAD_PTHREAD 1
119
120 // MacOS defines
121 #elif defined(SDL_PLATFORM_MACOS)
122
123 #define SDL_PLATFORM_PRIVATE_NAME "macOS"
124 #define SDL_PLATFORM_UNIX 1
125 #define HAVE_STDIO_H 1
126 #define HAVE_LIBC 1
127 #define SDL_HAPTIC_IOKIT 1
128 #define SDL_JOYSTICK_IOKIT 1
129 #define SDL_JOYSTICK_MFI 1
130 #define SDL_JOYSTICK_HIDAPI 1
131 #define SDL_TIMER_UNIX 1
132 #define SDL_THREAD_PTHREAD 1
133 #define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1
134
135 // Other platforms are not supported (for now)
136 #else
137 #error "No SDL build config was found for this platform. Setup one before compiling the engine."
138 #endif
139
140 #if !defined(HAVE_STDINT_H) && !defined(_STDINT_H_)
141 #define HAVE_STDINT_H 1
142 #endif /* !_STDINT_H_ && !HAVE_STDINT_H */
143
144 #ifdef __GNUC__
145 #define HAVE_GCC_SYNC_LOCK_TEST_AND_SET 1
146 #endif