Path: blob/master/drivers/sdl/SDL_build_config_private.h
10277 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_LINUX_INPUT_H 184#define HAVE_POLL 18586#ifdef __linux__87#define HAVE_INOTIFY 188#define HAVE_INOTIFY_INIT1 189// Don't add these defines, for some reason they mess with C#'s ability90// to use environment variables (see GH-109024)91//#define HAVE_GETENV 192//#define HAVE_SETENV 193//#define HAVE_UNSETENV 194#endif9596#ifdef DBUS_ENABLED97#define HAVE_DBUS_DBUS_H 198#define SDL_USE_LIBDBUS 199// SOWRAP_ENABLED is handled in thirdparty/sdl/core/linux/SDL_dbus.c100#endif101102#ifdef UDEV_ENABLED103#define HAVE_LIBUDEV_H 1104#define SDL_USE_LIBUDEV105#ifdef SOWRAP_ENABLED106#define SDL_UDEV_DYNAMIC "libudev.so.1"107#endif108#endif109110#define SDL_LOADSO_DLOPEN 1111#define SDL_HAPTIC_LINUX 1112#define SDL_TIMER_UNIX 1113#define SDL_JOYSTICK_LINUX 1114#define SDL_INPUT_LINUXEV 1115#define SDL_THREAD_PTHREAD 1116117// MacOS defines118#elif defined(SDL_PLATFORM_MACOS)119120#define SDL_PLATFORM_PRIVATE_NAME "macOS"121#define SDL_PLATFORM_UNIX 1122#define HAVE_STDIO_H 1123#define HAVE_LIBC 1124#define SDL_HAPTIC_IOKIT 1125#define SDL_JOYSTICK_IOKIT 1126#define SDL_JOYSTICK_MFI 1127#define SDL_TIMER_UNIX 1128#define SDL_THREAD_PTHREAD 1129130// Other platforms are not supported (for now)131#else132#error "No SDL build config was found for this platform. Setup one before compiling the engine."133#endif134135#if !defined(HAVE_STDINT_H) && !defined(_STDINT_H_)136#define HAVE_STDINT_H 1137#endif /* !_STDINT_H_ && !HAVE_STDINT_H */138139#ifdef __GNUC__140#define HAVE_GCC_SYNC_LOCK_TEST_AND_SET 1141#endif142143144