Path: blob/master/drivers/sdl/SDL_build_config_private.h
11352 views
/**************************************************************************/1/* SDL_build_config_private.h */2/**************************************************************************/3/* This file is part of: */4/* GODOT ENGINE */5/* https://godotengine.org */6/**************************************************************************/7/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */8/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */9/* */10/* Permission is hereby granted, free of charge, to any person obtaining */11/* a copy of this software and associated documentation files (the */12/* "Software"), to deal in the Software without restriction, including */13/* without limitation the rights to use, copy, modify, merge, publish, */14/* distribute, sublicense, and/or sell copies of the Software, and to */15/* permit persons to whom the Software is furnished to do so, subject to */16/* the following conditions: */17/* */18/* The above copyright notice and this permission notice shall be */19/* included in all copies or substantial portions of the Software. */20/* */21/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */22/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */23/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */24/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */25/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */26/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */27/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */28/**************************************************************************/2930#pragma once3132#define SDL_build_config_h_3334#include <SDL3/SDL_platform_defines.h>3536#define HAVE_STDARG_H 137#define HAVE_STDDEF_H 13839// Here we disable SDL subsystems that are not going to be used40#define SDL_CPUINFO_DISABLED 141#define SDL_AUDIO_DISABLED 142#define SDL_PROCESS_DUMMY 143#define SDL_LOADSO_DUMMY 144#define SDL_VIDEO_DISABLED 145#define SDL_CAMERA_DISABLED 146#define SDL_DIALOG_DISABLED 147#define SDL_FILESYSTEM_DUMMY 148#define SDL_FSOPS_DUMMY 149#define SDL_SENSOR_DISABLED 150#define SDL_GPU_DISABLED 151#define SDL_RENDER_DISABLED 152#define SDL_POWER_DISABLED 153#define SDL_LEAN_AND_MEAN 15455// Windows defines56#if defined(SDL_PLATFORM_WINDOWS)5758#define SDL_PLATFORM_PRIVATE_NAME "Windows"59#define HAVE_LIBC 160#define HAVE_DINPUT_H 161#define HAVE_XINPUT_H 162#if defined(_WIN32_MAXVER) && _WIN32_MAXVER >= 0x0A00 /* Windows 10 SDK */63#define HAVE_WINDOWS_GAMING_INPUT_H 164#define SDL_JOYSTICK_WGI 165#endif66#define SDL_JOYSTICK_DINPUT 167#define SDL_JOYSTICK_HIDAPI 168#define SDL_JOYSTICK_RAWINPUT 169#define SDL_JOYSTICK_XINPUT 170#define SDL_HAPTIC_DINPUT 171#define SDL_THREAD_GENERIC_COND_SUFFIX 172#define SDL_THREAD_GENERIC_RWLOCK_SUFFIX 173#define SDL_THREAD_WINDOWS 174#define SDL_TIMER_WINDOWS 17576// Linux defines77#elif defined(SDL_PLATFORM_LINUX)7879#define SDL_PLATFORM_PRIVATE_NAME "Linux"80#define SDL_PLATFORM_UNIX 18182#define HAVE_STDIO_H 183#define HAVE_LIBC 184#define HAVE_LINUX_INPUT_H 185#define HAVE_POLL 18687#ifdef __linux__88#define HAVE_INOTIFY 189#define HAVE_INOTIFY_INIT1 190// Don't add these defines, for some reason they mess with C#'s ability91// to use environment variables (see GH-109024)92//#define HAVE_GETENV 193//#define HAVE_SETENV 194//#define HAVE_UNSETENV 195#endif9697#ifdef DBUS_ENABLED98#define HAVE_DBUS_DBUS_H 199#define SDL_USE_LIBDBUS 1100// SOWRAP_ENABLED is handled in thirdparty/sdl/core/linux/SDL_dbus.c101#endif102103#ifdef UDEV_ENABLED104#define HAVE_LIBUDEV_H 1105#define SDL_USE_LIBUDEV106#ifdef SOWRAP_ENABLED107#define SDL_UDEV_DYNAMIC "libudev.so.1"108#endif109#endif110111#define SDL_LOADSO_DLOPEN 1112#define SDL_HAPTIC_LINUX 1113#define SDL_TIMER_UNIX 1114#define SDL_JOYSTICK_LINUX 1115#define SDL_INPUT_LINUXEV 1116#define SDL_THREAD_PTHREAD 1117118// MacOS defines119#elif defined(SDL_PLATFORM_MACOS)120121#define SDL_PLATFORM_PRIVATE_NAME "macOS"122#define SDL_PLATFORM_UNIX 1123#define HAVE_STDIO_H 1124#define HAVE_LIBC 1125#define SDL_HAPTIC_IOKIT 1126#define SDL_JOYSTICK_IOKIT 1127#define SDL_JOYSTICK_MFI 1128#define SDL_TIMER_UNIX 1129#define SDL_THREAD_PTHREAD 1130131// Other platforms are not supported (for now)132#else133#error "No SDL build config was found for this platform. Setup one before compiling the engine."134#endif135136#if !defined(HAVE_STDINT_H) && !defined(_STDINT_H_)137#define HAVE_STDINT_H 1138#endif /* !_STDINT_H_ && !HAVE_STDINT_H */139140#ifdef __GNUC__141#define HAVE_GCC_SYNC_LOCK_TEST_AND_SET 1142#endif143144145