Add the SDL_GPU API

Project Lead: Evan Hemsley <evan@moonside.games>

Co-designer, Metal Port, Console Ports:

Co-authored-by: Caleb Cornett <caleb.cornett@outlook.com>

Production, QA, Debug:

Co-authored-by: Ethan Lee <flibitijibibo@gmail.com>

SDL_Render Driver, Bugfixes:

Co-authored-by: Andrei Alexeyev <akari@taisei-project.org>

Additional D3D12 Programming, Bugfixes:

Co-authored-by: Bart van der Werf <bluelive@gmail.com>

Bugfixes and Feedback:

Co-authored-by: Zakary Strange <zakarystrange@gmail.com>
Co-authored-by: meyraud705 <meyraud705@gmail.com>
Co-authored-by: Joshua T. Fisher <playmer@gmail.com>
Co-authored-by: Topi Ritala <ritalat@fastmail.com>
Co-authored-by: David Gow <david@ingeniumdigital.com>

Original API Proposal:

Co-authored-by: Ryan C. Gordon <icculus@icculus.org>
This commit is contained in:
cosmonaut 2024-03-18 11:43:23 -07:00 committed by Sam Lantinga
parent 8ddb099d3e
commit 2e7d5bb429
96 changed files with 60218 additions and 66 deletions

View file

@ -39,8 +39,8 @@
#ifndef SDL_hints_h_
#define SDL_hints_h_
#include <SDL3/SDL_stdinc.h>
#include <SDL3/SDL_error.h>
#include <SDL3/SDL_stdinc.h>
#include <SDL3/SDL_begin_code.h>
/* Set up for C function definitions, even when using C++ */
@ -139,7 +139,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_APP_ID "SDL_APP_ID"
#define SDL_HINT_APP_ID "SDL_APP_ID"
/**
* A variable setting the application name.
@ -227,7 +227,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_AUDIO_CATEGORY "SDL_AUDIO_CATEGORY"
#define SDL_HINT_AUDIO_CATEGORY "SDL_AUDIO_CATEGORY"
/**
* A variable controlling the default audio channel count.
@ -473,7 +473,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_AUTO_UPDATE_JOYSTICKS "SDL_AUTO_UPDATE_JOYSTICKS"
#define SDL_HINT_AUTO_UPDATE_JOYSTICKS "SDL_AUTO_UPDATE_JOYSTICKS"
/**
* A variable controlling whether SDL updates sensor state when getting input
@ -488,7 +488,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_AUTO_UPDATE_SENSORS "SDL_AUTO_UPDATE_SENSORS"
#define SDL_HINT_AUTO_UPDATE_SENSORS "SDL_AUTO_UPDATE_SENSORS"
/**
* Prevent SDL from using version 4 of the bitmap header when saving BMPs.
@ -642,7 +642,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_EMSCRIPTEN_ASYNCIFY "SDL_EMSCRIPTEN_ASYNCIFY"
#define SDL_HINT_EMSCRIPTEN_ASYNCIFY "SDL_EMSCRIPTEN_ASYNCIFY"
/**
* Specify the CSS selector used for the "default" window/canvas.
@ -675,7 +675,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT "SDL_EMSCRIPTEN_KEYBOARD_ELEMENT"
#define SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT "SDL_EMSCRIPTEN_KEYBOARD_ELEMENT"
/**
* A variable that controls whether the on-screen keyboard should be shown
@ -733,7 +733,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_EVENT_LOGGING "SDL_EVENT_LOGGING"
#define SDL_HINT_EVENT_LOGGING "SDL_EVENT_LOGGING"
/**
* A variable controlling whether raising the window should be done more
@ -753,7 +753,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_FORCE_RAISEWINDOW "SDL_FORCE_RAISEWINDOW"
#define SDL_HINT_FORCE_RAISEWINDOW "SDL_FORCE_RAISEWINDOW"
/**
* A variable controlling how 3D acceleration is used to accelerate the SDL
@ -774,7 +774,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_FRAMEBUFFER_ACCELERATION "SDL_FRAMEBUFFER_ACCELERATION"
#define SDL_HINT_FRAMEBUFFER_ACCELERATION "SDL_FRAMEBUFFER_ACCELERATION"
/**
* A variable that lets you manually hint extra gamecontroller db entries.
@ -900,7 +900,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_GDK_TEXTINPUT_DEFAULT_TEXT "SDL_GDK_TEXTINPUT_DEFAULT_TEXT"
#define SDL_HINT_GDK_TEXTINPUT_DEFAULT_TEXT "SDL_GDK_TEXTINPUT_DEFAULT_TEXT"
/**
* This variable sets the description of the TextInput window on GDK
@ -1006,6 +1006,20 @@ extern "C" {
*/
#define SDL_HINT_HIDAPI_UDEV "SDL_HIDAPI_UDEV"
/**
* A variable that specifies a GPU backend to use.
*
* By default, SDL will try all available GPU backends in a reasonable order
* until it finds one that can work, but this hint allows the app or user to
* force a specific target, such as "d3d11" if, say, your hardware supports
* D3D12 but want to try using D3D11 instead.
*
* This hint should be set before SDL_GpuSelectBackend() is called.
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_GPU_DRIVER "SDL_GPU_DRIVER"
/**
* A variable to control whether SDL_hid_enumerate() enumerates all HID
* devices or only controllers.
@ -1756,7 +1770,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_JOYSTICK_HIDAPI_XBOX "SDL_JOYSTICK_HIDAPI_XBOX"
#define SDL_HINT_JOYSTICK_HIDAPI_XBOX "SDL_JOYSTICK_HIDAPI_XBOX"
/**
* A variable controlling whether the HIDAPI driver for XBox 360 controllers
@ -1773,7 +1787,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_JOYSTICK_HIDAPI_XBOX_360 "SDL_JOYSTICK_HIDAPI_XBOX_360"
#define SDL_HINT_JOYSTICK_HIDAPI_XBOX_360 "SDL_JOYSTICK_HIDAPI_XBOX_360"
/**
* A variable controlling whether the player LEDs should be lit to indicate
@ -1805,7 +1819,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_WIRELESS "SDL_JOYSTICK_HIDAPI_XBOX_360_WIRELESS"
#define SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_WIRELESS "SDL_JOYSTICK_HIDAPI_XBOX_360_WIRELESS"
/**
* A variable controlling whether the HIDAPI driver for XBox One controllers
@ -1822,7 +1836,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE "SDL_JOYSTICK_HIDAPI_XBOX_ONE"
#define SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE "SDL_JOYSTICK_HIDAPI_XBOX_ONE"
/**
* A variable controlling whether the Home button LED should be turned on when
@ -1967,7 +1981,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_JOYSTICK_RAWINPUT_CORRELATE_XINPUT "SDL_JOYSTICK_RAWINPUT_CORRELATE_XINPUT"
#define SDL_HINT_JOYSTICK_RAWINPUT_CORRELATE_XINPUT "SDL_JOYSTICK_RAWINPUT_CORRELATE_XINPUT"
/**
* A variable controlling whether the ROG Chakram mice should show up as
@ -2182,7 +2196,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_KMSDRM_REQUIRE_DRM_MASTER "SDL_KMSDRM_REQUIRE_DRM_MASTER"
#define SDL_HINT_KMSDRM_REQUIRE_DRM_MASTER "SDL_KMSDRM_REQUIRE_DRM_MASTER"
/**
* A variable controlling the default SDL log levels.
@ -2208,7 +2222,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_LOGGING "SDL_LOGGING"
#define SDL_HINT_LOGGING "SDL_LOGGING"
/**
* A variable controlling whether to force the application to become the
@ -2224,7 +2238,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_MAC_BACKGROUND_APP "SDL_MAC_BACKGROUND_APP"
#define SDL_HINT_MAC_BACKGROUND_APP "SDL_MAC_BACKGROUND_APP"
/**
* A variable that determines whether Ctrl+Click should generate a right-click
@ -2300,7 +2314,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_MOUSE_AUTO_CAPTURE "SDL_MOUSE_AUTO_CAPTURE"
#define SDL_HINT_MOUSE_AUTO_CAPTURE "SDL_MOUSE_AUTO_CAPTURE"
/**
* A variable setting the double click radius, in pixels.
@ -2309,7 +2323,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS "SDL_MOUSE_DOUBLE_CLICK_RADIUS"
#define SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS "SDL_MOUSE_DOUBLE_CLICK_RADIUS"
/**
* A variable setting the double click time, in milliseconds.
@ -2318,7 +2332,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_MOUSE_DOUBLE_CLICK_TIME "SDL_MOUSE_DOUBLE_CLICK_TIME"
#define SDL_HINT_MOUSE_DOUBLE_CLICK_TIME "SDL_MOUSE_DOUBLE_CLICK_TIME"
/**
* A variable controlling whether warping a hidden mouse cursor will activate
@ -2374,7 +2388,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_MOUSE_NORMAL_SPEED_SCALE "SDL_MOUSE_NORMAL_SPEED_SCALE"
#define SDL_HINT_MOUSE_NORMAL_SPEED_SCALE "SDL_MOUSE_NORMAL_SPEED_SCALE"
/**
* A variable controlling whether relative mouse mode constrains the mouse to
@ -2395,7 +2409,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_MOUSE_RELATIVE_MODE_CENTER "SDL_MOUSE_RELATIVE_MODE_CENTER"
#define SDL_HINT_MOUSE_RELATIVE_MODE_CENTER "SDL_MOUSE_RELATIVE_MODE_CENTER"
/**
* A variable controlling whether relative mouse mode is implemented using
@ -2410,7 +2424,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_MOUSE_RELATIVE_MODE_WARP "SDL_MOUSE_RELATIVE_MODE_WARP"
#define SDL_HINT_MOUSE_RELATIVE_MODE_WARP "SDL_MOUSE_RELATIVE_MODE_WARP"
/**
* A variable setting the scale for mouse motion, in floating point, when the
@ -2420,7 +2434,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE "SDL_MOUSE_RELATIVE_SPEED_SCALE"
#define SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE "SDL_MOUSE_RELATIVE_SPEED_SCALE"
/**
* A variable controlling whether the system mouse acceleration curve is used
@ -2439,7 +2453,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_MOUSE_RELATIVE_SYSTEM_SCALE "SDL_MOUSE_RELATIVE_SYSTEM_SCALE"
#define SDL_HINT_MOUSE_RELATIVE_SYSTEM_SCALE "SDL_MOUSE_RELATIVE_SYSTEM_SCALE"
/**
* A variable controlling whether a motion event should be generated for mouse
@ -2458,7 +2472,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_MOUSE_RELATIVE_WARP_MOTION "SDL_MOUSE_RELATIVE_WARP_MOTION"
#define SDL_HINT_MOUSE_RELATIVE_WARP_MOTION "SDL_MOUSE_RELATIVE_WARP_MOTION"
/**
* A variable controlling whether the hardware cursor stays visible when
@ -2476,7 +2490,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_MOUSE_RELATIVE_CURSOR_VISIBLE "SDL_MOUSE_RELATIVE_CURSOR_VISIBLE"
#define SDL_HINT_MOUSE_RELATIVE_CURSOR_VISIBLE "SDL_MOUSE_RELATIVE_CURSOR_VISIBLE"
/**
* Controls how often SDL issues cursor confinement commands to the operating
@ -2493,7 +2507,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_MOUSE_RELATIVE_CLIP_INTERVAL "SDL_MOUSE_RELATIVE_CLIP_INTERVAL"
#define SDL_HINT_MOUSE_RELATIVE_CLIP_INTERVAL "SDL_MOUSE_RELATIVE_CLIP_INTERVAL"
/**
* A variable controlling whether mouse events should generate synthetic touch
@ -2510,7 +2524,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_MOUSE_TOUCH_EVENTS "SDL_MOUSE_TOUCH_EVENTS"
#define SDL_HINT_MOUSE_TOUCH_EVENTS "SDL_MOUSE_TOUCH_EVENTS"
/**
* A variable controlling whether the keyboard should be muted on the console.
@ -2543,7 +2557,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_NO_SIGNAL_HANDLERS "SDL_NO_SIGNAL_HANDLERS"
#define SDL_HINT_NO_SIGNAL_HANDLERS "SDL_NO_SIGNAL_HANDLERS"
/**
* Specify the OpenGL library to load.
@ -2587,7 +2601,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_OPENGL_ES_DRIVER "SDL_OPENGL_ES_DRIVER"
#define SDL_HINT_OPENGL_ES_DRIVER "SDL_OPENGL_ES_DRIVER"
/**
* A variable controlling which orientations are allowed on iOS/Android.
@ -2694,7 +2708,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_RENDER_DIRECT3D11_DEBUG "SDL_RENDER_DIRECT3D11_DEBUG"
#define SDL_HINT_RENDER_DIRECT3D11_DEBUG "SDL_RENDER_DIRECT3D11_DEBUG"
/**
* A variable controlling whether to enable Vulkan Validation Layers.
@ -2708,7 +2722,35 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_RENDER_VULKAN_DEBUG "SDL_RENDER_VULKAN_DEBUG"
#define SDL_HINT_RENDER_VULKAN_DEBUG "SDL_RENDER_VULKAN_DEBUG"
/**
* A variable controlling whether to create the GPU device in debug mode.
*
* This variable can be set to the following values:
*
* - "0": Disable debug mode use (default)
* - "1": Enable debug mode use
*
* This hint should be set before creating a renderer.
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_RENDER_GPU_DEBUG "SDL_RENDER_GPU_DEBUG"
/**
* A variable controlling whether to prefer a low-power GPU on multi-GPU systems.
*
* This variable can be set to the following values:
*
* - "0": Prefer high-performance GPU (default)
* - "1": Prefer low-power GPU
*
* This hint should be set before creating a renderer.
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_RENDER_GPU_LOW_POWER "SDL_RENDER_GPU_LOW_POWER"
/**
* A variable specifying which render driver to use.
@ -2736,7 +2778,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_RENDER_DRIVER "SDL_RENDER_DRIVER"
#define SDL_HINT_RENDER_DRIVER "SDL_RENDER_DRIVER"
/**
* A variable controlling how the 2D render API renders lines.
@ -2786,7 +2828,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_RENDER_VSYNC "SDL_RENDER_VSYNC"
#define SDL_HINT_RENDER_VSYNC "SDL_RENDER_VSYNC"
/**
* A variable to control whether the return key on the soft keyboard should
@ -2854,7 +2896,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_RPI_VIDEO_LAYER "SDL_RPI_VIDEO_LAYER"
#define SDL_HINT_RPI_VIDEO_LAYER "SDL_RPI_VIDEO_LAYER"
/**
* Specify an "activity name" for screensaver inhibition.
@ -2975,7 +3017,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_THREAD_PRIORITY_POLICY "SDL_THREAD_PRIORITY_POLICY"
#define SDL_HINT_THREAD_PRIORITY_POLICY "SDL_THREAD_PRIORITY_POLICY"
/**
* A variable that controls the timer resolution, in milliseconds.
@ -3010,7 +3052,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_TOUCH_MOUSE_EVENTS "SDL_TOUCH_MOUSE_EVENTS"
#define SDL_HINT_TOUCH_MOUSE_EVENTS "SDL_TOUCH_MOUSE_EVENTS"
/**
* A variable controlling whether trackpads should be treated as touch
@ -3060,7 +3102,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_VIDEO_ALLOW_SCREENSAVER "SDL_VIDEO_ALLOW_SCREENSAVER"
#define SDL_HINT_VIDEO_ALLOW_SCREENSAVER "SDL_VIDEO_ALLOW_SCREENSAVER"
/**
* Tell the video driver that we only want a double buffer.
@ -3083,7 +3125,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_VIDEO_DOUBLE_BUFFER "SDL_VIDEO_DOUBLE_BUFFER"
#define SDL_HINT_VIDEO_DOUBLE_BUFFER "SDL_VIDEO_DOUBLE_BUFFER"
/**
* A variable that specifies a video backend to use.
@ -3158,7 +3200,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES "SDL_VIDEO_MAC_FULLSCREEN_SPACES"
#define SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES "SDL_VIDEO_MAC_FULLSCREEN_SPACES"
/**
* A variable controlling whether fullscreen windows are minimized when they
@ -3174,7 +3216,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS"
#define SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS"
/**
* A variable controlling whether the offscreen video driver saves output
@ -3356,7 +3398,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_VIDEO_WIN_D3DCOMPILER "SDL_VIDEO_WIN_D3DCOMPILER"
#define SDL_HINT_VIDEO_WIN_D3DCOMPILER "SDL_VIDEO_WIN_D3DCOMPILER"
/**
* A variable controlling whether the X11 _NET_WM_BYPASS_COMPOSITOR hint
@ -3390,7 +3432,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_VIDEO_X11_NET_WM_PING "SDL_VIDEO_X11_NET_WM_PING"
#define SDL_HINT_VIDEO_X11_NET_WM_PING "SDL_VIDEO_X11_NET_WM_PING"
/**
* A variable controlling whether SDL uses DirectColor visuals.
@ -3415,7 +3457,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_VIDEO_X11_SCALING_FACTOR "SDL_VIDEO_X11_SCALING_FACTOR"
#define SDL_HINT_VIDEO_X11_SCALING_FACTOR "SDL_VIDEO_X11_SCALING_FACTOR"
/**
* A variable forcing the visual ID used for X11 display modes.
@ -3433,7 +3475,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_VIDEO_X11_WINDOW_VISUALID "SDL_VIDEO_X11_WINDOW_VISUALID"
#define SDL_HINT_VIDEO_X11_WINDOW_VISUALID "SDL_VIDEO_X11_WINDOW_VISUALID"
/**
* A variable controlling whether the X11 XRandR extension should be used.
@ -3447,7 +3489,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_VIDEO_X11_XRANDR "SDL_VIDEO_X11_XRANDR"
#define SDL_HINT_VIDEO_X11_XRANDR "SDL_VIDEO_X11_XRANDR"
/**
* A variable controlling whether touch should be enabled on the back panel of
@ -3547,7 +3589,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_VITA_TOUCH_MOUSE_DEVICE "SDL_VITA_TOUCH_MOUSE_DEVICE"
#define SDL_HINT_VITA_TOUCH_MOUSE_DEVICE "SDL_VITA_TOUCH_MOUSE_DEVICE"
/**
* A variable overriding the display index used in SDL_Vulkan_CreateSurface()
@ -3600,7 +3642,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_WAVE_FACT_CHUNK "SDL_WAVE_FACT_CHUNK"
#define SDL_HINT_WAVE_FACT_CHUNK "SDL_WAVE_FACT_CHUNK"
/**
* A variable controlling the maximum number of chunks in a WAVE file.
@ -3612,7 +3654,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_WAVE_CHUNK_LIMIT "SDL_WAVE_CHUNK_LIMIT"
#define SDL_HINT_WAVE_CHUNK_LIMIT "SDL_WAVE_CHUNK_LIMIT"
/**
* A variable controlling how the size of the RIFF chunk affects the loading
@ -3640,7 +3682,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_WAVE_RIFF_CHUNK_SIZE "SDL_WAVE_RIFF_CHUNK_SIZE"
#define SDL_HINT_WAVE_RIFF_CHUNK_SIZE "SDL_WAVE_RIFF_CHUNK_SIZE"
/**
* A variable controlling how a truncated WAVE file is handled.
@ -3660,7 +3702,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_WAVE_TRUNCATION "SDL_WAVE_TRUNCATION"
#define SDL_HINT_WAVE_TRUNCATION "SDL_WAVE_TRUNCATION"
/**
* A variable controlling whether the window is activated when the
@ -3677,7 +3719,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_WINDOW_ACTIVATE_WHEN_RAISED "SDL_WINDOW_ACTIVATE_WHEN_RAISED"
#define SDL_HINT_WINDOW_ACTIVATE_WHEN_RAISED "SDL_WINDOW_ACTIVATE_WHEN_RAISED"
/**
* A variable controlling whether the window is activated when the
@ -3694,7 +3736,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_WINDOW_ACTIVATE_WHEN_SHOWN "SDL_WINDOW_ACTIVATE_WHEN_SHOWN"
#define SDL_HINT_WINDOW_ACTIVATE_WHEN_SHOWN "SDL_WINDOW_ACTIVATE_WHEN_SHOWN"
/**
* If set to "0" then never set the top-most flag on an SDL Window even if the
@ -3728,7 +3770,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN "SDL_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN"
#define SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN "SDL_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN"
/**
* A variable controlling whether SDL generates window-close events for Alt+F4
@ -3818,7 +3860,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_WINDOWS_RAW_KEYBOARD "SDL_WINDOWS_RAW_KEYBOARD"
#define SDL_HINT_WINDOWS_RAW_KEYBOARD "SDL_WINDOWS_RAW_KEYBOARD"
/**
* A variable controlling whether SDL uses Kernel Semaphores on Windows.
@ -4109,7 +4151,6 @@ typedef enum SDL_HintPriority
SDL_HINT_OVERRIDE
} SDL_HintPriority;
/**
* Set a hint with a specific priority.
*
@ -4208,7 +4249,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_ResetHints(void);
* \sa SDL_SetHint
* \sa SDL_SetHintWithPriority
*/
extern SDL_DECLSPEC const char * SDLCALL SDL_GetHint(const char *name);
extern SDL_DECLSPEC const char *SDLCALL SDL_GetHint(const char *name);
/**
* Get the boolean value of a hint variable.
@ -4246,7 +4287,7 @@ extern SDL_DECLSPEC SDL_bool SDLCALL SDL_GetHintBoolean(const char *name, SDL_bo
*
* \sa SDL_AddHintCallback
*/
typedef void (SDLCALL *SDL_HintCallback)(void *userdata, const char *name, const char *oldValue, const char *newValue);
typedef void(SDLCALL *SDL_HintCallback)(void *userdata, const char *name, const char *oldValue, const char *newValue);
/**
* Add a function to watch a particular hint.