| 1 | /* |
| 2 | Simple DirectMedia Layer |
| 3 | Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org> |
| 4 | |
| 5 | This software is provided 'as-is', without any express or implied |
| 6 | warranty. In no event will the authors be held liable for any damages |
| 7 | arising from the use of this software. |
| 8 | |
| 9 | Permission is granted to anyone to use this software for any purpose, |
| 10 | including commercial applications, and to alter it and redistribute it |
| 11 | freely, subject to the following restrictions: |
| 12 | |
| 13 | 1. The origin of this software must not be misrepresented; you must not |
| 14 | claim that you wrote the original software. If you use this software |
| 15 | in a product, an acknowledgment in the product documentation would be |
| 16 | appreciated but is not required. |
| 17 | 2. Altered source versions must be plainly marked as such, and must not be |
| 18 | misrepresented as being the original software. |
| 19 | 3. This notice may not be removed or altered from any source distribution. |
| 20 | */ |
| 21 | |
| 22 | /** |
| 23 | * # CategoryHints |
| 24 | * |
| 25 | * Official documentation for SDL configuration variables |
| 26 | * |
| 27 | * This file contains functions to set and get configuration hints, as well as |
| 28 | * listing each of them alphabetically. |
| 29 | * |
| 30 | * The convention for naming hints is SDL_HINT_X, where "SDL_X" is the |
| 31 | * environment variable that can be used to override the default. |
| 32 | * |
| 33 | * In general these hints are just that - they may or may not be supported or |
| 34 | * applicable on any given platform, but they provide a way for an application |
| 35 | * or user to give the library a hint as to how they would like the library to |
| 36 | * work. |
| 37 | */ |
| 38 | |
| 39 | #ifndef SDL_hints_h_ |
| 40 | #define SDL_hints_h_ |
| 41 | |
| 42 | #include "SDL_stdinc.h" |
| 43 | |
| 44 | #include "begin_code.h" |
| 45 | /* Set up for C function definitions, even when using C++ */ |
| 46 | #ifdef __cplusplus |
| 47 | extern "C" { |
| 48 | #endif |
| 49 | |
| 50 | /** |
| 51 | * A variable controlling whether the Android / iOS built-in accelerometer |
| 52 | * should be listed as a joystick device. |
| 53 | * |
| 54 | * This variable can be set to the following values: |
| 55 | * |
| 56 | * - "0": The accelerometer is not listed as a joystick |
| 57 | * - "1": The accelerometer is available as a 3 axis joystick (the default). |
| 58 | */ |
| 59 | #define SDL_HINT_ACCELEROMETER_AS_JOYSTICK "SDL_ACCELEROMETER_AS_JOYSTICK" |
| 60 | |
| 61 | /** |
| 62 | * Specify the behavior of Alt+Tab while the keyboard is grabbed. |
| 63 | * |
| 64 | * By default, SDL emulates Alt+Tab functionality while the keyboard is |
| 65 | * grabbed and your window is full-screen. This prevents the user from getting |
| 66 | * stuck in your application if you've enabled keyboard grab. |
| 67 | * |
| 68 | * The variable can be set to the following values: |
| 69 | * |
| 70 | * - "0": SDL will not handle Alt+Tab. Your application is responsible for |
| 71 | * handling Alt+Tab while the keyboard is grabbed. |
| 72 | * - "1": SDL will minimize your window when Alt+Tab is pressed (default) |
| 73 | */ |
| 74 | #define SDL_HINT_ALLOW_ALT_TAB_WHILE_GRABBED "SDL_ALLOW_ALT_TAB_WHILE_GRABBED" |
| 75 | |
| 76 | /** |
| 77 | * If set to "0" then never set the top most bit on a SDL Window, even if the |
| 78 | * video mode expects it. |
| 79 | * |
| 80 | * This is a debugging aid for developers and not expected to be used by end |
| 81 | * users. The default is "1" |
| 82 | * |
| 83 | * This variable can be set to the following values: |
| 84 | * |
| 85 | * - "0": don't allow topmost |
| 86 | * - "1": allow topmost |
| 87 | */ |
| 88 | #define SDL_HINT_ALLOW_TOPMOST "SDL_ALLOW_TOPMOST" |
| 89 | |
| 90 | /** |
| 91 | * Android APK expansion main file version. |
| 92 | * |
| 93 | * Should be a string number like "1", "2" etc. |
| 94 | * |
| 95 | * Must be set together with |
| 96 | * SDL_HINT_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION. |
| 97 | * |
| 98 | * If both hints were set then SDL_RWFromFile() will look into expansion files |
| 99 | * after a given relative path was not found in the internal storage and |
| 100 | * assets. |
| 101 | * |
| 102 | * By default this hint is not set and the APK expansion files are not |
| 103 | * searched. |
| 104 | */ |
| 105 | #define SDL_HINT_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION "SDL_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION" |
| 106 | |
| 107 | /** |
| 108 | * Android APK expansion patch file version. |
| 109 | * |
| 110 | * Should be a string number like "1", "2" etc. |
| 111 | * |
| 112 | * Must be set together with SDL_HINT_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION. |
| 113 | * |
| 114 | * If both hints were set then SDL_RWFromFile() will look into expansion files |
| 115 | * after a given relative path was not found in the internal storage and |
| 116 | * assets. |
| 117 | * |
| 118 | * By default this hint is not set and the APK expansion files are not |
| 119 | * searched. |
| 120 | */ |
| 121 | #define SDL_HINT_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION "SDL_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION" |
| 122 | |
| 123 | /** |
| 124 | * A variable to control whether the event loop will block itself when the app |
| 125 | * is paused. |
| 126 | * |
| 127 | * The variable can be set to the following values: |
| 128 | * |
| 129 | * - "0": Non blocking. |
| 130 | * - "1": Blocking. (default) |
| 131 | * |
| 132 | * The value should be set before SDL is initialized. |
| 133 | */ |
| 134 | #define SDL_HINT_ANDROID_BLOCK_ON_PAUSE "SDL_ANDROID_BLOCK_ON_PAUSE" |
| 135 | |
| 136 | /** |
| 137 | * A variable to control whether SDL will pause audio in background (Requires |
| 138 | * SDL_ANDROID_BLOCK_ON_PAUSE as "Non blocking") |
| 139 | * |
| 140 | * The variable can be set to the following values: |
| 141 | * |
| 142 | * - "0": Non paused. |
| 143 | * - "1": Paused. (default) |
| 144 | * |
| 145 | * The value should be set before SDL is initialized. |
| 146 | */ |
| 147 | #define SDL_HINT_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO "SDL_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO" |
| 148 | |
| 149 | /** |
| 150 | * A variable to control whether we trap the Android back button to handle it |
| 151 | * manually. |
| 152 | * |
| 153 | * This is necessary for the right mouse button to work on some Android |
| 154 | * devices, or to be able to trap the back button for use in your code |
| 155 | * reliably. If set to true, the back button will show up as an SDL_KEYDOWN / |
| 156 | * SDL_KEYUP pair with a keycode of SDL_SCANCODE_AC_BACK. |
| 157 | * |
| 158 | * The variable can be set to the following values: |
| 159 | * |
| 160 | * - "0": Back button will be handled as usual for system. (default) |
| 161 | * - "1": Back button will be trapped, allowing you to handle the key press |
| 162 | * manually. (This will also let right mouse click work on systems where the |
| 163 | * right mouse button functions as back.) |
| 164 | * |
| 165 | * The value of this hint is used at runtime, so it can be changed at any |
| 166 | * time. |
| 167 | */ |
| 168 | #define SDL_HINT_ANDROID_TRAP_BACK_BUTTON "SDL_ANDROID_TRAP_BACK_BUTTON" |
| 169 | |
| 170 | /** |
| 171 | * Specify an application name. |
| 172 | * |
| 173 | * This hint lets you specify the application name sent to the OS when |
| 174 | * required. For example, this will often appear in volume control applets for |
| 175 | * audio streams, and in lists of applications which are inhibiting the |
| 176 | * screensaver. You should use a string that describes your program ("My Game |
| 177 | * 2: The Revenge") |
| 178 | * |
| 179 | * Setting this to "" or leaving it unset will have SDL use a reasonable |
| 180 | * default: probably the application's name or "SDL Application" if SDL |
| 181 | * doesn't have any better information. |
| 182 | * |
| 183 | * Note that, for audio streams, this can be overridden with |
| 184 | * SDL_HINT_AUDIO_DEVICE_APP_NAME. |
| 185 | * |
| 186 | * On targets where this is not supported, this hint does nothing. |
| 187 | */ |
| 188 | #define SDL_HINT_APP_NAME "SDL_APP_NAME" |
| 189 | |
| 190 | /** |
| 191 | * A variable controlling whether controllers used with the Apple TV generate |
| 192 | * UI events. |
| 193 | * |
| 194 | * When UI events are generated by controller input, the app will be |
| 195 | * backgrounded when the Apple TV remote's menu button is pressed, and when |
| 196 | * the pause or B buttons on gamepads are pressed. |
| 197 | * |
| 198 | * More information about properly making use of controllers for the Apple TV |
| 199 | * can be found here: |
| 200 | * https://developer.apple.com/tvos/human-interface-guidelines/remote-and-controllers/ |
| 201 | * |
| 202 | * This variable can be set to the following values: |
| 203 | * |
| 204 | * - "0": Controller input does not generate UI events (the default). |
| 205 | * - "1": Controller input generates UI events. |
| 206 | */ |
| 207 | #define SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS "SDL_APPLE_TV_CONTROLLER_UI_EVENTS" |
| 208 | |
| 209 | /** |
| 210 | * A variable controlling whether the Apple TV remote's joystick axes will |
| 211 | * automatically match the rotation of the remote. |
| 212 | * |
| 213 | * This variable can be set to the following values: |
| 214 | * |
| 215 | * - "0": Remote orientation does not affect joystick axes (the default). |
| 216 | * - "1": Joystick axes are based on the orientation of the remote. |
| 217 | */ |
| 218 | #define SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION "SDL_APPLE_TV_REMOTE_ALLOW_ROTATION" |
| 219 | |
| 220 | /** |
| 221 | * A variable controlling the audio category on iOS and Mac OS X |
| 222 | * |
| 223 | * This variable can be set to the following values: |
| 224 | * |
| 225 | * - "ambient": Use the AVAudioSessionCategoryAmbient audio category, will be |
| 226 | * muted by the phone mute switch (default) |
| 227 | * - "playback": Use the AVAudioSessionCategoryPlayback category |
| 228 | * |
| 229 | * For more information, see Apple's documentation: |
| 230 | * https://developer.apple.com/library/content/documentation/Audio/Conceptual/AudioSessionProgrammingGuide/AudioSessionCategoriesandModes/AudioSessionCategoriesandModes.html |
| 231 | */ |
| 232 | #define SDL_HINT_AUDIO_CATEGORY "SDL_AUDIO_CATEGORY" |
| 233 | |
| 234 | /** |
| 235 | * Specify an application name for an audio device. |
| 236 | * |
| 237 | * Some audio backends (such as PulseAudio) allow you to describe your audio |
| 238 | * stream. Among other things, this description might show up in a system |
| 239 | * control panel that lets the user adjust the volume on specific audio |
| 240 | * streams instead of using one giant master volume slider. |
| 241 | * |
| 242 | * This hints lets you transmit that information to the OS. The contents of |
| 243 | * this hint are used while opening an audio device. You should use a string |
| 244 | * that describes your program ("My Game 2: The Revenge") |
| 245 | * |
| 246 | * Setting this to "" or leaving it unset will have SDL use a reasonable |
| 247 | * default: this will be the name set with SDL_HINT_APP_NAME, if that hint is |
| 248 | * set. Otherwise, it'll probably the application's name or "SDL Application" |
| 249 | * if SDL doesn't have any better information. |
| 250 | * |
| 251 | * On targets where this is not supported, this hint does nothing. |
| 252 | */ |
| 253 | #define SDL_HINT_AUDIO_DEVICE_APP_NAME "SDL_AUDIO_DEVICE_APP_NAME" |
| 254 | |
| 255 | /** |
| 256 | * Specify an application name for an audio device. |
| 257 | * |
| 258 | * Some audio backends (such as PulseAudio) allow you to describe your audio |
| 259 | * stream. Among other things, this description might show up in a system |
| 260 | * control panel that lets the user adjust the volume on specific audio |
| 261 | * streams instead of using one giant master volume slider. |
| 262 | * |
| 263 | * This hints lets you transmit that information to the OS. The contents of |
| 264 | * this hint are used while opening an audio device. You should use a string |
| 265 | * that describes your what your program is playing ("audio stream" is |
| 266 | * probably sufficient in many cases, but this could be useful for something |
| 267 | * like "team chat" if you have a headset playing VoIP audio separately). |
| 268 | * |
| 269 | * Setting this to "" or leaving it unset will have SDL use a reasonable |
| 270 | * default: "audio stream" or something similar. |
| 271 | * |
| 272 | * On targets where this is not supported, this hint does nothing. |
| 273 | */ |
| 274 | #define SDL_HINT_AUDIO_DEVICE_STREAM_NAME "SDL_AUDIO_DEVICE_STREAM_NAME" |
| 275 | |
| 276 | /** |
| 277 | * Specify an application role for an audio device. |
| 278 | * |
| 279 | * Some audio backends (such as Pipewire) allow you to describe the role of |
| 280 | * your audio stream. Among other things, this description might show up in a |
| 281 | * system control panel or software for displaying and manipulating media |
| 282 | * playback/capture graphs. |
| 283 | * |
| 284 | * This hints lets you transmit that information to the OS. The contents of |
| 285 | * this hint are used while opening an audio device. You should use a string |
| 286 | * that describes your what your program is playing (Game, Music, Movie, |
| 287 | * etc...). |
| 288 | * |
| 289 | * Setting this to "" or leaving it unset will have SDL use a reasonable |
| 290 | * default: "Game" or something similar. |
| 291 | * |
| 292 | * On targets where this is not supported, this hint does nothing. |
| 293 | */ |
| 294 | #define SDL_HINT_AUDIO_DEVICE_STREAM_ROLE "SDL_AUDIO_DEVICE_STREAM_ROLE" |
| 295 | |
| 296 | /** |
| 297 | * A variable controlling speed/quality tradeoff of audio resampling. |
| 298 | * |
| 299 | * If available, SDL can use libsamplerate ( http://www.mega-nerd.com/SRC/ ) |
| 300 | * to handle audio resampling. There are different resampling modes available |
| 301 | * that produce different levels of quality, using more CPU. |
| 302 | * |
| 303 | * If this hint isn't specified to a valid setting, or libsamplerate isn't |
| 304 | * available, SDL will use the default, internal resampling algorithm. |
| 305 | * |
| 306 | * As of SDL 2.26, SDL_ConvertAudio() respects this hint when libsamplerate is |
| 307 | * available. |
| 308 | * |
| 309 | * This hint is currently only checked at audio subsystem initialization. |
| 310 | * |
| 311 | * This variable can be set to the following values: |
| 312 | * |
| 313 | * - "0" or "default": Use SDL's internal resampling (Default when not set - |
| 314 | * low quality, fast) |
| 315 | * - "1" or "fast": Use fast, slightly higher quality resampling, if available |
| 316 | * - "2" or "medium": Use medium quality resampling, if available |
| 317 | * - "3" or "best": Use high quality resampling, if available |
| 318 | */ |
| 319 | #define SDL_HINT_AUDIO_RESAMPLING_MODE "SDL_AUDIO_RESAMPLING_MODE" |
| 320 | |
| 321 | /** |
| 322 | * A variable controlling whether SDL updates joystick state when getting |
| 323 | * input events |
| 324 | * |
| 325 | * This variable can be set to the following values: |
| 326 | * |
| 327 | * - "0": You'll call SDL_JoystickUpdate() manually |
| 328 | * - "1": SDL will automatically call SDL_JoystickUpdate() (default) |
| 329 | * |
| 330 | * This hint can be toggled on and off at runtime. |
| 331 | */ |
| 332 | #define SDL_HINT_AUTO_UPDATE_JOYSTICKS "SDL_AUTO_UPDATE_JOYSTICKS" |
| 333 | |
| 334 | /** |
| 335 | * A variable controlling whether SDL updates sensor state when getting input |
| 336 | * events |
| 337 | * |
| 338 | * This variable can be set to the following values: |
| 339 | * |
| 340 | * - "0": You'll call SDL_SensorUpdate() manually |
| 341 | * - "1": SDL will automatically call SDL_SensorUpdate() (default) |
| 342 | * |
| 343 | * This hint can be toggled on and off at runtime. |
| 344 | */ |
| 345 | #define SDL_HINT_AUTO_UPDATE_SENSORS "SDL_AUTO_UPDATE_SENSORS" |
| 346 | |
| 347 | /** |
| 348 | * Prevent SDL from using version 4 of the bitmap header when saving BMPs. |
| 349 | * |
| 350 | * The bitmap header version 4 is required for proper alpha channel support |
| 351 | * and SDL will use it when required. Should this not be desired, this hint |
| 352 | * can force the use of the 40 byte header version which is supported |
| 353 | * everywhere. |
| 354 | * |
| 355 | * The variable can be set to the following values: |
| 356 | * |
| 357 | * - "0": Surfaces with a colorkey or an alpha channel are saved to a 32-bit |
| 358 | * BMP file with an alpha mask. SDL will use the bitmap header version 4 and |
| 359 | * set the alpha mask accordingly. |
| 360 | * - "1": Surfaces with a colorkey or an alpha channel are saved to a 32-bit |
| 361 | * BMP file without an alpha mask. The alpha channel data will be in the |
| 362 | * file, but applications are going to ignore it. |
| 363 | * |
| 364 | * The default value is "0". |
| 365 | */ |
| 366 | #define SDL_HINT_BMP_SAVE_LEGACY_FORMAT "SDL_BMP_SAVE_LEGACY_FORMAT" |
| 367 | |
| 368 | /** |
| 369 | * Override for SDL_GetDisplayUsableBounds() |
| 370 | * |
| 371 | * If set, this hint will override the expected results for |
| 372 | * SDL_GetDisplayUsableBounds() for display index 0. Generally you don't want |
| 373 | * to do this, but this allows an embedded system to request that some of the |
| 374 | * screen be reserved for other uses when paired with a well-behaved |
| 375 | * application. |
| 376 | * |
| 377 | * The contents of this hint must be 4 comma-separated integers, the first is |
| 378 | * the bounds x, then y, width and height, in that order. |
| 379 | */ |
| 380 | #define SDL_HINT_DISPLAY_USABLE_BOUNDS "SDL_DISPLAY_USABLE_BOUNDS" |
| 381 | |
| 382 | /** |
| 383 | * Disable giving back control to the browser automatically when running with |
| 384 | * asyncify |
| 385 | * |
| 386 | * With -s ASYNCIFY, SDL2 calls emscripten_sleep during operations such as |
| 387 | * refreshing the screen or polling events. |
| 388 | * |
| 389 | * This hint only applies to the emscripten platform |
| 390 | * |
| 391 | * The variable can be set to the following values: |
| 392 | * |
| 393 | * - "0": Disable emscripten_sleep calls (if you give back browser control |
| 394 | * manually or use asyncify for other purposes) |
| 395 | * - "1": Enable emscripten_sleep calls (the default) |
| 396 | */ |
| 397 | #define SDL_HINT_EMSCRIPTEN_ASYNCIFY "SDL_EMSCRIPTEN_ASYNCIFY" |
| 398 | |
| 399 | /** |
| 400 | * override the binding element for keyboard inputs for Emscripten builds |
| 401 | * |
| 402 | * This hint only applies to the emscripten platform. |
| 403 | * |
| 404 | * The variable can be one of: |
| 405 | * |
| 406 | * - "#window": the javascript window object (this is the default) |
| 407 | * - "#document": the javascript document object |
| 408 | * - "#screen": the javascript window.screen object |
| 409 | * - "#canvas": the WebGL canvas element |
| 410 | * |
| 411 | * Any other string without a leading # sign applies to the element on the |
| 412 | * page with that ID. |
| 413 | */ |
| 414 | #define SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT "SDL_EMSCRIPTEN_KEYBOARD_ELEMENT" |
| 415 | |
| 416 | /** |
| 417 | * A variable that controls whether the on-screen keyboard should be shown |
| 418 | * when text input is active |
| 419 | * |
| 420 | * The variable can be set to the following values: |
| 421 | * |
| 422 | * - "0": Do not show the on-screen keyboard |
| 423 | * - "1": Show the on-screen keyboard |
| 424 | * |
| 425 | * The default value is "1". This hint must be set before text input is |
| 426 | * activated. |
| 427 | */ |
| 428 | #define SDL_HINT_ENABLE_SCREEN_KEYBOARD "SDL_ENABLE_SCREEN_KEYBOARD" |
| 429 | |
| 430 | /** |
| 431 | * A variable controlling verbosity of the logging of SDL events pushed onto |
| 432 | * the internal queue. |
| 433 | * |
| 434 | * This variable can be set to the following values, from least to most |
| 435 | * verbose: |
| 436 | * |
| 437 | * - "0": Don't log any events (default) |
| 438 | * - "1": Log most events (other than the really spammy ones). |
| 439 | * - "2": Include mouse and finger motion events. |
| 440 | * - "3": Include SDL_SysWMEvent events. |
| 441 | * |
| 442 | * This is generally meant to be used to debug SDL itself, but can be useful |
| 443 | * for application developers that need better visibility into what is going |
| 444 | * on in the event queue. Logged events are sent through SDL_Log(), which |
| 445 | * means by default they appear on stdout on most platforms or maybe |
| 446 | * OutputDebugString() on Windows, and can be funneled by the app with |
| 447 | * SDL_LogSetOutputFunction(), etc. |
| 448 | * |
| 449 | * This hint can be toggled on and off at runtime, if you only need to log |
| 450 | * events for a small subset of program execution. |
| 451 | */ |
| 452 | #define SDL_HINT_EVENT_LOGGING "SDL_EVENT_LOGGING" |
| 453 | |
| 454 | /** |
| 455 | * A variable controlling whether raising the window should be done more |
| 456 | * forcefully |
| 457 | * |
| 458 | * This variable can be set to the following values: |
| 459 | * |
| 460 | * - "0": No forcing (the default) |
| 461 | * - "1": Extra level of forcing |
| 462 | * |
| 463 | * At present, this is only an issue under MS Windows, which makes it nearly |
| 464 | * impossible to programmatically move a window to the foreground, for |
| 465 | * "security" reasons. See http://stackoverflow.com/a/34414846 for a |
| 466 | * discussion. |
| 467 | */ |
| 468 | #define SDL_HINT_FORCE_RAISEWINDOW "SDL_HINT_FORCE_RAISEWINDOW" |
| 469 | |
| 470 | /** |
| 471 | * A variable controlling how 3D acceleration is used to accelerate the SDL |
| 472 | * screen surface. |
| 473 | * |
| 474 | * SDL can try to accelerate the SDL screen surface by using streaming |
| 475 | * textures with a 3D rendering engine. This variable controls whether and how |
| 476 | * this is done. |
| 477 | * |
| 478 | * This variable can be set to the following values: |
| 479 | * |
| 480 | * - "0": Disable 3D acceleration |
| 481 | * - "1": Enable 3D acceleration, using the default renderer. |
| 482 | * - "X": Enable 3D acceleration, using X where X is one of the valid |
| 483 | * rendering drivers. (e.g. "direct3d", "opengl", etc.) |
| 484 | * |
| 485 | * By default SDL tries to make a best guess for each platform whether to use |
| 486 | * acceleration or not. |
| 487 | */ |
| 488 | #define SDL_HINT_FRAMEBUFFER_ACCELERATION "SDL_FRAMEBUFFER_ACCELERATION" |
| 489 | |
| 490 | /** |
| 491 | * A variable that lets you manually hint extra gamecontroller db entries. |
| 492 | * |
| 493 | * The variable should be newline delimited rows of gamecontroller config |
| 494 | * data, see SDL_gamecontroller.h |
| 495 | * |
| 496 | * This hint must be set before calling SDL_Init(SDL_INIT_GAMECONTROLLER) You |
| 497 | * can update mappings after the system is initialized with |
| 498 | * SDL_GameControllerMappingForGUID() and SDL_GameControllerAddMapping() |
| 499 | */ |
| 500 | #define SDL_HINT_GAMECONTROLLERCONFIG "SDL_GAMECONTROLLERCONFIG" |
| 501 | |
| 502 | /** |
| 503 | * A variable that lets you provide a file with extra gamecontroller db |
| 504 | * entries. |
| 505 | * |
| 506 | * The file should contain lines of gamecontroller config data, see |
| 507 | * SDL_gamecontroller.h |
| 508 | * |
| 509 | * This hint must be set before calling SDL_Init(SDL_INIT_GAMECONTROLLER) You |
| 510 | * can update mappings after the system is initialized with |
| 511 | * SDL_GameControllerMappingForGUID() and SDL_GameControllerAddMapping() |
| 512 | */ |
| 513 | #define SDL_HINT_GAMECONTROLLERCONFIG_FILE "SDL_GAMECONTROLLERCONFIG_FILE" |
| 514 | |
| 515 | /** |
| 516 | * A variable that overrides the automatic controller type detection |
| 517 | * |
| 518 | * The variable should be comma separated entries, in the form: VID/PID=type |
| 519 | * |
| 520 | * The VID and PID should be hexadecimal with exactly 4 digits, e.g. 0x00fd |
| 521 | * |
| 522 | * The type should be one of: Xbox360 XboxOne PS3 PS4 PS5 SwitchPro |
| 523 | * |
| 524 | * This hint affects what driver is used, and must be set before calling |
| 525 | * SDL_Init(SDL_INIT_GAMECONTROLLER) |
| 526 | */ |
| 527 | #define SDL_HINT_GAMECONTROLLERTYPE "SDL_GAMECONTROLLERTYPE" |
| 528 | |
| 529 | /** |
| 530 | * A variable containing a list of devices to skip when scanning for game |
| 531 | * controllers. |
| 532 | * |
| 533 | * The format of the string is a comma separated list of USB VID/PID pairs in |
| 534 | * hexadecimal form, e.g. |
| 535 | * |
| 536 | * 0xAAAA/0xBBBB,0xCCCC/0xDDDD |
| 537 | * |
| 538 | * The variable can also take the form of @file, in which case the named file |
| 539 | * will be loaded and interpreted as the value of the variable. |
| 540 | */ |
| 541 | #define SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES "SDL_GAMECONTROLLER_IGNORE_DEVICES" |
| 542 | |
| 543 | /** |
| 544 | * If set, all devices will be skipped when scanning for game controllers |
| 545 | * except for the ones listed in this variable. |
| 546 | * |
| 547 | * The format of the string is a comma separated list of USB VID/PID pairs in |
| 548 | * hexadecimal form, e.g. |
| 549 | * |
| 550 | * 0xAAAA/0xBBBB,0xCCCC/0xDDDD |
| 551 | * |
| 552 | * The variable can also take the form of @file, in which case the named file |
| 553 | * will be loaded and interpreted as the value of the variable. |
| 554 | */ |
| 555 | #define SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT "SDL_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT" |
| 556 | |
| 557 | /** |
| 558 | * If set, game controller face buttons report their values according to their |
| 559 | * labels instead of their positional layout. |
| 560 | * |
| 561 | * For example, on Nintendo Switch controllers, normally you'd get: |
| 562 | * |
| 563 | * ``` |
| 564 | * (Y) |
| 565 | * (X) (B) |
| 566 | * (A) |
| 567 | * ``` |
| 568 | * |
| 569 | * but if this hint is set, you'll get: |
| 570 | * |
| 571 | * ``` |
| 572 | * (X) |
| 573 | * (Y) (A) |
| 574 | * (B) |
| 575 | * ``` |
| 576 | * |
| 577 | * The variable can be set to the following values: |
| 578 | * |
| 579 | * - "0": Report the face buttons by position, as though they were on an Xbox |
| 580 | * controller. |
| 581 | * - "1": Report the face buttons by label instead of position |
| 582 | * |
| 583 | * The default value is "1". This hint may be set at any time. |
| 584 | */ |
| 585 | #define SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS "SDL_GAMECONTROLLER_USE_BUTTON_LABELS" |
| 586 | |
| 587 | /** |
| 588 | * A variable controlling whether grabbing input grabs the keyboard |
| 589 | * |
| 590 | * This variable can be set to the following values: |
| 591 | * |
| 592 | * - "0": Grab will affect only the mouse |
| 593 | * - "1": Grab will affect mouse and keyboard |
| 594 | * |
| 595 | * By default SDL will not grab the keyboard so system shortcuts still work. |
| 596 | */ |
| 597 | #define SDL_HINT_GRAB_KEYBOARD "SDL_GRAB_KEYBOARD" |
| 598 | |
| 599 | /** |
| 600 | * A variable containing a list of devices to ignore in SDL_hid_enumerate() |
| 601 | * |
| 602 | * For example, to ignore the Shanwan DS3 controller and any Valve controller, |
| 603 | * you might have the string "0x2563/0x0523,0x28de/0x0000" |
| 604 | */ |
| 605 | #define SDL_HINT_HIDAPI_IGNORE_DEVICES "SDL_HIDAPI_IGNORE_DEVICES" |
| 606 | |
| 607 | /** |
| 608 | * A variable controlling whether the idle timer is disabled on iOS. |
| 609 | * |
| 610 | * When an iOS app does not receive touches for some time, the screen is |
| 611 | * dimmed automatically. For games where the accelerometer is the only input |
| 612 | * this is problematic. This functionality can be disabled by setting this |
| 613 | * hint. |
| 614 | * |
| 615 | * As of SDL 2.0.4, SDL_EnableScreenSaver() and SDL_DisableScreenSaver() |
| 616 | * accomplish the same thing on iOS. They should be preferred over this hint. |
| 617 | * |
| 618 | * This variable can be set to the following values: |
| 619 | * |
| 620 | * - "0": Enable idle timer |
| 621 | * - "1": Disable idle timer |
| 622 | */ |
| 623 | #define SDL_HINT_IDLE_TIMER_DISABLED "SDL_IOS_IDLE_TIMER_DISABLED" |
| 624 | |
| 625 | /** |
| 626 | * A variable to control whether certain IMEs should handle text editing |
| 627 | * internally instead of sending SDL_TEXTEDITING events. |
| 628 | * |
| 629 | * The variable can be set to the following values: |
| 630 | * |
| 631 | * - "0": SDL_TEXTEDITING events are sent, and it is the application's |
| 632 | * responsibility to render the text from these events and differentiate it |
| 633 | * somehow from committed text. (default) |
| 634 | * - "1": If supported by the IME then SDL_TEXTEDITING events are not sent, |
| 635 | * and text that is being composed will be rendered in its own UI. |
| 636 | */ |
| 637 | #define SDL_HINT_IME_INTERNAL_EDITING "SDL_IME_INTERNAL_EDITING" |
| 638 | |
| 639 | /** |
| 640 | * A variable to control whether certain IMEs should show native UI components |
| 641 | * (such as the Candidate List) instead of suppressing them. |
| 642 | * |
| 643 | * The variable can be set to the following values: |
| 644 | * |
| 645 | * - "0": Native UI components are not display. (default) |
| 646 | * - "1": Native UI components are displayed. |
| 647 | */ |
| 648 | #define SDL_HINT_IME_SHOW_UI "SDL_IME_SHOW_UI" |
| 649 | |
| 650 | /** |
| 651 | * A variable to control if extended IME text support is enabled. |
| 652 | * |
| 653 | * If enabled then SDL_TextEditingExtEvent will be issued if the text would be |
| 654 | * truncated otherwise. Additionally SDL_TextInputEvent will be dispatched |
| 655 | * multiple times so that it is not truncated. |
| 656 | * |
| 657 | * The variable can be set to the following values: |
| 658 | * |
| 659 | * - "0": Legacy behavior. Text can be truncated, no heap allocations. |
| 660 | * (default) |
| 661 | * - "1": Modern behavior. |
| 662 | */ |
| 663 | #define SDL_HINT_IME_SUPPORT_EXTENDED_TEXT "SDL_IME_SUPPORT_EXTENDED_TEXT" |
| 664 | |
| 665 | /** |
| 666 | * A variable controlling whether the home indicator bar on iPhone X should be |
| 667 | * hidden. |
| 668 | * |
| 669 | * This variable can be set to the following values: |
| 670 | * |
| 671 | * - "0": The indicator bar is not hidden (default for windowed applications) |
| 672 | * - "1": The indicator bar is hidden and is shown when the screen is touched |
| 673 | * (useful for movie playback applications) |
| 674 | * - "2": The indicator bar is dim and the first swipe makes it visible and |
| 675 | * the second swipe performs the "home" action (default for fullscreen |
| 676 | * applications) |
| 677 | */ |
| 678 | #define SDL_HINT_IOS_HIDE_HOME_INDICATOR "SDL_IOS_HIDE_HOME_INDICATOR" |
| 679 | |
| 680 | /** |
| 681 | * A variable that lets you enable joystick (and gamecontroller) events even |
| 682 | * when your app is in the background. |
| 683 | * |
| 684 | * The variable can be set to the following values: |
| 685 | * |
| 686 | * - "0": Disable joystick & gamecontroller input events when the application |
| 687 | * is in the background. |
| 688 | * - "1": Enable joystick & gamecontroller input events when the application |
| 689 | * is in the background. |
| 690 | * |
| 691 | * The default value is "0". This hint may be set at any time. |
| 692 | */ |
| 693 | #define SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS "SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS" |
| 694 | |
| 695 | /** |
| 696 | * A variable containing a list of arcade stick style controllers. |
| 697 | * |
| 698 | * The format of the string is a comma separated list of USB VID/PID pairs in |
| 699 | * hexadecimal form, e.g. |
| 700 | * |
| 701 | * 0xAAAA/0xBBBB,0xCCCC/0xDDDD |
| 702 | * |
| 703 | * The variable can also take the form of @file, in which case the named file |
| 704 | * will be loaded and interpreted as the value of the variable. |
| 705 | */ |
| 706 | #define SDL_HINT_JOYSTICK_ARCADESTICK_DEVICES "SDL_JOYSTICK_ARCADESTICK_DEVICES" |
| 707 | |
| 708 | /** |
| 709 | * A variable containing a list of devices that are not arcade stick style |
| 710 | * controllers. |
| 711 | * |
| 712 | * This will override SDL_HINT_JOYSTICK_ARCADESTICK_DEVICES and the built in |
| 713 | * device list. |
| 714 | * |
| 715 | * The format of the string is a comma separated list of USB VID/PID pairs in |
| 716 | * hexadecimal form, e.g. |
| 717 | * |
| 718 | * 0xAAAA/0xBBBB,0xCCCC/0xDDDD |
| 719 | * |
| 720 | * The variable can also take the form of @file, in which case the named file |
| 721 | * will be loaded and interpreted as the value of the variable. |
| 722 | */ |
| 723 | #define SDL_HINT_JOYSTICK_ARCADESTICK_DEVICES_EXCLUDED "SDL_JOYSTICK_ARCADESTICK_DEVICES_EXCLUDED" |
| 724 | |
| 725 | /** |
| 726 | * A variable containing a list of devices that should not be considerd |
| 727 | * joysticks. |
| 728 | * |
| 729 | * The format of the string is a comma separated list of USB VID/PID pairs in |
| 730 | * hexadecimal form, e.g. |
| 731 | * |
| 732 | * 0xAAAA/0xBBBB,0xCCCC/0xDDDD |
| 733 | * |
| 734 | * The variable can also take the form of @file, in which case the named file |
| 735 | * will be loaded and interpreted as the value of the variable. |
| 736 | */ |
| 737 | #define SDL_HINT_JOYSTICK_BLACKLIST_DEVICES "SDL_JOYSTICK_BLACKLIST_DEVICES" |
| 738 | |
| 739 | /** |
| 740 | * A variable containing a list of devices that should be considered |
| 741 | * joysticks. |
| 742 | * |
| 743 | * This will override SDL_HINT_JOYSTICK_BLACKLIST_DEVICES and the built in |
| 744 | * device list. |
| 745 | * |
| 746 | * The format of the string is a comma separated list of USB VID/PID pairs in |
| 747 | * hexadecimal form, e.g. |
| 748 | * |
| 749 | * 0xAAAA/0xBBBB,0xCCCC/0xDDDD |
| 750 | * |
| 751 | * The variable can also take the form of @file, in which case the named file |
| 752 | * will be loaded and interpreted as the value of the variable. |
| 753 | */ |
| 754 | #define SDL_HINT_JOYSTICK_BLACKLIST_DEVICES_EXCLUDED "SDL_JOYSTICK_BLACKLIST_DEVICES_EXCLUDED" |
| 755 | |
| 756 | /** |
| 757 | * A variable containing a list of flightstick style controllers. |
| 758 | * |
| 759 | * The format of the string is a comma separated list of USB VID/PID pairs in |
| 760 | * hexadecimal form, e.g. |
| 761 | * |
| 762 | * 0xAAAA/0xBBBB,0xCCCC/0xDDDD |
| 763 | * |
| 764 | * The variable can also take the form of @file, in which case the named file |
| 765 | * will be loaded and interpreted as the value of the variable. |
| 766 | */ |
| 767 | #define SDL_HINT_JOYSTICK_FLIGHTSTICK_DEVICES "SDL_JOYSTICK_FLIGHTSTICK_DEVICES" |
| 768 | |
| 769 | /** |
| 770 | * A variable containing a list of devices that are not flightstick style |
| 771 | * controllers. |
| 772 | * |
| 773 | * This will override SDL_HINT_JOYSTICK_FLIGHTSTICK_DEVICES and the built in |
| 774 | * device list. |
| 775 | * |
| 776 | * The format of the string is a comma separated list of USB VID/PID pairs in |
| 777 | * hexadecimal form, e.g. |
| 778 | * |
| 779 | * 0xAAAA/0xBBBB,0xCCCC/0xDDDD |
| 780 | * |
| 781 | * The variable can also take the form of @file, in which case the named file |
| 782 | * will be loaded and interpreted as the value of the variable. |
| 783 | */ |
| 784 | #define SDL_HINT_JOYSTICK_FLIGHTSTICK_DEVICES_EXCLUDED "SDL_JOYSTICK_FLIGHTSTICK_DEVICES_EXCLUDED" |
| 785 | |
| 786 | /** |
| 787 | * A variable containing a list of devices known to have a GameCube form |
| 788 | * factor. |
| 789 | * |
| 790 | * The format of the string is a comma separated list of USB VID/PID pairs in |
| 791 | * hexadecimal form, e.g. |
| 792 | * |
| 793 | * 0xAAAA/0xBBBB,0xCCCC/0xDDDD |
| 794 | * |
| 795 | * The variable can also take the form of @file, in which case the named file |
| 796 | * will be loaded and interpreted as the value of the variable. |
| 797 | */ |
| 798 | #define SDL_HINT_JOYSTICK_GAMECUBE_DEVICES "SDL_JOYSTICK_GAMECUBE_DEVICES" |
| 799 | |
| 800 | /** |
| 801 | * A variable containing a list of devices known not to have a GameCube form |
| 802 | * factor. |
| 803 | * |
| 804 | * This will override SDL_HINT_JOYSTICK_GAMECUBE_DEVICES and the built in |
| 805 | * device list. |
| 806 | * |
| 807 | * The format of the string is a comma separated list of USB VID/PID pairs in |
| 808 | * hexadecimal form, e.g. |
| 809 | * |
| 810 | * 0xAAAA/0xBBBB,0xCCCC/0xDDDD |
| 811 | * |
| 812 | * The variable can also take the form of @file, in which case the named file |
| 813 | * will be loaded and interpreted as the value of the variable. |
| 814 | */ |
| 815 | #define SDL_HINT_JOYSTICK_GAMECUBE_DEVICES_EXCLUDED "SDL_JOYSTICK_GAMECUBE_DEVICES_EXCLUDED" |
| 816 | |
| 817 | /** |
| 818 | * A variable controlling whether the HIDAPI joystick drivers should be used. |
| 819 | * |
| 820 | * This variable can be set to the following values: |
| 821 | * |
| 822 | * - "0": HIDAPI drivers are not used |
| 823 | * - "1": HIDAPI drivers are used (the default) |
| 824 | * |
| 825 | * This variable is the default for all drivers, but can be overridden by the |
| 826 | * hints for specific drivers below. |
| 827 | */ |
| 828 | #define SDL_HINT_JOYSTICK_HIDAPI "SDL_JOYSTICK_HIDAPI" |
| 829 | |
| 830 | /** |
| 831 | * A variable controlling whether the HIDAPI driver for Nintendo GameCube |
| 832 | * controllers should be used. |
| 833 | * |
| 834 | * This variable can be set to the following values: |
| 835 | * |
| 836 | * - "0": HIDAPI driver is not used |
| 837 | * - "1": HIDAPI driver is used |
| 838 | * |
| 839 | * The default is the value of SDL_HINT_JOYSTICK_HIDAPI |
| 840 | */ |
| 841 | #define SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE "SDL_JOYSTICK_HIDAPI_GAMECUBE" |
| 842 | |
| 843 | /** |
| 844 | * A variable controlling whether "low_frequency_rumble" and |
| 845 | * "high_frequency_rumble" is used to implement the GameCube controller's 3 |
| 846 | * rumble modes, Stop(0), Rumble(1), and StopHard(2) this is useful for |
| 847 | * applications that need full compatibility for things like ADSR envelopes. |
| 848 | * |
| 849 | * Stop is implemented by setting "low_frequency_rumble" to "0" and |
| 850 | * "high_frequency_rumble" ">0" Rumble is both at any arbitrary value, |
| 851 | * StopHard is implemented by setting both "low_frequency_rumble" and |
| 852 | * "high_frequency_rumble" to "0" |
| 853 | * |
| 854 | * This variable can be set to the following values: |
| 855 | * |
| 856 | * - "0": Normal rumble behavior is behavior is used (default) |
| 857 | * - "1": Proper GameCube controller rumble behavior is used |
| 858 | */ |
| 859 | #define SDL_HINT_JOYSTICK_GAMECUBE_RUMBLE_BRAKE "SDL_JOYSTICK_GAMECUBE_RUMBLE_BRAKE" |
| 860 | |
| 861 | /** |
| 862 | * A variable controlling whether the HIDAPI driver for Nintendo Switch |
| 863 | * Joy-Cons should be used. |
| 864 | * |
| 865 | * This variable can be set to the following values: |
| 866 | * |
| 867 | * - "0": HIDAPI driver is not used |
| 868 | * - "1": HIDAPI driver is used |
| 869 | * |
| 870 | * The default is the value of SDL_HINT_JOYSTICK_HIDAPI |
| 871 | */ |
| 872 | #define SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS "SDL_JOYSTICK_HIDAPI_JOY_CONS" |
| 873 | |
| 874 | /** |
| 875 | * A variable controlling whether Nintendo Switch Joy-Con controllers will be |
| 876 | * combined into a single Pro-like controller when using the HIDAPI driver |
| 877 | * |
| 878 | * This variable can be set to the following values: |
| 879 | * |
| 880 | * - "0": Left and right Joy-Con controllers will not be combined and each |
| 881 | * will be a mini-gamepad |
| 882 | * - "1": Left and right Joy-Con controllers will be combined into a single |
| 883 | * controller (the default) |
| 884 | */ |
| 885 | #define SDL_HINT_JOYSTICK_HIDAPI_COMBINE_JOY_CONS "SDL_JOYSTICK_HIDAPI_COMBINE_JOY_CONS" |
| 886 | |
| 887 | /** |
| 888 | * A variable controlling whether Nintendo Switch Joy-Con controllers will be |
| 889 | * in vertical mode when using the HIDAPI driver |
| 890 | * |
| 891 | * This variable can be set to the following values: |
| 892 | * |
| 893 | * - "0": Left and right Joy-Con controllers will not be in vertical mode (the |
| 894 | * default) |
| 895 | * - "1": Left and right Joy-Con controllers will be in vertical mode |
| 896 | * |
| 897 | * This hint must be set before calling SDL_Init(SDL_INIT_GAMECONTROLLER) |
| 898 | */ |
| 899 | #define SDL_HINT_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS "SDL_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS" |
| 900 | |
| 901 | /** |
| 902 | * A variable controlling whether the HIDAPI driver for Amazon Luna |
| 903 | * controllers connected via Bluetooth should be used. |
| 904 | * |
| 905 | * This variable can be set to the following values: |
| 906 | * |
| 907 | * - "0": HIDAPI driver is not used |
| 908 | * - "1": HIDAPI driver is used |
| 909 | * |
| 910 | * The default is the value of SDL_HINT_JOYSTICK_HIDAPI |
| 911 | */ |
| 912 | #define SDL_HINT_JOYSTICK_HIDAPI_LUNA "SDL_JOYSTICK_HIDAPI_LUNA" |
| 913 | |
| 914 | /** |
| 915 | * A variable controlling whether the HIDAPI driver for Nintendo Online |
| 916 | * classic controllers should be used. |
| 917 | * |
| 918 | * This variable can be set to the following values: |
| 919 | * |
| 920 | * - "0": HIDAPI driver is not used |
| 921 | * - "1": HIDAPI driver is used |
| 922 | * |
| 923 | * The default is the value of SDL_HINT_JOYSTICK_HIDAPI |
| 924 | */ |
| 925 | #define SDL_HINT_JOYSTICK_HIDAPI_NINTENDO_CLASSIC "SDL_JOYSTICK_HIDAPI_NINTENDO_CLASSIC" |
| 926 | |
| 927 | /** |
| 928 | * A variable controlling whether the HIDAPI driver for NVIDIA SHIELD |
| 929 | * controllers should be used. |
| 930 | * |
| 931 | * This variable can be set to the following values: |
| 932 | * |
| 933 | * - "0": HIDAPI driver is not used |
| 934 | * - "1": HIDAPI driver is used |
| 935 | * |
| 936 | * The default is the value of SDL_HINT_JOYSTICK_HIDAPI |
| 937 | */ |
| 938 | #define SDL_HINT_JOYSTICK_HIDAPI_SHIELD "SDL_JOYSTICK_HIDAPI_SHIELD" |
| 939 | |
| 940 | /** |
| 941 | * A variable controlling whether the HIDAPI driver for PS3 controllers should |
| 942 | * be used. |
| 943 | * |
| 944 | * This variable can be set to the following values: |
| 945 | * |
| 946 | * - "0": HIDAPI driver is not used |
| 947 | * - "1": HIDAPI driver is used |
| 948 | * |
| 949 | * The default is the value of SDL_HINT_JOYSTICK_HIDAPI on macOS, and "0" on |
| 950 | * other platforms. |
| 951 | * |
| 952 | * It is not possible to use this driver on Windows, due to limitations in the |
| 953 | * default drivers installed. See https://github.com/ViGEm/DsHidMini for an |
| 954 | * alternative driver on Windows. |
| 955 | */ |
| 956 | #define SDL_HINT_JOYSTICK_HIDAPI_PS3 "SDL_JOYSTICK_HIDAPI_PS3" |
| 957 | |
| 958 | /** |
| 959 | * A variable controlling whether the HIDAPI driver for PS4 controllers should |
| 960 | * be used. |
| 961 | * |
| 962 | * This variable can be set to the following values: |
| 963 | * |
| 964 | * - "0": HIDAPI driver is not used |
| 965 | * - "1": HIDAPI driver is used |
| 966 | * |
| 967 | * The default is the value of SDL_HINT_JOYSTICK_HIDAPI |
| 968 | */ |
| 969 | #define SDL_HINT_JOYSTICK_HIDAPI_PS4 "SDL_JOYSTICK_HIDAPI_PS4" |
| 970 | |
| 971 | /** |
| 972 | * A variable controlling whether extended input reports should be used for |
| 973 | * PS4 controllers when using the HIDAPI driver. |
| 974 | * |
| 975 | * This variable can be set to the following values: |
| 976 | * |
| 977 | * - "0": extended reports are not enabled (the default) |
| 978 | * - "1": extended reports |
| 979 | * |
| 980 | * Extended input reports allow rumble on Bluetooth PS4 controllers, but break |
| 981 | * DirectInput handling for applications that don't use SDL. |
| 982 | * |
| 983 | * Once extended reports are enabled, they can not be disabled without power |
| 984 | * cycling the controller. |
| 985 | * |
| 986 | * For compatibility with applications written for versions of SDL prior to |
| 987 | * the introduction of PS5 controller support, this value will also control |
| 988 | * the state of extended reports on PS5 controllers when the |
| 989 | * SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE hint is not explicitly set. |
| 990 | */ |
| 991 | #define SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE "SDL_JOYSTICK_HIDAPI_PS4_RUMBLE" |
| 992 | |
| 993 | /** |
| 994 | * A variable controlling whether the HIDAPI driver for PS5 controllers should |
| 995 | * be used. |
| 996 | * |
| 997 | * This variable can be set to the following values: |
| 998 | * |
| 999 | * - "0": HIDAPI driver is not used |
| 1000 | * - "1": HIDAPI driver is used |
| 1001 | * |
| 1002 | * The default is the value of SDL_HINT_JOYSTICK_HIDAPI |
| 1003 | */ |
| 1004 | #define SDL_HINT_JOYSTICK_HIDAPI_PS5 "SDL_JOYSTICK_HIDAPI_PS5" |
| 1005 | |
| 1006 | /** |
| 1007 | * A variable controlling whether the player LEDs should be lit to indicate |
| 1008 | * which player is associated with a PS5 controller. |
| 1009 | * |
| 1010 | * This variable can be set to the following values: |
| 1011 | * |
| 1012 | * - "0": player LEDs are not enabled |
| 1013 | * - "1": player LEDs are enabled (the default) |
| 1014 | */ |
| 1015 | #define SDL_HINT_JOYSTICK_HIDAPI_PS5_PLAYER_LED "SDL_JOYSTICK_HIDAPI_PS5_PLAYER_LED" |
| 1016 | |
| 1017 | /** |
| 1018 | * A variable controlling whether extended input reports should be used for |
| 1019 | * PS5 controllers when using the HIDAPI driver. |
| 1020 | * |
| 1021 | * This variable can be set to the following values: |
| 1022 | * |
| 1023 | * - "0": extended reports are not enabled (the default) |
| 1024 | * - "1": extended reports |
| 1025 | * |
| 1026 | * Extended input reports allow rumble on Bluetooth PS5 controllers, but break |
| 1027 | * DirectInput handling for applications that don't use SDL. |
| 1028 | * |
| 1029 | * Once extended reports are enabled, they can not be disabled without power |
| 1030 | * cycling the controller. |
| 1031 | * |
| 1032 | * For compatibility with applications written for versions of SDL prior to |
| 1033 | * the introduction of PS5 controller support, this value defaults to the |
| 1034 | * value of SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE. |
| 1035 | */ |
| 1036 | #define SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE "SDL_JOYSTICK_HIDAPI_PS5_RUMBLE" |
| 1037 | |
| 1038 | /** |
| 1039 | * A variable controlling whether the HIDAPI driver for Google Stadia |
| 1040 | * controllers should be used. |
| 1041 | * |
| 1042 | * This variable can be set to the following values: |
| 1043 | * |
| 1044 | * - "0": HIDAPI driver is not used |
| 1045 | * - "1": HIDAPI driver is used |
| 1046 | * |
| 1047 | * The default is the value of SDL_HINT_JOYSTICK_HIDAPI |
| 1048 | */ |
| 1049 | #define SDL_HINT_JOYSTICK_HIDAPI_STADIA "SDL_JOYSTICK_HIDAPI_STADIA" |
| 1050 | |
| 1051 | /** |
| 1052 | * A variable controlling whether the HIDAPI driver for Bluetooth Steam |
| 1053 | * Controllers should be used. |
| 1054 | * |
| 1055 | * This variable can be set to the following values: |
| 1056 | * |
| 1057 | * - "0": HIDAPI driver is not used |
| 1058 | * - "1": HIDAPI driver is used for Steam Controllers, which requires |
| 1059 | * Bluetooth access and may prompt the user for permission on iOS and |
| 1060 | * Android. |
| 1061 | * |
| 1062 | * The default is "0" |
| 1063 | */ |
| 1064 | #define SDL_HINT_JOYSTICK_HIDAPI_STEAM "SDL_JOYSTICK_HIDAPI_STEAM" |
| 1065 | |
| 1066 | /** |
| 1067 | * A variable controlling whether the HIDAPI driver for the Steam Deck builtin |
| 1068 | * controller should be used. |
| 1069 | * |
| 1070 | * This variable can be set to the following values: |
| 1071 | * |
| 1072 | * - "0": HIDAPI driver is not used |
| 1073 | * - "1": HIDAPI driver is used |
| 1074 | * |
| 1075 | * The default is the value of SDL_HINT_JOYSTICK_HIDAPI |
| 1076 | */ |
| 1077 | #define SDL_HINT_JOYSTICK_HIDAPI_STEAMDECK "SDL_JOYSTICK_HIDAPI_STEAMDECK" |
| 1078 | |
| 1079 | /** |
| 1080 | * A variable controlling whether the HIDAPI driver for Nintendo Switch |
| 1081 | * controllers should be used. |
| 1082 | * |
| 1083 | * This variable can be set to the following values: |
| 1084 | * |
| 1085 | * - "0": HIDAPI driver is not used |
| 1086 | * - "1": HIDAPI driver is used |
| 1087 | * |
| 1088 | * The default is the value of SDL_HINT_JOYSTICK_HIDAPI |
| 1089 | */ |
| 1090 | #define SDL_HINT_JOYSTICK_HIDAPI_SWITCH "SDL_JOYSTICK_HIDAPI_SWITCH" |
| 1091 | |
| 1092 | /** |
| 1093 | * A variable controlling whether the Home button LED should be turned on when |
| 1094 | * a Nintendo Switch Pro controller is opened |
| 1095 | * |
| 1096 | * This variable can be set to the following values: |
| 1097 | * |
| 1098 | * - "0": home button LED is turned off |
| 1099 | * - "1": home button LED is turned on |
| 1100 | * |
| 1101 | * By default the Home button LED state is not changed. This hint can also be |
| 1102 | * set to a floating point value between 0.0 and 1.0 which controls the |
| 1103 | * brightness of the Home button LED. |
| 1104 | */ |
| 1105 | #define SDL_HINT_JOYSTICK_HIDAPI_SWITCH_HOME_LED "SDL_JOYSTICK_HIDAPI_SWITCH_HOME_LED" |
| 1106 | |
| 1107 | /** |
| 1108 | * A variable controlling whether the Home button LED should be turned on when |
| 1109 | * a Nintendo Switch Joy-Con controller is opened |
| 1110 | * |
| 1111 | * This variable can be set to the following values: |
| 1112 | * |
| 1113 | * - "0": home button LED is turned off |
| 1114 | * - "1": home button LED is turned on |
| 1115 | * |
| 1116 | * By default the Home button LED state is not changed. This hint can also be |
| 1117 | * set to a floating point value between 0.0 and 1.0 which controls the |
| 1118 | * brightness of the Home button LED. |
| 1119 | */ |
| 1120 | #define SDL_HINT_JOYSTICK_HIDAPI_JOYCON_HOME_LED "SDL_JOYSTICK_HIDAPI_JOYCON_HOME_LED" |
| 1121 | |
| 1122 | /** |
| 1123 | * A variable controlling whether the player LEDs should be lit to indicate |
| 1124 | * which player is associated with a Nintendo Switch controller. |
| 1125 | * |
| 1126 | * This variable can be set to the following values: |
| 1127 | * |
| 1128 | * - "0": player LEDs are not enabled |
| 1129 | * - "1": player LEDs are enabled (the default) |
| 1130 | */ |
| 1131 | #define SDL_HINT_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED "SDL_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED" |
| 1132 | |
| 1133 | /** |
| 1134 | * A variable controlling whether the HIDAPI driver for Nintendo Wii and Wii U |
| 1135 | * controllers should be used. |
| 1136 | * |
| 1137 | * This variable can be set to the following values: |
| 1138 | * |
| 1139 | * - "0": HIDAPI driver is not used |
| 1140 | * - "1": HIDAPI driver is used |
| 1141 | * |
| 1142 | * This driver doesn't work with the dolphinbar, so the default is SDL_FALSE |
| 1143 | * for now. |
| 1144 | */ |
| 1145 | #define SDL_HINT_JOYSTICK_HIDAPI_WII "SDL_JOYSTICK_HIDAPI_WII" |
| 1146 | |
| 1147 | /** |
| 1148 | * A variable controlling whether the player LEDs should be lit to indicate |
| 1149 | * which player is associated with a Wii controller. |
| 1150 | * |
| 1151 | * This variable can be set to the following values: |
| 1152 | * |
| 1153 | * - "0": player LEDs are not enabled |
| 1154 | * - "1": player LEDs are enabled (the default) |
| 1155 | */ |
| 1156 | #define SDL_HINT_JOYSTICK_HIDAPI_WII_PLAYER_LED "SDL_JOYSTICK_HIDAPI_WII_PLAYER_LED" |
| 1157 | |
| 1158 | /** |
| 1159 | * A variable controlling whether the HIDAPI driver for XBox controllers |
| 1160 | * should be used. |
| 1161 | * |
| 1162 | * This variable can be set to the following values: |
| 1163 | * |
| 1164 | * - "0": HIDAPI driver is not used |
| 1165 | * - "1": HIDAPI driver is used |
| 1166 | * |
| 1167 | * The default is "0" on Windows, otherwise the value of |
| 1168 | * SDL_HINT_JOYSTICK_HIDAPI |
| 1169 | */ |
| 1170 | #define SDL_HINT_JOYSTICK_HIDAPI_XBOX "SDL_JOYSTICK_HIDAPI_XBOX" |
| 1171 | |
| 1172 | /** |
| 1173 | * A variable controlling whether the HIDAPI driver for XBox 360 controllers |
| 1174 | * should be used. |
| 1175 | * |
| 1176 | * This variable can be set to the following values: |
| 1177 | * |
| 1178 | * - "0": HIDAPI driver is not used |
| 1179 | * - "1": HIDAPI driver is used |
| 1180 | * |
| 1181 | * The default is the value of SDL_HINT_JOYSTICK_HIDAPI_XBOX |
| 1182 | */ |
| 1183 | #define SDL_HINT_JOYSTICK_HIDAPI_XBOX_360 "SDL_JOYSTICK_HIDAPI_XBOX_360" |
| 1184 | |
| 1185 | /** |
| 1186 | * A variable controlling whether the player LEDs should be lit to indicate |
| 1187 | * which player is associated with an Xbox 360 controller. |
| 1188 | * |
| 1189 | * This variable can be set to the following values: |
| 1190 | * |
| 1191 | * - "0": player LEDs are not enabled |
| 1192 | * - "1": player LEDs are enabled (the default) |
| 1193 | */ |
| 1194 | #define SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED "SDL_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED" |
| 1195 | |
| 1196 | /** |
| 1197 | * A variable controlling whether the HIDAPI driver for XBox 360 wireless |
| 1198 | * controllers should be used. |
| 1199 | * |
| 1200 | * This variable can be set to the following values: |
| 1201 | * |
| 1202 | * - "0": HIDAPI driver is not used |
| 1203 | * - "1": HIDAPI driver is used |
| 1204 | * |
| 1205 | * The default is the value of SDL_HINT_JOYSTICK_HIDAPI_XBOX_360 |
| 1206 | */ |
| 1207 | #define SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_WIRELESS "SDL_JOYSTICK_HIDAPI_XBOX_360_WIRELESS" |
| 1208 | |
| 1209 | /** |
| 1210 | * A variable controlling whether the HIDAPI driver for XBox One controllers |
| 1211 | * should be used. |
| 1212 | * |
| 1213 | * This variable can be set to the following values: |
| 1214 | * |
| 1215 | * - "0": HIDAPI driver is not used |
| 1216 | * - "1": HIDAPI driver is used |
| 1217 | * |
| 1218 | * The default is the value of SDL_HINT_JOYSTICK_HIDAPI_XBOX |
| 1219 | */ |
| 1220 | #define SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE "SDL_JOYSTICK_HIDAPI_XBOX_ONE" |
| 1221 | |
| 1222 | /** |
| 1223 | * A variable controlling whether the Home button LED should be turned on when |
| 1224 | * an Xbox One controller is opened |
| 1225 | * |
| 1226 | * This variable can be set to the following values: |
| 1227 | * |
| 1228 | * - "0": home button LED is turned off |
| 1229 | * - "1": home button LED is turned on |
| 1230 | * |
| 1231 | * By default the Home button LED state is not changed. This hint can also be |
| 1232 | * set to a floating point value between 0.0 and 1.0 which controls the |
| 1233 | * brightness of the Home button LED. The default brightness is 0.4. |
| 1234 | */ |
| 1235 | #define SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED "SDL_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED" |
| 1236 | |
| 1237 | /** |
| 1238 | * A variable controlling whether IOKit should be used for controller |
| 1239 | * handling. |
| 1240 | * |
| 1241 | * This variable can be set to the following values: |
| 1242 | * |
| 1243 | * - "0": IOKit is not used |
| 1244 | * - "1": IOKit is used (the default) |
| 1245 | */ |
| 1246 | #define SDL_HINT_JOYSTICK_IOKIT "SDL_JOYSTICK_IOKIT" |
| 1247 | |
| 1248 | /** |
| 1249 | * A variable controlling whether GCController should be used for controller |
| 1250 | * handling. |
| 1251 | * |
| 1252 | * This variable can be set to the following values: |
| 1253 | * |
| 1254 | * - "0": GCController is not used |
| 1255 | * - "1": GCController is used (the default) |
| 1256 | */ |
| 1257 | #define SDL_HINT_JOYSTICK_MFI "SDL_JOYSTICK_MFI" |
| 1258 | |
| 1259 | /** |
| 1260 | * A variable controlling whether the RAWINPUT joystick drivers should be used |
| 1261 | * for better handling XInput-capable devices. |
| 1262 | * |
| 1263 | * This variable can be set to the following values: |
| 1264 | * |
| 1265 | * - "0": RAWINPUT drivers are not used (the default) |
| 1266 | * - "1": RAWINPUT drivers are used |
| 1267 | */ |
| 1268 | #define SDL_HINT_JOYSTICK_RAWINPUT "SDL_JOYSTICK_RAWINPUT" |
| 1269 | |
| 1270 | /** |
| 1271 | * A variable controlling whether the RAWINPUT driver should pull correlated |
| 1272 | * data from XInput. |
| 1273 | * |
| 1274 | * This variable can be set to the following values: |
| 1275 | * |
| 1276 | * - "0": RAWINPUT driver will only use data from raw input APIs |
| 1277 | * - "1": RAWINPUT driver will also pull data from XInput, providing better |
| 1278 | * trigger axes, guide button presses, and rumble support for Xbox |
| 1279 | * controllers |
| 1280 | * |
| 1281 | * The default is "1". This hint applies to any joysticks opened after setting |
| 1282 | * the hint. |
| 1283 | */ |
| 1284 | #define SDL_HINT_JOYSTICK_RAWINPUT_CORRELATE_XINPUT "SDL_JOYSTICK_RAWINPUT_CORRELATE_XINPUT" |
| 1285 | |
| 1286 | /** |
| 1287 | * A variable controlling whether the ROG Chakram mice should show up as |
| 1288 | * joysticks |
| 1289 | * |
| 1290 | * This variable can be set to the following values: |
| 1291 | * |
| 1292 | * - "0": ROG Chakram mice do not show up as joysticks (the default) |
| 1293 | * - "1": ROG Chakram mice show up as joysticks |
| 1294 | */ |
| 1295 | #define SDL_HINT_JOYSTICK_ROG_CHAKRAM "SDL_JOYSTICK_ROG_CHAKRAM" |
| 1296 | |
| 1297 | /** |
| 1298 | * A variable controlling whether a separate thread should be used for |
| 1299 | * handling joystick detection and raw input messages on Windows |
| 1300 | * |
| 1301 | * This variable can be set to the following values: |
| 1302 | * |
| 1303 | * - "0": A separate thread is not used (the default) |
| 1304 | * - "1": A separate thread is used for handling raw input messages |
| 1305 | */ |
| 1306 | #define SDL_HINT_JOYSTICK_THREAD "SDL_JOYSTICK_THREAD" |
| 1307 | |
| 1308 | /** |
| 1309 | * A variable containing a list of throttle style controllers. |
| 1310 | * |
| 1311 | * The format of the string is a comma separated list of USB VID/PID pairs in |
| 1312 | * hexadecimal form, e.g. |
| 1313 | * |
| 1314 | * 0xAAAA/0xBBBB,0xCCCC/0xDDDD |
| 1315 | * |
| 1316 | * The variable can also take the form of @file, in which case the named file |
| 1317 | * will be loaded and interpreted as the value of the variable. |
| 1318 | */ |
| 1319 | #define SDL_HINT_JOYSTICK_THROTTLE_DEVICES "SDL_JOYSTICK_THROTTLE_DEVICES" |
| 1320 | |
| 1321 | /** |
| 1322 | * A variable containing a list of devices that are not throttle style |
| 1323 | * controllers. |
| 1324 | * |
| 1325 | * This will override SDL_HINT_JOYSTICK_THROTTLE_DEVICES and the built in |
| 1326 | * device list. |
| 1327 | * |
| 1328 | * The format of the string is a comma separated list of USB VID/PID pairs in |
| 1329 | * hexadecimal form, e.g. |
| 1330 | * |
| 1331 | * 0xAAAA/0xBBBB,0xCCCC/0xDDDD |
| 1332 | * |
| 1333 | * The variable can also take the form of @file, in which case the named file |
| 1334 | * will be loaded and interpreted as the value of the variable. |
| 1335 | */ |
| 1336 | #define SDL_HINT_JOYSTICK_THROTTLE_DEVICES_EXCLUDED "SDL_JOYSTICK_THROTTLE_DEVICES_EXCLUDED" |
| 1337 | |
| 1338 | /** |
| 1339 | * A variable controlling whether Windows.Gaming.Input should be used for |
| 1340 | * controller handling. |
| 1341 | * |
| 1342 | * This variable can be set to the following values: |
| 1343 | * |
| 1344 | * - "0": WGI is not used |
| 1345 | * - "1": WGI is used (the default) |
| 1346 | */ |
| 1347 | #define SDL_HINT_JOYSTICK_WGI "SDL_JOYSTICK_WGI" |
| 1348 | |
| 1349 | /** |
| 1350 | * A variable containing a list of wheel style controllers. |
| 1351 | * |
| 1352 | * The format of the string is a comma separated list of USB VID/PID pairs in |
| 1353 | * hexadecimal form, e.g. |
| 1354 | * |
| 1355 | * 0xAAAA/0xBBBB,0xCCCC/0xDDDD |
| 1356 | * |
| 1357 | * The variable can also take the form of @file, in which case the named file |
| 1358 | * will be loaded and interpreted as the value of the variable. |
| 1359 | */ |
| 1360 | #define SDL_HINT_JOYSTICK_WHEEL_DEVICES "SDL_JOYSTICK_WHEEL_DEVICES" |
| 1361 | |
| 1362 | /** |
| 1363 | * A variable containing a list of devices that are not wheel style |
| 1364 | * controllers. |
| 1365 | * |
| 1366 | * This will override SDL_HINT_JOYSTICK_WHEEL_DEVICES and the built in device |
| 1367 | * list. |
| 1368 | * |
| 1369 | * The format of the string is a comma separated list of USB VID/PID pairs in |
| 1370 | * hexadecimal form, e.g. |
| 1371 | * |
| 1372 | * 0xAAAA/0xBBBB,0xCCCC/0xDDDD |
| 1373 | * |
| 1374 | * The variable can also take the form of @file, in which case the named file |
| 1375 | * will be loaded and interpreted as the value of the variable. |
| 1376 | */ |
| 1377 | #define SDL_HINT_JOYSTICK_WHEEL_DEVICES_EXCLUDED "SDL_JOYSTICK_WHEEL_DEVICES_EXCLUDED" |
| 1378 | |
| 1379 | /** |
| 1380 | * A variable containing a list of devices known to have all axes centered at |
| 1381 | * zero. |
| 1382 | * |
| 1383 | * The format of the string is a comma separated list of USB VID/PID pairs in |
| 1384 | * hexadecimal form, e.g. |
| 1385 | * |
| 1386 | * 0xAAAA/0xBBBB,0xCCCC/0xDDDD |
| 1387 | * |
| 1388 | * The variable can also take the form of @file, in which case the named file |
| 1389 | * will be loaded and interpreted as the value of the variable. |
| 1390 | */ |
| 1391 | #define SDL_HINT_JOYSTICK_ZERO_CENTERED_DEVICES "SDL_JOYSTICK_ZERO_CENTERED_DEVICES" |
| 1392 | |
| 1393 | /** |
| 1394 | * Determines whether SDL enforces that DRM master is required in order to |
| 1395 | * initialize the KMSDRM video backend. |
| 1396 | * |
| 1397 | * The DRM subsystem has a concept of a "DRM master" which is a DRM client |
| 1398 | * that has the ability to set planes, set cursor, etc. When SDL is DRM |
| 1399 | * master, it can draw to the screen using the SDL rendering APIs. Without DRM |
| 1400 | * master, SDL is still able to process input and query attributes of attached |
| 1401 | * displays, but it cannot change display state or draw to the screen |
| 1402 | * directly. |
| 1403 | * |
| 1404 | * In some cases, it can be useful to have the KMSDRM backend even if it |
| 1405 | * cannot be used for rendering. An app may want to use SDL for input |
| 1406 | * processing while using another rendering API (such as an MMAL overlay on |
| 1407 | * Raspberry Pi) or using its own code to render to DRM overlays that SDL |
| 1408 | * doesn't support. |
| 1409 | * |
| 1410 | * This hint must be set before initializing the video subsystem. |
| 1411 | * |
| 1412 | * This variable can be set to the following values: |
| 1413 | * |
| 1414 | * - "0": SDL will allow usage of the KMSDRM backend without DRM master |
| 1415 | * - "1": SDL Will require DRM master to use the KMSDRM backend (default) |
| 1416 | */ |
| 1417 | #define SDL_HINT_KMSDRM_REQUIRE_DRM_MASTER "SDL_KMSDRM_REQUIRE_DRM_MASTER" |
| 1418 | |
| 1419 | /** |
| 1420 | * A comma separated list of devices to open as joysticks |
| 1421 | * |
| 1422 | * This variable is currently only used by the Linux joystick driver. |
| 1423 | */ |
| 1424 | #define SDL_HINT_JOYSTICK_DEVICE "SDL_JOYSTICK_DEVICE" |
| 1425 | |
| 1426 | |
| 1427 | /** |
| 1428 | * A variable containing a list of devices and their desired number of haptic |
| 1429 | * (force feedback) enabled axis. |
| 1430 | * |
| 1431 | * The format of the string is a comma separated list of USB VID/PID pairs in |
| 1432 | * hexadecimal form plus the number of desired axes, e.g. |
| 1433 | * |
| 1434 | * `0xAAAA/0xBBBB/1,0xCCCC/0xDDDD/3` |
| 1435 | * |
| 1436 | * This hint supports a "wildcard" device that will set the number of haptic |
| 1437 | * axes on all initialized haptic devices which were not defined explicitly in |
| 1438 | * this hint. |
| 1439 | * |
| 1440 | * `0xFFFF/0xFFFF/1` |
| 1441 | * |
| 1442 | * This hint should be set before a controller is opened. The number of haptic |
| 1443 | * axes won't exceed the number of real axes found on the device. |
| 1444 | */ |
| 1445 | #define SDL_HINT_JOYSTICK_HAPTIC_AXES "SDL_JOYSTICK_HAPTIC_AXES" |
| 1446 | |
| 1447 | /** |
| 1448 | * A variable controlling whether joysticks on Linux will always treat 'hat' |
| 1449 | * axis inputs (ABS_HAT0X - ABS_HAT3Y) as 8-way digital hats without checking |
| 1450 | * whether they may be analog. |
| 1451 | * |
| 1452 | * This variable can be set to the following values: |
| 1453 | * |
| 1454 | * - "0": Only map hat axis inputs to digital hat outputs if the input axes |
| 1455 | * appear to actually be digital (the default) |
| 1456 | * - "1": Always handle the input axes numbered ABS_HAT0X to ABS_HAT3Y as |
| 1457 | * digital hats |
| 1458 | */ |
| 1459 | #define SDL_HINT_LINUX_DIGITAL_HATS "SDL_LINUX_DIGITAL_HATS" |
| 1460 | |
| 1461 | /** |
| 1462 | * A variable controlling whether digital hats on Linux will apply deadzones |
| 1463 | * to their underlying input axes or use unfiltered values. |
| 1464 | * |
| 1465 | * This variable can be set to the following values: |
| 1466 | * |
| 1467 | * - "0": Return digital hat values based on unfiltered input axis values |
| 1468 | * - "1": Return digital hat values with deadzones on the input axes taken |
| 1469 | * into account (the default) |
| 1470 | */ |
| 1471 | #define SDL_HINT_LINUX_HAT_DEADZONES "SDL_LINUX_HAT_DEADZONES" |
| 1472 | |
| 1473 | /** |
| 1474 | * A variable controlling whether to use the classic /dev/input/js* joystick |
| 1475 | * interface or the newer /dev/input/event* joystick interface on Linux |
| 1476 | * |
| 1477 | * This variable can be set to the following values: |
| 1478 | * |
| 1479 | * - "0": Use /dev/input/event* |
| 1480 | * - "1": Use /dev/input/js* |
| 1481 | * |
| 1482 | * By default the /dev/input/event* interfaces are used |
| 1483 | */ |
| 1484 | #define SDL_HINT_LINUX_JOYSTICK_CLASSIC "SDL_LINUX_JOYSTICK_CLASSIC" |
| 1485 | |
| 1486 | /** |
| 1487 | * A variable controlling whether joysticks on Linux adhere to their |
| 1488 | * HID-defined deadzones or return unfiltered values. |
| 1489 | * |
| 1490 | * This variable can be set to the following values: |
| 1491 | * |
| 1492 | * - "0": Return unfiltered joystick axis values (the default) |
| 1493 | * - "1": Return axis values with deadzones taken into account |
| 1494 | */ |
| 1495 | #define SDL_HINT_LINUX_JOYSTICK_DEADZONES "SDL_LINUX_JOYSTICK_DEADZONES" |
| 1496 | |
| 1497 | /** |
| 1498 | * A variable controlling the default SDL log levels. |
| 1499 | * |
| 1500 | * This variable is a comma separated set of category=level tokens that define |
| 1501 | * the default logging levels for SDL applications. |
| 1502 | * |
| 1503 | * The category can be a numeric category, one of "app", "error", "assert", |
| 1504 | * "system", "audio", "video", "render", "input", "test", or `*` for any |
| 1505 | * unspecified category. |
| 1506 | * |
| 1507 | * The level can be a numeric level, one of "verbose", "debug", "info", |
| 1508 | * "warn", "error", "critical", or "quiet" to disable that category. |
| 1509 | * |
| 1510 | * You can omit the category if you want to set the logging level for all |
| 1511 | * categories. |
| 1512 | * |
| 1513 | * If this hint isn't set, the default log levels are equivalent to: |
| 1514 | * "app=info,assert=warn,test=verbose,*=error" |
| 1515 | */ |
| 1516 | #define SDL_HINT_LOGGING "SDL_LOGGING" |
| 1517 | |
| 1518 | /** |
| 1519 | * When set don't force the SDL app to become a foreground process |
| 1520 | * |
| 1521 | * This hint only applies to Mac OS X. |
| 1522 | */ |
| 1523 | #define SDL_HINT_MAC_BACKGROUND_APP "SDL_MAC_BACKGROUND_APP" |
| 1524 | |
| 1525 | /** |
| 1526 | * A variable that determines whether ctrl+click should generate a right-click |
| 1527 | * event on Mac |
| 1528 | * |
| 1529 | * If present, holding ctrl while left clicking will generate a right click |
| 1530 | * event when on Mac. |
| 1531 | */ |
| 1532 | #define SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK "SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK" |
| 1533 | |
| 1534 | /** |
| 1535 | * A variable controlling whether dispatching OpenGL context updates should |
| 1536 | * block the dispatching thread until the main thread finishes processing |
| 1537 | * |
| 1538 | * This variable can be set to the following values: |
| 1539 | * |
| 1540 | * - "0": Dispatching OpenGL context updates will block the dispatching thread |
| 1541 | * until the main thread finishes processing (default). |
| 1542 | * - "1": Dispatching OpenGL context updates will allow the dispatching thread |
| 1543 | * to continue execution. |
| 1544 | * |
| 1545 | * Generally you want the default, but if you have OpenGL code in a background |
| 1546 | * thread on a Mac, and the main thread hangs because it's waiting for that |
| 1547 | * background thread, but that background thread is also hanging because it's |
| 1548 | * waiting for the main thread to do an update, this might fix your issue. |
| 1549 | * |
| 1550 | * This hint only applies to macOS. |
| 1551 | * |
| 1552 | * This hint is available since SDL 2.24.0. |
| 1553 | */ |
| 1554 | #define SDL_HINT_MAC_OPENGL_ASYNC_DISPATCH "SDL_MAC_OPENGL_ASYNC_DISPATCH" |
| 1555 | |
| 1556 | /** |
| 1557 | * A variable setting the double click radius, in pixels. |
| 1558 | */ |
| 1559 | #define SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS "SDL_MOUSE_DOUBLE_CLICK_RADIUS" |
| 1560 | |
| 1561 | /** |
| 1562 | * A variable setting the double click time, in milliseconds. |
| 1563 | */ |
| 1564 | #define SDL_HINT_MOUSE_DOUBLE_CLICK_TIME "SDL_MOUSE_DOUBLE_CLICK_TIME" |
| 1565 | |
| 1566 | /** |
| 1567 | * Allow mouse click events when clicking to focus an SDL window |
| 1568 | * |
| 1569 | * This variable can be set to the following values: |
| 1570 | * |
| 1571 | * - "0": Ignore mouse clicks that activate a window |
| 1572 | * - "1": Generate events for mouse clicks that activate a window |
| 1573 | * |
| 1574 | * By default SDL will ignore mouse clicks that activate a window |
| 1575 | */ |
| 1576 | #define SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH "SDL_MOUSE_FOCUS_CLICKTHROUGH" |
| 1577 | |
| 1578 | /** |
| 1579 | * A variable setting the speed scale for mouse motion, in floating point, |
| 1580 | * when the mouse is not in relative mode |
| 1581 | */ |
| 1582 | #define SDL_HINT_MOUSE_NORMAL_SPEED_SCALE "SDL_MOUSE_NORMAL_SPEED_SCALE" |
| 1583 | |
| 1584 | /** |
| 1585 | * A variable controlling whether relative mouse mode constrains the mouse to |
| 1586 | * the center of the window |
| 1587 | * |
| 1588 | * This variable can be set to the following values: |
| 1589 | * |
| 1590 | * - "0": Relative mouse mode constrains the mouse to the window |
| 1591 | * - "1": Relative mouse mode constrains the mouse to the center of the window |
| 1592 | * |
| 1593 | * Constraining to the center of the window works better for FPS games and |
| 1594 | * when the application is running over RDP. Constraining to the whole window |
| 1595 | * works better for 2D games and increases the chance that the mouse will be |
| 1596 | * in the correct position when using high DPI mice. |
| 1597 | * |
| 1598 | * By default SDL will constrain the mouse to the center of the window |
| 1599 | */ |
| 1600 | #define SDL_HINT_MOUSE_RELATIVE_MODE_CENTER "SDL_MOUSE_RELATIVE_MODE_CENTER" |
| 1601 | |
| 1602 | /** |
| 1603 | * A variable controlling whether relative mouse mode is implemented using |
| 1604 | * mouse warping |
| 1605 | * |
| 1606 | * This variable can be set to the following values: |
| 1607 | * |
| 1608 | * - "0": Relative mouse mode uses raw input |
| 1609 | * - "1": Relative mouse mode uses mouse warping |
| 1610 | * |
| 1611 | * By default SDL will use raw input for relative mouse mode |
| 1612 | */ |
| 1613 | #define SDL_HINT_MOUSE_RELATIVE_MODE_WARP "SDL_MOUSE_RELATIVE_MODE_WARP" |
| 1614 | |
| 1615 | /** |
| 1616 | * A variable controlling whether relative mouse motion is affected by |
| 1617 | * renderer scaling |
| 1618 | * |
| 1619 | * This variable can be set to the following values: |
| 1620 | * |
| 1621 | * - "0": Relative motion is unaffected by DPI or renderer's logical size |
| 1622 | * - "1": Relative motion is scaled according to DPI scaling and logical size |
| 1623 | * |
| 1624 | * By default relative mouse deltas are affected by DPI and renderer scaling |
| 1625 | */ |
| 1626 | #define SDL_HINT_MOUSE_RELATIVE_SCALING "SDL_MOUSE_RELATIVE_SCALING" |
| 1627 | |
| 1628 | /** |
| 1629 | * A variable setting the scale for mouse motion, in floating point, when the |
| 1630 | * mouse is in relative mode |
| 1631 | */ |
| 1632 | #define SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE "SDL_MOUSE_RELATIVE_SPEED_SCALE" |
| 1633 | |
| 1634 | /** |
| 1635 | * A variable controlling whether the system mouse acceleration curve is used |
| 1636 | * for relative mouse motion. |
| 1637 | * |
| 1638 | * This variable can be set to the following values: |
| 1639 | * |
| 1640 | * - "0": Relative mouse motion will be unscaled (the default) |
| 1641 | * - "1": Relative mouse motion will be scaled using the system mouse |
| 1642 | * acceleration curve. |
| 1643 | * |
| 1644 | * If SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE is set, that will override the |
| 1645 | * system speed scale. |
| 1646 | */ |
| 1647 | #define SDL_HINT_MOUSE_RELATIVE_SYSTEM_SCALE "SDL_MOUSE_RELATIVE_SYSTEM_SCALE" |
| 1648 | |
| 1649 | /** |
| 1650 | * A variable controlling whether a motion event should be generated for mouse |
| 1651 | * warping in relative mode. |
| 1652 | * |
| 1653 | * This variable can be set to the following values: |
| 1654 | * |
| 1655 | * - "0": Warping the mouse will not generate a motion event in relative mode |
| 1656 | * - "1": Warping the mouse will generate a motion event in relative mode |
| 1657 | * |
| 1658 | * By default warping the mouse will not generate motion events in relative |
| 1659 | * mode. This avoids the application having to filter out large relative |
| 1660 | * motion due to warping. |
| 1661 | */ |
| 1662 | #define SDL_HINT_MOUSE_RELATIVE_WARP_MOTION "SDL_MOUSE_RELATIVE_WARP_MOTION" |
| 1663 | |
| 1664 | /** |
| 1665 | * A variable controlling whether the hardware cursor stays visible when |
| 1666 | * relative mode is active. |
| 1667 | * |
| 1668 | * This variable can be set to the following values: "0" - The cursor will be |
| 1669 | * hidden while relative mode is active (default) "1" - The cursor will remain |
| 1670 | * visible while relative mode is active |
| 1671 | * |
| 1672 | * Note that for systems without raw hardware inputs, relative mode is |
| 1673 | * implemented using warping, so the hardware cursor will visibly warp between |
| 1674 | * frames if this is enabled on those systems. |
| 1675 | */ |
| 1676 | #define SDL_HINT_MOUSE_RELATIVE_CURSOR_VISIBLE "SDL_MOUSE_RELATIVE_CURSOR_VISIBLE" |
| 1677 | |
| 1678 | /** |
| 1679 | * A variable controlling whether mouse events should generate synthetic touch |
| 1680 | * events |
| 1681 | * |
| 1682 | * This variable can be set to the following values: |
| 1683 | * |
| 1684 | * - "0": Mouse events will not generate touch events (default for desktop |
| 1685 | * platforms) |
| 1686 | * - "1": Mouse events will generate touch events (default for mobile |
| 1687 | * platforms, such as Android and iOS) |
| 1688 | */ |
| 1689 | #define SDL_HINT_MOUSE_TOUCH_EVENTS "SDL_MOUSE_TOUCH_EVENTS" |
| 1690 | |
| 1691 | /** |
| 1692 | * A variable controlling whether the mouse is captured while mouse buttons |
| 1693 | * are pressed |
| 1694 | * |
| 1695 | * This variable can be set to the following values: |
| 1696 | * |
| 1697 | * - "0": The mouse is not captured while mouse buttons are pressed |
| 1698 | * - "1": The mouse is captured while mouse buttons are pressed |
| 1699 | * |
| 1700 | * By default the mouse is captured while mouse buttons are pressed so if the |
| 1701 | * mouse is dragged outside the window, the application continues to receive |
| 1702 | * mouse events until the button is released. |
| 1703 | */ |
| 1704 | #define SDL_HINT_MOUSE_AUTO_CAPTURE "SDL_MOUSE_AUTO_CAPTURE" |
| 1705 | |
| 1706 | /** |
| 1707 | * Tell SDL not to catch the SIGINT or SIGTERM signals. |
| 1708 | * |
| 1709 | * This hint only applies to Unix-like platforms, and should set before any |
| 1710 | * calls to SDL_Init() |
| 1711 | * |
| 1712 | * The variable can be set to the following values: |
| 1713 | * |
| 1714 | * - "0": SDL will install a SIGINT and SIGTERM handler, and when it catches a |
| 1715 | * signal, convert it into an SDL_QUIT event. |
| 1716 | * - "1": SDL will not install a signal handler at all. |
| 1717 | */ |
| 1718 | #define SDL_HINT_NO_SIGNAL_HANDLERS "SDL_NO_SIGNAL_HANDLERS" |
| 1719 | |
| 1720 | /** |
| 1721 | * A variable controlling what driver to use for OpenGL ES contexts. |
| 1722 | * |
| 1723 | * On some platforms, currently Windows and X11, OpenGL drivers may support |
| 1724 | * creating contexts with an OpenGL ES profile. By default SDL uses these |
| 1725 | * profiles, when available, otherwise it attempts to load an OpenGL ES |
| 1726 | * library, e.g. that provided by the ANGLE project. This variable controls |
| 1727 | * whether SDL follows this default behaviour or will always load an OpenGL ES |
| 1728 | * library. |
| 1729 | * |
| 1730 | * Circumstances where this is useful include - Testing an app with a |
| 1731 | * particular OpenGL ES implementation, e.g ANGLE, or emulator, e.g. those |
| 1732 | * from ARM, Imagination or Qualcomm. - Resolving OpenGL ES function addresses |
| 1733 | * at link time by linking with the OpenGL ES library instead of querying them |
| 1734 | * at run time with SDL_GL_GetProcAddress(). |
| 1735 | * |
| 1736 | * Caution: for an application to work with the default behaviour across |
| 1737 | * different OpenGL drivers it must query the OpenGL ES function addresses at |
| 1738 | * run time using SDL_GL_GetProcAddress(). |
| 1739 | * |
| 1740 | * This variable is ignored on most platforms because OpenGL ES is native or |
| 1741 | * not supported. |
| 1742 | * |
| 1743 | * This variable can be set to the following values: |
| 1744 | * |
| 1745 | * - "0": Use ES profile of OpenGL, if available. (Default when not set.) |
| 1746 | * - "1": Load OpenGL ES library using the default library names. |
| 1747 | */ |
| 1748 | #define SDL_HINT_OPENGL_ES_DRIVER "SDL_OPENGL_ES_DRIVER" |
| 1749 | |
| 1750 | /** |
| 1751 | * A variable controlling which orientations are allowed on iOS/Android. |
| 1752 | * |
| 1753 | * In some circumstances it is necessary to be able to explicitly control |
| 1754 | * which UI orientations are allowed. |
| 1755 | * |
| 1756 | * This variable is a space delimited list of the following values: |
| 1757 | * |
| 1758 | * - "LandscapeLeft" |
| 1759 | * - "LandscapeRight" |
| 1760 | * - "Portrait" |
| 1761 | * - "PortraitUpsideDown" |
| 1762 | */ |
| 1763 | #define SDL_HINT_ORIENTATIONS "SDL_IOS_ORIENTATIONS" |
| 1764 | |
| 1765 | /** |
| 1766 | * A variable controlling the use of a sentinel event when polling the event |
| 1767 | * queue |
| 1768 | * |
| 1769 | * This variable can be set to the following values: |
| 1770 | * |
| 1771 | * - "0": Disable poll sentinels |
| 1772 | * - "1": Enable poll sentinels |
| 1773 | * |
| 1774 | * When polling for events, SDL_PumpEvents is used to gather new events from |
| 1775 | * devices. If a device keeps producing new events between calls to |
| 1776 | * SDL_PumpEvents, a poll loop will become stuck until the new events stop. |
| 1777 | * This is most noticeable when moving a high frequency mouse. |
| 1778 | * |
| 1779 | * By default, poll sentinels are enabled. |
| 1780 | */ |
| 1781 | #define SDL_HINT_POLL_SENTINEL "SDL_POLL_SENTINEL" |
| 1782 | |
| 1783 | /** |
| 1784 | * Override for SDL_GetPreferredLocales() |
| 1785 | * |
| 1786 | * If set, this will be favored over anything the OS might report for the |
| 1787 | * user's preferred locales. Changing this hint at runtime will not generate a |
| 1788 | * SDL_LOCALECHANGED event (but if you can change the hint, you can push your |
| 1789 | * own event, if you want). |
| 1790 | * |
| 1791 | * The format of this hint is a comma-separated list of language and locale, |
| 1792 | * combined with an underscore, as is a common format: "en_GB". Locale is |
| 1793 | * optional: "en". So you might have a list like this: "en_GB,jp,es_PT" |
| 1794 | */ |
| 1795 | #define SDL_HINT_PREFERRED_LOCALES "SDL_PREFERRED_LOCALES" |
| 1796 | |
| 1797 | /** |
| 1798 | * A variable describing the content orientation on QtWayland-based platforms. |
| 1799 | * |
| 1800 | * On QtWayland platforms, windows are rotated client-side to allow for custom |
| 1801 | * transitions. In order to correctly position overlays (e.g. volume bar) and |
| 1802 | * gestures (e.g. events view, close/minimize gestures), the system needs to |
| 1803 | * know in which orientation the application is currently drawing its |
| 1804 | * contents. |
| 1805 | * |
| 1806 | * This does not cause the window to be rotated or resized, the application |
| 1807 | * needs to take care of drawing the content in the right orientation (the |
| 1808 | * framebuffer is always in portrait mode). |
| 1809 | * |
| 1810 | * This variable can be one of the following values: |
| 1811 | * |
| 1812 | * - "primary" (default) |
| 1813 | * - "portrait" |
| 1814 | * - "landscape" |
| 1815 | * - "inverted-portrait" |
| 1816 | * - "inverted-landscape" |
| 1817 | * |
| 1818 | * Since SDL 2.0.22 this variable accepts a comma-separated list of values |
| 1819 | * above. |
| 1820 | */ |
| 1821 | #define SDL_HINT_QTWAYLAND_CONTENT_ORIENTATION "SDL_QTWAYLAND_CONTENT_ORIENTATION" |
| 1822 | |
| 1823 | /** |
| 1824 | * Flags to set on QtWayland windows to integrate with the native window |
| 1825 | * manager. |
| 1826 | * |
| 1827 | * On QtWayland platforms, this hint controls the flags to set on the windows. |
| 1828 | * For example, on Sailfish OS "OverridesSystemGestures" disables swipe |
| 1829 | * gestures. |
| 1830 | * |
| 1831 | * This variable is a space-separated list of the following values (empty = no |
| 1832 | * flags): |
| 1833 | * |
| 1834 | * - "OverridesSystemGestures" |
| 1835 | * - "StaysOnTop" |
| 1836 | * - "BypassWindowManager" |
| 1837 | */ |
| 1838 | #define SDL_HINT_QTWAYLAND_WINDOW_FLAGS "SDL_QTWAYLAND_WINDOW_FLAGS" |
| 1839 | |
| 1840 | /** |
| 1841 | * A variable controlling whether the 2D render API is compatible or |
| 1842 | * efficient. |
| 1843 | * |
| 1844 | * This variable can be set to the following values: |
| 1845 | * |
| 1846 | * - "0": Don't use batching to make rendering more efficient. |
| 1847 | * - "1": Use batching, but might cause problems if app makes its own direct |
| 1848 | * OpenGL calls. |
| 1849 | * |
| 1850 | * Up to SDL 2.0.9, the render API would draw immediately when requested. Now |
| 1851 | * it batches up draw requests and sends them all to the GPU only when forced |
| 1852 | * to (during SDL_RenderPresent, when changing render targets, by updating a |
| 1853 | * texture that the batch needs, etc). This is significantly more efficient, |
| 1854 | * but it can cause problems for apps that expect to render on top of the |
| 1855 | * render API's output. As such, SDL will disable batching if a specific |
| 1856 | * render backend is requested (since this might indicate that the app is |
| 1857 | * planning to use the underlying graphics API directly). This hint can be |
| 1858 | * used to explicitly request batching in this instance. It is a contract that |
| 1859 | * you will either never use the underlying graphics API directly, or if you |
| 1860 | * do, you will call SDL_RenderFlush() before you do so any current batch goes |
| 1861 | * to the GPU before your work begins. Not following this contract will result |
| 1862 | * in undefined behavior. |
| 1863 | */ |
| 1864 | #define SDL_HINT_RENDER_BATCHING "SDL_RENDER_BATCHING" |
| 1865 | |
| 1866 | /** |
| 1867 | * A variable controlling how the 2D render API renders lines |
| 1868 | * |
| 1869 | * This variable can be set to the following values: |
| 1870 | * |
| 1871 | * - "0": Use the default line drawing method (Bresenham's line algorithm as |
| 1872 | * of SDL 2.0.20) |
| 1873 | * - "1": Use the driver point API using Bresenham's line algorithm (correct, |
| 1874 | * draws many points) |
| 1875 | * - "2": Use the driver line API (occasionally misses line endpoints based on |
| 1876 | * hardware driver quirks, was the default before 2.0.20) |
| 1877 | * - "3": Use the driver geometry API (correct, draws thicker diagonal lines) |
| 1878 | * |
| 1879 | * This variable should be set when the renderer is created. |
| 1880 | */ |
| 1881 | #define SDL_HINT_RENDER_LINE_METHOD "SDL_RENDER_LINE_METHOD" |
| 1882 | |
| 1883 | /** |
| 1884 | * A variable controlling whether to enable Direct3D 11+'s Debug Layer. |
| 1885 | * |
| 1886 | * This variable does not have any effect on the Direct3D 9 based renderer. |
| 1887 | * |
| 1888 | * This variable can be set to the following values: |
| 1889 | * |
| 1890 | * - "0": Disable Debug Layer use |
| 1891 | * - "1": Enable Debug Layer use |
| 1892 | * |
| 1893 | * By default, SDL does not use Direct3D Debug Layer. |
| 1894 | */ |
| 1895 | #define SDL_HINT_RENDER_DIRECT3D11_DEBUG "SDL_RENDER_DIRECT3D11_DEBUG" |
| 1896 | |
| 1897 | /** |
| 1898 | * A variable controlling whether the Direct3D device is initialized for |
| 1899 | * thread-safe operations. |
| 1900 | * |
| 1901 | * This variable can be set to the following values: |
| 1902 | * |
| 1903 | * - "0": Thread-safety is not enabled (faster) |
| 1904 | * - "1": Thread-safety is enabled |
| 1905 | * |
| 1906 | * By default the Direct3D device is created with thread-safety disabled. |
| 1907 | */ |
| 1908 | #define SDL_HINT_RENDER_DIRECT3D_THREADSAFE "SDL_RENDER_DIRECT3D_THREADSAFE" |
| 1909 | |
| 1910 | /** |
| 1911 | * A variable specifying which render driver to use. |
| 1912 | * |
| 1913 | * If the application doesn't pick a specific renderer to use, this variable |
| 1914 | * specifies the name of the preferred renderer. If the preferred renderer |
| 1915 | * can't be initialized, the normal default renderer is used. |
| 1916 | * |
| 1917 | * This variable is case insensitive and can be set to the following values: |
| 1918 | * |
| 1919 | * - "direct3d" |
| 1920 | * - "direct3d11" |
| 1921 | * - "direct3d12" |
| 1922 | * - "opengl" |
| 1923 | * - "opengles2" |
| 1924 | * - "opengles" |
| 1925 | * - "metal" |
| 1926 | * - "software" |
| 1927 | * |
| 1928 | * The default varies by platform, but it's the first one in the list that is |
| 1929 | * available on the current platform. |
| 1930 | */ |
| 1931 | #define SDL_HINT_RENDER_DRIVER "SDL_RENDER_DRIVER" |
| 1932 | |
| 1933 | /** |
| 1934 | * A variable controlling the scaling policy for SDL_RenderSetLogicalSize. |
| 1935 | * |
| 1936 | * This variable can be set to the following values: |
| 1937 | * |
| 1938 | * "0" or "letterbox" - Uses letterbox/sidebars to fit the entire rendering on |
| 1939 | * screen "1" or "overscan" - Will zoom the rendering so it fills the entire |
| 1940 | * screen, allowing edges to be drawn offscreen |
| 1941 | * |
| 1942 | * By default letterbox is used |
| 1943 | */ |
| 1944 | #define SDL_HINT_RENDER_LOGICAL_SIZE_MODE "SDL_RENDER_LOGICAL_SIZE_MODE" |
| 1945 | |
| 1946 | /** |
| 1947 | * A variable controlling whether the OpenGL render driver uses shaders if |
| 1948 | * they are available. |
| 1949 | * |
| 1950 | * This variable can be set to the following values: |
| 1951 | * |
| 1952 | * - "0": Disable shaders |
| 1953 | * - "1": Enable shaders |
| 1954 | * |
| 1955 | * By default shaders are used if OpenGL supports them. |
| 1956 | */ |
| 1957 | #define SDL_HINT_RENDER_OPENGL_SHADERS "SDL_RENDER_OPENGL_SHADERS" |
| 1958 | |
| 1959 | /** |
| 1960 | * A variable controlling the scaling quality |
| 1961 | * |
| 1962 | * This variable can be set to the following values: |
| 1963 | * |
| 1964 | * - "0" or "nearest": Nearest pixel sampling |
| 1965 | * - "1" or "linear": Linear filtering (supported by OpenGL and Direct3D) |
| 1966 | * - "2" or "best": Currently this is the same as "linear" |
| 1967 | * |
| 1968 | * By default nearest pixel sampling is used |
| 1969 | */ |
| 1970 | #define SDL_HINT_RENDER_SCALE_QUALITY "SDL_RENDER_SCALE_QUALITY" |
| 1971 | |
| 1972 | /** |
| 1973 | * A variable controlling whether updates to the SDL screen surface should be |
| 1974 | * synchronized with the vertical refresh, to avoid tearing. |
| 1975 | * |
| 1976 | * This variable can be set to the following values: |
| 1977 | * |
| 1978 | * - "0": Disable vsync |
| 1979 | * - "1": Enable vsync |
| 1980 | * |
| 1981 | * By default SDL does not sync screen surface updates with vertical refresh. |
| 1982 | */ |
| 1983 | #define SDL_HINT_RENDER_VSYNC "SDL_RENDER_VSYNC" |
| 1984 | |
| 1985 | /** |
| 1986 | * A variable controlling whether the Metal render driver select low power |
| 1987 | * device over default one |
| 1988 | * |
| 1989 | * This variable can be set to the following values: |
| 1990 | * |
| 1991 | * - "0": Use the prefered OS device |
| 1992 | * - "1": Select a low power one |
| 1993 | * |
| 1994 | * By default the prefered OS device is used. |
| 1995 | */ |
| 1996 | #define SDL_HINT_RENDER_METAL_PREFER_LOW_POWER_DEVICE "SDL_RENDER_METAL_PREFER_LOW_POWER_DEVICE" |
| 1997 | |
| 1998 | /** |
| 1999 | * A variable containing a list of ROG gamepad capable mice. |
| 2000 | * |
| 2001 | * The format of the string is a comma separated list of USB VID/PID pairs in |
| 2002 | * hexadecimal form, e.g. |
| 2003 | * |
| 2004 | * 0xAAAA/0xBBBB,0xCCCC/0xDDDD |
| 2005 | * |
| 2006 | * The variable can also take the form of @file, in which case the named file |
| 2007 | * will be loaded and interpreted as the value of the variable. |
| 2008 | */ |
| 2009 | #define SDL_HINT_ROG_GAMEPAD_MICE "SDL_ROG_GAMEPAD_MICE" |
| 2010 | |
| 2011 | /** |
| 2012 | * A variable containing a list of devices that are not ROG gamepad capable |
| 2013 | * mice. |
| 2014 | * |
| 2015 | * This will override SDL_HINT_ROG_GAMEPAD_MICE and the built in device list. |
| 2016 | * |
| 2017 | * The format of the string is a comma separated list of USB VID/PID pairs in |
| 2018 | * hexadecimal form, e.g. |
| 2019 | * |
| 2020 | * 0xAAAA/0xBBBB,0xCCCC/0xDDDD |
| 2021 | * |
| 2022 | * The variable can also take the form of @file, in which case the named file |
| 2023 | * will be loaded and interpreted as the value of the variable. |
| 2024 | */ |
| 2025 | #define SDL_HINT_ROG_GAMEPAD_MICE_EXCLUDED "SDL_ROG_GAMEPAD_MICE_EXCLUDED" |
| 2026 | |
| 2027 | /** |
| 2028 | * Variable controlling the width of the PS2's framebuffer in pixels |
| 2029 | * |
| 2030 | * By default, this variable is "640" |
| 2031 | */ |
| 2032 | #define SDL_HINT_PS2_GS_WIDTH "SDL_PS2_GS_WIDTH" |
| 2033 | |
| 2034 | /** |
| 2035 | * Variable controlling the height of the PS2's framebuffer in pixels |
| 2036 | * |
| 2037 | * By default, this variable is "448" |
| 2038 | */ |
| 2039 | #define SDL_HINT_PS2_GS_HEIGHT "SDL_PS2_GS_HEIGHT" |
| 2040 | |
| 2041 | /** |
| 2042 | * Variable controlling whether the signal is interlaced or progressive |
| 2043 | * |
| 2044 | * - "0": Image is interlaced. (default) |
| 2045 | * - "1": Image is progressive |
| 2046 | */ |
| 2047 | #define SDL_HINT_PS2_GS_PROGRESSIVE "SDL_PS2_GS_PROGRESSIVE" |
| 2048 | |
| 2049 | /** |
| 2050 | * Variable controlling the video mode of the console |
| 2051 | * |
| 2052 | * - "": Console-native. (default) |
| 2053 | * - "NTSC": 60hz region |
| 2054 | * - "PAL": 50hz region |
| 2055 | */ |
| 2056 | #define SDL_HINT_PS2_GS_MODE "SDL_PS2_GS_MODE" |
| 2057 | |
| 2058 | /** |
| 2059 | * A variable controlling if VSYNC is automatically disable if doesn't reach |
| 2060 | * the enough FPS |
| 2061 | * |
| 2062 | * This variable can be set to the following values: |
| 2063 | * |
| 2064 | * - "0": It will be using VSYNC as defined in the main flag. Default |
| 2065 | * - "1": If VSYNC was previously enabled, then it will disable VSYNC if |
| 2066 | * doesn't reach enough speed |
| 2067 | * |
| 2068 | * By default SDL does not enable the automatic VSYNC |
| 2069 | */ |
| 2070 | #define SDL_HINT_PS2_DYNAMIC_VSYNC "SDL_PS2_DYNAMIC_VSYNC" |
| 2071 | |
| 2072 | /** |
| 2073 | * A variable to control whether the return key on the soft keyboard should |
| 2074 | * hide the soft keyboard on Android and iOS. |
| 2075 | * |
| 2076 | * The variable can be set to the following values: |
| 2077 | * |
| 2078 | * - "0": The return key will be handled as a key event. This is the behaviour |
| 2079 | * of SDL <= 2.0.3. (default) |
| 2080 | * - "1": The return key will hide the keyboard. |
| 2081 | * |
| 2082 | * The value of this hint is used at runtime, so it can be changed at any |
| 2083 | * time. |
| 2084 | */ |
| 2085 | #define SDL_HINT_RETURN_KEY_HIDES_IME "SDL_RETURN_KEY_HIDES_IME" |
| 2086 | |
| 2087 | /** |
| 2088 | * Tell SDL which Dispmanx layer to use on a Raspberry PI |
| 2089 | * |
| 2090 | * Also known as Z-order. The variable can take a negative or positive value. |
| 2091 | * The default is 10000. |
| 2092 | */ |
| 2093 | #define SDL_HINT_RPI_VIDEO_LAYER "SDL_RPI_VIDEO_LAYER" |
| 2094 | |
| 2095 | /** |
| 2096 | * Specify an "activity name" for screensaver inhibition. |
| 2097 | * |
| 2098 | * Some platforms, notably Linux desktops, list the applications which are |
| 2099 | * inhibiting the screensaver or other power-saving features. |
| 2100 | * |
| 2101 | * This hint lets you specify the "activity name" sent to the OS when |
| 2102 | * SDL_DisableScreenSaver() is used (or the screensaver is automatically |
| 2103 | * disabled). The contents of this hint are used when the screensaver is |
| 2104 | * disabled. You should use a string that describes what your program is doing |
| 2105 | * (and, therefore, why the screensaver is disabled). For example, "Playing a |
| 2106 | * game" or "Watching a video". |
| 2107 | * |
| 2108 | * Setting this to "" or leaving it unset will have SDL use a reasonable |
| 2109 | * default: "Playing a game" or something similar. |
| 2110 | * |
| 2111 | * On targets where this is not supported, this hint does nothing. |
| 2112 | */ |
| 2113 | #define SDL_HINT_SCREENSAVER_INHIBIT_ACTIVITY_NAME "SDL_SCREENSAVER_INHIBIT_ACTIVITY_NAME" |
| 2114 | |
| 2115 | /** |
| 2116 | * Specifies whether SDL_THREAD_PRIORITY_TIME_CRITICAL should be treated as |
| 2117 | * realtime. |
| 2118 | * |
| 2119 | * On some platforms, like Linux, a realtime priority thread may be subject to |
| 2120 | * restrictions that require special handling by the application. This hint |
| 2121 | * exists to let SDL know that the app is prepared to handle said |
| 2122 | * restrictions. |
| 2123 | * |
| 2124 | * On Linux, SDL will apply the following configuration to any thread that |
| 2125 | * becomes realtime: |
| 2126 | * |
| 2127 | * - The SCHED_RESET_ON_FORK bit will be set on the scheduling policy. |
| 2128 | * - An RLIMIT_RTTIME budget will be configured to the rtkit specified limit. |
| 2129 | * - Exceeding this limit will result in the kernel sending SIGKILL to the |
| 2130 | * app. |
| 2131 | * |
| 2132 | * Refer to the man pages for more information. |
| 2133 | * |
| 2134 | * This variable can be set to the following values: |
| 2135 | * |
| 2136 | * - "0": default platform specific behaviour |
| 2137 | * - "1": Force SDL_THREAD_PRIORITY_TIME_CRITICAL to a realtime scheduling |
| 2138 | * policy |
| 2139 | */ |
| 2140 | #define SDL_HINT_THREAD_FORCE_REALTIME_TIME_CRITICAL "SDL_THREAD_FORCE_REALTIME_TIME_CRITICAL" |
| 2141 | |
| 2142 | /** |
| 2143 | * A string specifying additional information to use with |
| 2144 | * SDL_SetThreadPriority. |
| 2145 | * |
| 2146 | * By default SDL_SetThreadPriority will make appropriate system changes in |
| 2147 | * order to apply a thread priority. For example on systems using pthreads the |
| 2148 | * scheduler policy is changed automatically to a policy that works well with |
| 2149 | * a given priority. Code which has specific requirements can override SDL's |
| 2150 | * default behavior with this hint. |
| 2151 | * |
| 2152 | * pthread hint values are "current", "other", "fifo" and "rr". Currently no |
| 2153 | * other platform hint values are defined but may be in the future. |
| 2154 | */ |
| 2155 | #define SDL_HINT_THREAD_PRIORITY_POLICY "SDL_THREAD_PRIORITY_POLICY" |
| 2156 | |
| 2157 | /** |
| 2158 | * A string specifying SDL's threads stack size in bytes or "0" for the |
| 2159 | * backend's default size |
| 2160 | * |
| 2161 | * Use this hint in case you need to set SDL's threads stack size to other |
| 2162 | * than the default. This is specially useful if you build SDL against a non |
| 2163 | * glibc libc library (such as musl) which provides a relatively small default |
| 2164 | * thread stack size (a few kilobytes versus the default 8MB glibc uses). |
| 2165 | * Support for this hint is currently available only in the pthread, Windows, |
| 2166 | * and PSP backend. |
| 2167 | * |
| 2168 | * Instead of this hint, in 2.0.9 and later, you can use |
| 2169 | * SDL_CreateThreadWithStackSize(). This hint only works with the classic |
| 2170 | * SDL_CreateThread(). |
| 2171 | */ |
| 2172 | #define SDL_HINT_THREAD_STACK_SIZE "SDL_THREAD_STACK_SIZE" |
| 2173 | |
| 2174 | /** |
| 2175 | * A variable that controls the timer resolution, in milliseconds. |
| 2176 | * |
| 2177 | * The higher resolution the timer, the more frequently the CPU services timer |
| 2178 | * interrupts, and the more precise delays are, but this takes up power and |
| 2179 | * CPU time. This hint is only used on Windows. |
| 2180 | * |
| 2181 | * See this blog post for more information: |
| 2182 | * http://randomascii.wordpress.com/2013/07/08/windows-timer-resolution-megawatts-wasted/ |
| 2183 | * |
| 2184 | * If this variable is set to "0", the system timer resolution is not set. |
| 2185 | * |
| 2186 | * The default value is "1". This hint may be set at any time. |
| 2187 | */ |
| 2188 | #define SDL_HINT_TIMER_RESOLUTION "SDL_TIMER_RESOLUTION" |
| 2189 | |
| 2190 | /** |
| 2191 | * A variable controlling whether touch events should generate synthetic mouse |
| 2192 | * events |
| 2193 | * |
| 2194 | * This variable can be set to the following values: |
| 2195 | * |
| 2196 | * - "0": Touch events will not generate mouse events |
| 2197 | * - "1": Touch events will generate mouse events |
| 2198 | * |
| 2199 | * By default SDL will generate mouse events for touch events |
| 2200 | */ |
| 2201 | #define SDL_HINT_TOUCH_MOUSE_EVENTS "SDL_TOUCH_MOUSE_EVENTS" |
| 2202 | |
| 2203 | /** |
| 2204 | * A variable controlling which touchpad should generate synthetic mouse |
| 2205 | * events |
| 2206 | * |
| 2207 | * This variable can be set to the following values: |
| 2208 | * |
| 2209 | * - "0": Only front touchpad should generate mouse events. Default |
| 2210 | * - "1": Only back touchpad should generate mouse events. |
| 2211 | * - "2": Both touchpads should generate mouse events. |
| 2212 | * |
| 2213 | * By default SDL will generate mouse events for all touch devices |
| 2214 | */ |
| 2215 | #define SDL_HINT_VITA_TOUCH_MOUSE_DEVICE "SDL_HINT_VITA_TOUCH_MOUSE_DEVICE" |
| 2216 | |
| 2217 | /** |
| 2218 | * A variable controlling whether the Android / tvOS remotes should be listed |
| 2219 | * as joystick devices, instead of sending keyboard events. |
| 2220 | * |
| 2221 | * This variable can be set to the following values: |
| 2222 | * |
| 2223 | * - "0": Remotes send enter/escape/arrow key events |
| 2224 | * - "1": Remotes are available as 2 axis, 2 button joysticks (the default). |
| 2225 | */ |
| 2226 | #define SDL_HINT_TV_REMOTE_AS_JOYSTICK "SDL_TV_REMOTE_AS_JOYSTICK" |
| 2227 | |
| 2228 | /** |
| 2229 | * A variable controlling whether the screensaver is enabled. |
| 2230 | * |
| 2231 | * This variable can be set to the following values: |
| 2232 | * |
| 2233 | * - "0": Disable screensaver |
| 2234 | * - "1": Enable screensaver |
| 2235 | * |
| 2236 | * By default SDL will disable the screensaver. |
| 2237 | */ |
| 2238 | #define SDL_HINT_VIDEO_ALLOW_SCREENSAVER "SDL_VIDEO_ALLOW_SCREENSAVER" |
| 2239 | |
| 2240 | /** |
| 2241 | * Tell the video driver that we only want a double buffer. |
| 2242 | * |
| 2243 | * By default, most lowlevel 2D APIs will use a triple buffer scheme that |
| 2244 | * wastes no CPU time on waiting for vsync after issuing a flip, but |
| 2245 | * introduces a frame of latency. On the other hand, using a double buffer |
| 2246 | * scheme instead is recommended for cases where low latency is an important |
| 2247 | * factor because we save a whole frame of latency. We do so by waiting for |
| 2248 | * vsync immediately after issuing a flip, usually just after eglSwapBuffers |
| 2249 | * call in the backend's *_SwapWindow function. |
| 2250 | * |
| 2251 | * Since it's driver-specific, it's only supported where possible and |
| 2252 | * implemented. Currently supported the following drivers: |
| 2253 | * |
| 2254 | * - Wayland (wayland) |
| 2255 | * - KMSDRM (kmsdrm) |
| 2256 | * - Raspberry Pi (raspberrypi) |
| 2257 | */ |
| 2258 | #define SDL_HINT_VIDEO_DOUBLE_BUFFER "SDL_VIDEO_DOUBLE_BUFFER" |
| 2259 | |
| 2260 | /** |
| 2261 | * A variable controlling whether the EGL window is allowed to be composited |
| 2262 | * as transparent, rather than opaque. |
| 2263 | * |
| 2264 | * Most window systems will always render windows opaque, even if the surface |
| 2265 | * format has an alpha channel. This is not always true, however, so by |
| 2266 | * default SDL will try to enforce opaque composition. To override this |
| 2267 | * behavior, you can set this hint to "1". |
| 2268 | */ |
| 2269 | #define SDL_HINT_VIDEO_EGL_ALLOW_TRANSPARENCY "SDL_VIDEO_EGL_ALLOW_TRANSPARENCY" |
| 2270 | |
| 2271 | /** |
| 2272 | * A variable controlling whether the graphics context is externally managed. |
| 2273 | * |
| 2274 | * This variable can be set to the following values: |
| 2275 | * |
| 2276 | * - "0": SDL will manage graphics contexts that are attached to windows. |
| 2277 | * - "1": Disable graphics context management on windows. |
| 2278 | * |
| 2279 | * By default SDL will manage OpenGL contexts in certain situations. For |
| 2280 | * example, on Android the context will be automatically saved and restored |
| 2281 | * when pausing the application. Additionally, some platforms will assume |
| 2282 | * usage of OpenGL if Vulkan isn't used. Setting this to "1" will prevent this |
| 2283 | * behavior, which is desireable when the application manages the graphics |
| 2284 | * context, such as an externally managed OpenGL context or attaching a Vulkan |
| 2285 | * surface to the window. |
| 2286 | */ |
| 2287 | #define SDL_HINT_VIDEO_EXTERNAL_CONTEXT "SDL_VIDEO_EXTERNAL_CONTEXT" |
| 2288 | |
| 2289 | /** |
| 2290 | * If set to 1, then do not allow high-DPI windows. |
| 2291 | * |
| 2292 | * ("Retina" on Mac and iOS) |
| 2293 | */ |
| 2294 | #define SDL_HINT_VIDEO_HIGHDPI_DISABLED "SDL_VIDEO_HIGHDPI_DISABLED" |
| 2295 | |
| 2296 | /** |
| 2297 | * A variable that dictates policy for fullscreen Spaces on Mac OS X. |
| 2298 | * |
| 2299 | * This hint only applies to Mac OS X. |
| 2300 | * |
| 2301 | * The variable can be set to the following values: |
| 2302 | * |
| 2303 | * - "0": Disable Spaces support (FULLSCREEN_DESKTOP won't use them and |
| 2304 | * SDL_WINDOW_RESIZABLE windows won't offer the "fullscreen" button on their |
| 2305 | * titlebars). |
| 2306 | * - "1": Enable Spaces support (FULLSCREEN_DESKTOP will use them and |
| 2307 | * SDL_WINDOW_RESIZABLE windows will offer the "fullscreen" button on their |
| 2308 | * titlebars). |
| 2309 | * |
| 2310 | * The default value is "1". This hint must be set before any windows are |
| 2311 | * created. |
| 2312 | */ |
| 2313 | #define SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES "SDL_VIDEO_MAC_FULLSCREEN_SPACES" |
| 2314 | |
| 2315 | /** |
| 2316 | * Minimize your SDL_Window if it loses key focus when in fullscreen mode. |
| 2317 | * |
| 2318 | * Defaults to false. |
| 2319 | */ |
| 2320 | #define SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS" |
| 2321 | |
| 2322 | /** |
| 2323 | * A variable controlling whether the libdecor Wayland backend is allowed to |
| 2324 | * be used. |
| 2325 | * |
| 2326 | * This variable can be set to the following values: |
| 2327 | * |
| 2328 | * - "0": libdecor use is disabled. |
| 2329 | * - "1": libdecor use is enabled (default). |
| 2330 | * |
| 2331 | * libdecor is used over xdg-shell when xdg-decoration protocol is |
| 2332 | * unavailable. |
| 2333 | */ |
| 2334 | #define SDL_HINT_VIDEO_WAYLAND_ALLOW_LIBDECOR "SDL_VIDEO_WAYLAND_ALLOW_LIBDECOR" |
| 2335 | |
| 2336 | /** |
| 2337 | * A variable controlling whether the libdecor Wayland backend is preferred |
| 2338 | * over native decorations. |
| 2339 | * |
| 2340 | * When this hint is set, libdecor will be used to provide window decorations, |
| 2341 | * even if xdg-decoration is available. (Note that, by default, libdecor will |
| 2342 | * use xdg-decoration itself if available). |
| 2343 | * |
| 2344 | * This variable can be set to the following values: |
| 2345 | * |
| 2346 | * - "0": libdecor is enabled only if server-side decorations are unavailable. |
| 2347 | * - "1": libdecor is always enabled if available. |
| 2348 | * |
| 2349 | * libdecor is used over xdg-shell when xdg-decoration protocol is |
| 2350 | * unavailable. |
| 2351 | */ |
| 2352 | #define SDL_HINT_VIDEO_WAYLAND_PREFER_LIBDECOR "SDL_VIDEO_WAYLAND_PREFER_LIBDECOR" |
| 2353 | |
| 2354 | /** |
| 2355 | * A variable controlling whether video mode emulation is enabled under |
| 2356 | * Wayland. |
| 2357 | * |
| 2358 | * When this hint is set, a standard set of emulated CVT video modes will be |
| 2359 | * exposed for use by the application. If it is disabled, the only modes |
| 2360 | * exposed will be the logical desktop size and, in the case of a scaled |
| 2361 | * desktop, the native display resolution. |
| 2362 | * |
| 2363 | * This variable can be set to the following values: |
| 2364 | * |
| 2365 | * - "0": Video mode emulation is disabled. |
| 2366 | * - "1": Video mode emulation is enabled. |
| 2367 | * |
| 2368 | * By default video mode emulation is enabled. |
| 2369 | */ |
| 2370 | #define SDL_HINT_VIDEO_WAYLAND_MODE_EMULATION "SDL_VIDEO_WAYLAND_MODE_EMULATION" |
| 2371 | |
| 2372 | /** |
| 2373 | * Enable or disable mouse pointer warp emulation, needed by some older games. |
| 2374 | * |
| 2375 | * When this hint is set, any SDL will emulate mouse warps using relative |
| 2376 | * mouse mode. This is required for some older games (such as Source engine |
| 2377 | * games), which warp the mouse to the centre of the screen rather than using |
| 2378 | * relative mouse motion. Note that relative mouse mode may have different |
| 2379 | * mouse acceleration behaviour than pointer warps. |
| 2380 | * |
| 2381 | * This variable can be set to the following values: |
| 2382 | * |
| 2383 | * - "0": All mouse warps fail, as mouse warping is not available under |
| 2384 | * wayland. |
| 2385 | * - "1": Some mouse warps will be emulated by forcing relative mouse mode. |
| 2386 | * |
| 2387 | * If not set, this is automatically enabled unless an application uses |
| 2388 | * relative mouse mode directly. |
| 2389 | */ |
| 2390 | #define SDL_HINT_VIDEO_WAYLAND_EMULATE_MOUSE_WARP "SDL_VIDEO_WAYLAND_EMULATE_MOUSE_WARP" |
| 2391 | |
| 2392 | /** |
| 2393 | * A variable that is the address of another SDL_Window* (as a hex string |
| 2394 | * formatted with "%p"). |
| 2395 | * |
| 2396 | * If this hint is set before SDL_CreateWindowFrom() and the SDL_Window* it is |
| 2397 | * set to has SDL_WINDOW_OPENGL set (and running on WGL only, currently), then |
| 2398 | * two things will occur on the newly created SDL_Window: |
| 2399 | * |
| 2400 | * 1. Its pixel format will be set to the same pixel format as this |
| 2401 | * SDL_Window. This is needed for example when sharing an OpenGL context |
| 2402 | * across multiple windows. |
| 2403 | * |
| 2404 | * 2. The flag SDL_WINDOW_OPENGL will be set on the new window so it can be |
| 2405 | * used for OpenGL rendering. |
| 2406 | * |
| 2407 | * This variable can be set to the following values: The address (as a string |
| 2408 | * "%p") of the SDL_Window* that new windows created with |
| 2409 | * SDL_CreateWindowFrom() should share a pixel format with. |
| 2410 | */ |
| 2411 | #define SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT "SDL_VIDEO_WINDOW_SHARE_PIXEL_FORMAT" |
| 2412 | |
| 2413 | /** |
| 2414 | * When calling SDL_CreateWindowFrom(), make the window compatible with |
| 2415 | * OpenGL. |
| 2416 | * |
| 2417 | * This variable can be set to the following values: |
| 2418 | * |
| 2419 | * - "0": Don't add any graphics flags to the SDL_WindowFlags |
| 2420 | * - "1": Add SDL_WINDOW_OPENGL to the SDL_WindowFlags |
| 2421 | * |
| 2422 | * By default SDL will not make the foreign window compatible with OpenGL. |
| 2423 | */ |
| 2424 | #define SDL_HINT_VIDEO_FOREIGN_WINDOW_OPENGL "SDL_VIDEO_FOREIGN_WINDOW_OPENGL" |
| 2425 | |
| 2426 | /** |
| 2427 | * When calling SDL_CreateWindowFrom(), make the window compatible with |
| 2428 | * Vulkan. |
| 2429 | * |
| 2430 | * This variable can be set to the following values: |
| 2431 | * |
| 2432 | * - "0": Don't add any graphics flags to the SDL_WindowFlags |
| 2433 | * - "1": Add SDL_WINDOW_VULKAN to the SDL_WindowFlags |
| 2434 | * |
| 2435 | * By default SDL will not make the foreign window compatible with Vulkan. |
| 2436 | */ |
| 2437 | #define SDL_HINT_VIDEO_FOREIGN_WINDOW_VULKAN "SDL_VIDEO_FOREIGN_WINDOW_VULKAN" |
| 2438 | |
| 2439 | /** |
| 2440 | * A variable specifying which shader compiler to preload when using the |
| 2441 | * Chrome ANGLE binaries |
| 2442 | * |
| 2443 | * SDL has EGL and OpenGL ES2 support on Windows via the ANGLE project. It can |
| 2444 | * use two different sets of binaries, those compiled by the user from source |
| 2445 | * or those provided by the Chrome browser. In the later case, these binaries |
| 2446 | * require that SDL loads a DLL providing the shader compiler. |
| 2447 | * |
| 2448 | * This variable can be set to the following values: |
| 2449 | * |
| 2450 | * - "d3dcompiler_46.dll: default, best for Vista or later. |
| 2451 | * - "d3dcompiler_43.dll: for XP support. |
| 2452 | * - "none": do not load any library, useful if you compiled ANGLE from source |
| 2453 | * and included the compiler in your binaries. |
| 2454 | */ |
| 2455 | #define SDL_HINT_VIDEO_WIN_D3DCOMPILER "SDL_VIDEO_WIN_D3DCOMPILER" |
| 2456 | |
| 2457 | /** |
| 2458 | * A variable controlling whether X11 should use GLX or EGL by default |
| 2459 | * |
| 2460 | * This variable can be set to the following values: |
| 2461 | * |
| 2462 | * - "0": Use GLX |
| 2463 | * - "1": Use EGL |
| 2464 | * |
| 2465 | * By default SDL will use GLX when both are present. |
| 2466 | */ |
| 2467 | #define SDL_HINT_VIDEO_X11_FORCE_EGL "SDL_VIDEO_X11_FORCE_EGL" |
| 2468 | |
| 2469 | /** |
| 2470 | * A variable controlling whether the X11 _NET_WM_BYPASS_COMPOSITOR hint |
| 2471 | * should be used. |
| 2472 | * |
| 2473 | * This variable can be set to the following values: |
| 2474 | * |
| 2475 | * - "0": Disable _NET_WM_BYPASS_COMPOSITOR |
| 2476 | * - "1": Enable _NET_WM_BYPASS_COMPOSITOR |
| 2477 | * |
| 2478 | * By default SDL will use _NET_WM_BYPASS_COMPOSITOR |
| 2479 | */ |
| 2480 | #define SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR "SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR" |
| 2481 | |
| 2482 | /** |
| 2483 | * A variable controlling whether the X11 _NET_WM_PING protocol should be |
| 2484 | * supported. |
| 2485 | * |
| 2486 | * This variable can be set to the following values: |
| 2487 | * |
| 2488 | * - "0": Disable _NET_WM_PING |
| 2489 | * - "1": Enable _NET_WM_PING |
| 2490 | * |
| 2491 | * By default SDL will use _NET_WM_PING, but for applications that know they |
| 2492 | * will not always be able to respond to ping requests in a timely manner they |
| 2493 | * can turn it off to avoid the window manager thinking the app is hung. The |
| 2494 | * hint is checked in CreateWindow. |
| 2495 | */ |
| 2496 | #define SDL_HINT_VIDEO_X11_NET_WM_PING "SDL_VIDEO_X11_NET_WM_PING" |
| 2497 | |
| 2498 | /** |
| 2499 | * A variable forcing the visual ID chosen for new X11 windows |
| 2500 | */ |
| 2501 | #define SDL_HINT_VIDEO_X11_WINDOW_VISUALID "SDL_VIDEO_X11_WINDOW_VISUALID" |
| 2502 | |
| 2503 | /** |
| 2504 | * A no-longer-used variable controlling whether the X11 Xinerama extension |
| 2505 | * should be used. |
| 2506 | * |
| 2507 | * Before SDL 2.0.24, this would let apps and users disable Xinerama support |
| 2508 | * on X11. Now SDL never uses Xinerama, and does not check for this hint at |
| 2509 | * all. The preprocessor define is left here for source compatibility. |
| 2510 | */ |
| 2511 | #define SDL_HINT_VIDEO_X11_XINERAMA "SDL_VIDEO_X11_XINERAMA" |
| 2512 | |
| 2513 | /** |
| 2514 | * A variable controlling whether the X11 XRandR extension should be used. |
| 2515 | * |
| 2516 | * This variable can be set to the following values: |
| 2517 | * |
| 2518 | * - "0": Disable XRandR |
| 2519 | * - "1": Enable XRandR |
| 2520 | * |
| 2521 | * By default SDL will use XRandR. |
| 2522 | */ |
| 2523 | #define SDL_HINT_VIDEO_X11_XRANDR "SDL_VIDEO_X11_XRANDR" |
| 2524 | |
| 2525 | /** |
| 2526 | * A no-longer-used variable controlling whether the X11 VidMode extension |
| 2527 | * should be used. |
| 2528 | * |
| 2529 | * Before SDL 2.0.24, this would let apps and users disable XVidMode support |
| 2530 | * on X11. Now SDL never uses XVidMode, and does not check for this hint at |
| 2531 | * all. The preprocessor define is left here for source compatibility. |
| 2532 | */ |
| 2533 | #define SDL_HINT_VIDEO_X11_XVIDMODE "SDL_VIDEO_X11_XVIDMODE" |
| 2534 | |
| 2535 | /** |
| 2536 | * Controls how the fact chunk affects the loading of a WAVE file. |
| 2537 | * |
| 2538 | * The fact chunk stores information about the number of samples of a WAVE |
| 2539 | * file. The Standards Update from Microsoft notes that this value can be used |
| 2540 | * to 'determine the length of the data in seconds'. This is especially useful |
| 2541 | * for compressed formats (for which this is a mandatory chunk) if they |
| 2542 | * produce multiple sample frames per block and truncating the block is not |
| 2543 | * allowed. The fact chunk can exactly specify how many sample frames there |
| 2544 | * should be in this case. |
| 2545 | * |
| 2546 | * Unfortunately, most application seem to ignore the fact chunk and so SDL |
| 2547 | * ignores it by default as well. |
| 2548 | * |
| 2549 | * This variable can be set to the following values: |
| 2550 | * |
| 2551 | * - "truncate": Use the number of samples to truncate the wave data if the |
| 2552 | * fact chunk is present and valid |
| 2553 | * - "strict": Like "truncate", but raise an error if the fact chunk is |
| 2554 | * invalid, not present for non-PCM formats, or if the data chunk doesn't |
| 2555 | * have that many samples |
| 2556 | * - "ignorezero": Like "truncate", but ignore fact chunk if the number of |
| 2557 | * samples is zero |
| 2558 | * - "ignore": Ignore fact chunk entirely (default) |
| 2559 | */ |
| 2560 | #define SDL_HINT_WAVE_FACT_CHUNK "SDL_WAVE_FACT_CHUNK" |
| 2561 | |
| 2562 | /** |
| 2563 | * Controls how the size of the RIFF chunk affects the loading of a WAVE file. |
| 2564 | * |
| 2565 | * The size of the RIFF chunk (which includes all the sub-chunks of the WAVE |
| 2566 | * file) is not always reliable. In case the size is wrong, it's possible to |
| 2567 | * just ignore it and step through the chunks until a fixed limit is reached. |
| 2568 | * |
| 2569 | * Note that files that have trailing data unrelated to the WAVE file or |
| 2570 | * corrupt files may slow down the loading process without a reliable |
| 2571 | * boundary. By default, SDL stops after 10000 chunks to prevent wasting time. |
| 2572 | * Use the environment variable SDL_WAVE_CHUNK_LIMIT to adjust this value. |
| 2573 | * |
| 2574 | * This variable can be set to the following values: |
| 2575 | * |
| 2576 | * - "force": Always use the RIFF chunk size as a boundary for the chunk |
| 2577 | * search |
| 2578 | * - "ignorezero": Like "force", but a zero size searches up to 4 GiB |
| 2579 | * (default) |
| 2580 | * - "ignore": Ignore the RIFF chunk size and always search up to 4 GiB |
| 2581 | * - "maximum": Search for chunks until the end of file (not recommended) |
| 2582 | */ |
| 2583 | #define SDL_HINT_WAVE_RIFF_CHUNK_SIZE "SDL_WAVE_RIFF_CHUNK_SIZE" |
| 2584 | |
| 2585 | /** |
| 2586 | * Controls how a truncated WAVE file is handled. |
| 2587 | * |
| 2588 | * A WAVE file is considered truncated if any of the chunks are incomplete or |
| 2589 | * the data chunk size is not a multiple of the block size. By default, SDL |
| 2590 | * decodes until the first incomplete block, as most applications seem to do. |
| 2591 | * |
| 2592 | * This variable can be set to the following values: |
| 2593 | * |
| 2594 | * - "verystrict": Raise an error if the file is truncated |
| 2595 | * - "strict": Like "verystrict", but the size of the RIFF chunk is ignored |
| 2596 | * - "dropframe": Decode until the first incomplete sample frame |
| 2597 | * - "dropblock": Decode until the first incomplete block (default) |
| 2598 | */ |
| 2599 | #define SDL_HINT_WAVE_TRUNCATION "SDL_WAVE_TRUNCATION" |
| 2600 | |
| 2601 | /** |
| 2602 | * Tell SDL not to name threads on Windows with the 0x406D1388 Exception. |
| 2603 | * |
| 2604 | * The 0x406D1388 Exception is a trick used to inform Visual Studio of a |
| 2605 | * thread's name, but it tends to cause problems with other debuggers, and the |
| 2606 | * .NET runtime. Note that SDL 2.0.6 and later will still use the (safer) |
| 2607 | * SetThreadDescription API, introduced in the Windows 10 Creators Update, if |
| 2608 | * available. |
| 2609 | * |
| 2610 | * The variable can be set to the following values: |
| 2611 | * |
| 2612 | * - "0": SDL will raise the 0x406D1388 Exception to name threads. This is the |
| 2613 | * default behavior of SDL <= 2.0.4. |
| 2614 | * - "1": SDL will not raise this exception, and threads will be unnamed. |
| 2615 | * (default) This is necessary with .NET languages or debuggers that aren't |
| 2616 | * Visual Studio. |
| 2617 | */ |
| 2618 | #define SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING "SDL_WINDOWS_DISABLE_THREAD_NAMING" |
| 2619 | |
| 2620 | /** |
| 2621 | * Controls whether menus can be opened with their keyboard shortcut |
| 2622 | * (Alt+mnemonic). |
| 2623 | * |
| 2624 | * If the mnemonics are enabled, then menus can be opened by pressing the Alt |
| 2625 | * key and the corresponding mnemonic (for example, Alt+F opens the File |
| 2626 | * menu). However, in case an invalid mnemonic is pressed, Windows makes an |
| 2627 | * audible beep to convey that nothing happened. This is true even if the |
| 2628 | * window has no menu at all! |
| 2629 | * |
| 2630 | * Because most SDL applications don't have menus, and some want to use the |
| 2631 | * Alt key for other purposes, SDL disables mnemonics (and the beeping) by |
| 2632 | * default. |
| 2633 | * |
| 2634 | * Note: This also affects keyboard events: with mnemonics enabled, when a |
| 2635 | * menu is opened from the keyboard, you will not receive a KEYUP event for |
| 2636 | * the mnemonic key, and *might* not receive one for Alt. |
| 2637 | * |
| 2638 | * This variable can be set to the following values: |
| 2639 | * |
| 2640 | * - "0": Alt+mnemonic does nothing, no beeping. (default) |
| 2641 | * - "1": Alt+mnemonic opens menus, invalid mnemonics produce a beep. |
| 2642 | */ |
| 2643 | #define "SDL_WINDOWS_ENABLE_MENU_MNEMONICS" |
| 2644 | |
| 2645 | /** |
| 2646 | * A variable controlling whether the windows message loop is processed by SDL |
| 2647 | * |
| 2648 | * This variable can be set to the following values: |
| 2649 | * |
| 2650 | * - "0": The window message loop is not run |
| 2651 | * - "1": The window message loop is processed in SDL_PumpEvents() |
| 2652 | * |
| 2653 | * By default SDL will process the windows message loop |
| 2654 | */ |
| 2655 | #define SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP "SDL_WINDOWS_ENABLE_MESSAGELOOP" |
| 2656 | |
| 2657 | /** |
| 2658 | * Force SDL to use Critical Sections for mutexes on Windows. |
| 2659 | * |
| 2660 | * On Windows 7 and newer, Slim Reader/Writer Locks are available. They offer |
| 2661 | * better performance, allocate no kernel resources and use less memory. SDL |
| 2662 | * will fall back to Critical Sections on older OS versions or if forced to by |
| 2663 | * this hint. |
| 2664 | * |
| 2665 | * This variable can be set to the following values: |
| 2666 | * |
| 2667 | * - "0": Use SRW Locks when available. If not, fall back to Critical |
| 2668 | * Sections. (default) |
| 2669 | * - "1": Force the use of Critical Sections in all cases. |
| 2670 | */ |
| 2671 | #define SDL_HINT_WINDOWS_FORCE_MUTEX_CRITICAL_SECTIONS "SDL_WINDOWS_FORCE_MUTEX_CRITICAL_SECTIONS" |
| 2672 | |
| 2673 | /** |
| 2674 | * Force SDL to use Kernel Semaphores on Windows. |
| 2675 | * |
| 2676 | * Kernel Semaphores are inter-process and require a context switch on every |
| 2677 | * interaction. On Windows 8 and newer, the WaitOnAddress API is available. |
| 2678 | * Using that and atomics to implement semaphores increases performance. SDL |
| 2679 | * will fall back to Kernel Objects on older OS versions or if forced to by |
| 2680 | * this hint. |
| 2681 | * |
| 2682 | * This variable can be set to the following values: |
| 2683 | * |
| 2684 | * - "0": Use Atomics and WaitOnAddress API when available. If not, fall back |
| 2685 | * to Kernel Objects. (default) |
| 2686 | * - "1": Force the use of Kernel Objects in all cases. |
| 2687 | */ |
| 2688 | #define SDL_HINT_WINDOWS_FORCE_SEMAPHORE_KERNEL "SDL_WINDOWS_FORCE_SEMAPHORE_KERNEL" |
| 2689 | |
| 2690 | /** |
| 2691 | * A variable to specify custom icon resource id from RC file on Windows |
| 2692 | * platform |
| 2693 | */ |
| 2694 | #define SDL_HINT_WINDOWS_INTRESOURCE_ICON "SDL_WINDOWS_INTRESOURCE_ICON" |
| 2695 | |
| 2696 | /** |
| 2697 | * A variable to specify custom icon resource id from RC file on Windows |
| 2698 | * platform |
| 2699 | */ |
| 2700 | #define SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL "SDL_WINDOWS_INTRESOURCE_ICON_SMALL" |
| 2701 | |
| 2702 | /** |
| 2703 | * Tell SDL not to generate window-close events for Alt+F4 on Windows. |
| 2704 | * |
| 2705 | * The variable can be set to the following values: |
| 2706 | * |
| 2707 | * - "0": SDL will generate a window-close event when it sees Alt+F4. |
| 2708 | * - "1": SDL will only do normal key handling for Alt+F4. |
| 2709 | */ |
| 2710 | #define SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4 "SDL_WINDOWS_NO_CLOSE_ON_ALT_F4" |
| 2711 | |
| 2712 | /** |
| 2713 | * Use the D3D9Ex API introduced in Windows Vista, instead of normal D3D9. |
| 2714 | * |
| 2715 | * Direct3D 9Ex contains changes to state management that can eliminate device |
| 2716 | * loss errors during scenarios like Alt+Tab or UAC prompts. D3D9Ex may |
| 2717 | * require some changes to your application to cope with the new behavior, so |
| 2718 | * this is disabled by default. |
| 2719 | * |
| 2720 | * This hint must be set before initializing the video subsystem. |
| 2721 | * |
| 2722 | * For more information on Direct3D 9Ex, see: - |
| 2723 | * https://docs.microsoft.com/en-us/windows/win32/direct3darticles/graphics-apis-in-windows-vista#direct3d-9ex |
| 2724 | * - |
| 2725 | * https://docs.microsoft.com/en-us/windows/win32/direct3darticles/direct3d-9ex-improvements |
| 2726 | * |
| 2727 | * This variable can be set to the following values: |
| 2728 | * |
| 2729 | * - "0": Use the original Direct3D 9 API (default) |
| 2730 | * - "1": Use the Direct3D 9Ex API on Vista and later (and fall back if D3D9Ex |
| 2731 | * is unavailable) |
| 2732 | */ |
| 2733 | #define SDL_HINT_WINDOWS_USE_D3D9EX "SDL_WINDOWS_USE_D3D9EX" |
| 2734 | |
| 2735 | /** |
| 2736 | * Controls whether SDL will declare the process to be DPI aware. |
| 2737 | * |
| 2738 | * This hint must be set before initializing the video subsystem. |
| 2739 | * |
| 2740 | * The main purpose of declaring DPI awareness is to disable OS bitmap scaling |
| 2741 | * of SDL windows on monitors with a DPI scale factor. |
| 2742 | * |
| 2743 | * This hint is equivalent to requesting DPI awareness via external means |
| 2744 | * (e.g. calling SetProcessDpiAwarenessContext) and does not cause SDL to use |
| 2745 | * a virtualized coordinate system, so it will generally give you 1 SDL |
| 2746 | * coordinate = 1 pixel even on high-DPI displays. |
| 2747 | * |
| 2748 | * For more information, see: |
| 2749 | * https://docs.microsoft.com/en-us/windows/win32/hidpi/high-dpi-desktop-application-development-on-windows |
| 2750 | * |
| 2751 | * This variable can be set to the following values: |
| 2752 | * |
| 2753 | * - "": Do not change the DPI awareness (default). |
| 2754 | * - "unaware": Declare the process as DPI unaware. (Windows 8.1 and later). |
| 2755 | * - "system": Request system DPI awareness. (Vista and later). |
| 2756 | * - "permonitor": Request per-monitor DPI awareness. (Windows 8.1 and later). |
| 2757 | * - "permonitorv2": Request per-monitor V2 DPI awareness. (Windows 10, |
| 2758 | * version 1607 and later). The most visible difference from "permonitor" is |
| 2759 | * that window title bar will be scaled to the visually correct size when |
| 2760 | * dragging between monitors with different scale factors. This is the |
| 2761 | * preferred DPI awareness level. |
| 2762 | * |
| 2763 | * If the requested DPI awareness is not available on the currently running |
| 2764 | * OS, SDL will try to request the best available match. |
| 2765 | */ |
| 2766 | #define SDL_HINT_WINDOWS_DPI_AWARENESS "SDL_WINDOWS_DPI_AWARENESS" |
| 2767 | |
| 2768 | /** |
| 2769 | * Uses DPI-scaled points as the SDL coordinate system on Windows. |
| 2770 | * |
| 2771 | * This changes the SDL coordinate system units to be DPI-scaled points, |
| 2772 | * rather than pixels everywhere. This means windows will be appropriately |
| 2773 | * sized, even when created on high-DPI displays with scaling. |
| 2774 | * |
| 2775 | * e.g. requesting a 640x480 window from SDL, on a display with 125% scaling |
| 2776 | * in Windows display settings, will create a window with an 800x600 client |
| 2777 | * area (in pixels). |
| 2778 | * |
| 2779 | * Setting this to "1" implicitly requests process DPI awareness (setting |
| 2780 | * SDL_WINDOWS_DPI_AWARENESS is unnecessary), and forces |
| 2781 | * SDL_WINDOW_ALLOW_HIGHDPI on all windows. |
| 2782 | * |
| 2783 | * This variable can be set to the following values: |
| 2784 | * |
| 2785 | * - "0": SDL coordinates equal Windows coordinates. No automatic window |
| 2786 | * resizing when dragging between monitors with different scale factors |
| 2787 | * (unless this is performed by Windows itself, which is the case when the |
| 2788 | * process is DPI unaware). |
| 2789 | * - "1": SDL coordinates are in DPI-scaled points. Automatically resize |
| 2790 | * windows as needed on displays with non-100% scale factors. |
| 2791 | */ |
| 2792 | #define SDL_HINT_WINDOWS_DPI_SCALING "SDL_WINDOWS_DPI_SCALING" |
| 2793 | |
| 2794 | /** |
| 2795 | * A variable controlling whether the window frame and title bar are |
| 2796 | * interactive when the cursor is hidden |
| 2797 | * |
| 2798 | * This variable can be set to the following values: |
| 2799 | * |
| 2800 | * - "0": The window frame is not interactive when the cursor is hidden (no |
| 2801 | * move, resize, etc) |
| 2802 | * - "1": The window frame is interactive when the cursor is hidden |
| 2803 | * |
| 2804 | * By default SDL will allow interaction with the window frame when the cursor |
| 2805 | * is hidden |
| 2806 | */ |
| 2807 | #define SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN "SDL_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN" |
| 2808 | |
| 2809 | /** |
| 2810 | * A variable controlling whether the window is activated when the |
| 2811 | * SDL_ShowWindow function is called |
| 2812 | * |
| 2813 | * This variable can be set to the following values: |
| 2814 | * |
| 2815 | * - "0": The window is activated when the SDL_ShowWindow function is called |
| 2816 | * - "1": The window is not activated when the SDL_ShowWindow function is |
| 2817 | * called |
| 2818 | * |
| 2819 | * By default SDL will activate the window when the SDL_ShowWindow function is |
| 2820 | * called |
| 2821 | */ |
| 2822 | #define SDL_HINT_WINDOW_NO_ACTIVATION_WHEN_SHOWN "SDL_WINDOW_NO_ACTIVATION_WHEN_SHOWN" |
| 2823 | |
| 2824 | /** Allows back-button-press events on Windows Phone to be marked as handled |
| 2825 | * |
| 2826 | * Windows Phone devices typically feature a Back button. When pressed, |
| 2827 | * the OS will emit back-button-press events, which apps are expected to |
| 2828 | * handle in an appropriate manner. If apps do not explicitly mark these |
| 2829 | * events as 'Handled', then the OS will invoke its default behavior for |
| 2830 | * unhandled back-button-press events, which on Windows Phone 8 and 8.1 is to |
| 2831 | * terminate the app (and attempt to switch to the previous app, or to the |
| 2832 | * device's home screen). |
| 2833 | * |
| 2834 | * Setting the SDL_HINT_WINRT_HANDLE_BACK_BUTTON hint to "1" will cause SDL |
| 2835 | * to mark back-button-press events as Handled, if and when one is sent to |
| 2836 | * the app. |
| 2837 | * |
| 2838 | * Internally, Windows Phone sends back button events as parameters to |
| 2839 | * special back-button-press callback functions. Apps that need to respond |
| 2840 | * to back-button-press events are expected to register one or more |
| 2841 | * callback functions for such, shortly after being launched (during the |
| 2842 | * app's initialization phase). After the back button is pressed, the OS |
| 2843 | * will invoke these callbacks. If the app's callback(s) do not explicitly |
| 2844 | * mark the event as handled by the time they return, or if the app never |
| 2845 | * registers one of these callback, the OS will consider the event |
| 2846 | * un-handled, and it will apply its default back button behavior (terminate |
| 2847 | * the app). |
| 2848 | * |
| 2849 | * SDL registers its own back-button-press callback with the Windows Phone |
| 2850 | * OS. This callback will emit a pair of SDL key-press events (SDL_KEYDOWN |
| 2851 | * and SDL_KEYUP), each with a scancode of SDL_SCANCODE_AC_BACK, after which |
| 2852 | * it will check the contents of the hint, SDL_HINT_WINRT_HANDLE_BACK_BUTTON. |
| 2853 | * If the hint's value is set to "1", the back button event's Handled |
| 2854 | * property will get set to 'true'. If the hint's value is set to something |
| 2855 | * else, or if it is unset, SDL will leave the event's Handled property |
| 2856 | * alone. (By default, the OS sets this property to 'false', to note.) |
| 2857 | * |
| 2858 | * SDL apps can either set SDL_HINT_WINRT_HANDLE_BACK_BUTTON well before a |
| 2859 | * back button is pressed, or can set it in direct-response to a back button |
| 2860 | * being pressed. |
| 2861 | * |
| 2862 | * In order to get notified when a back button is pressed, SDL apps should |
| 2863 | * register a callback function with SDL_AddEventWatch(), and have it listen |
| 2864 | * for SDL_KEYDOWN events that have a scancode of SDL_SCANCODE_AC_BACK. |
| 2865 | * (Alternatively, SDL_KEYUP events can be listened-for. Listening for |
| 2866 | * either event type is suitable.) Any value of SDL_HINT_WINRT_HANDLE_BACK_BUTTON |
| 2867 | * set by such a callback, will be applied to the OS' current |
| 2868 | * back-button-press event. |
| 2869 | * |
| 2870 | * More details on back button behavior in Windows Phone apps can be found |
| 2871 | * at the following page, on Microsoft's developer site: |
| 2872 | * |
| 2873 | * http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj247550(v=vs.105).aspx |
| 2874 | */ |
| 2875 | #define SDL_HINT_WINRT_HANDLE_BACK_BUTTON "SDL_WINRT_HANDLE_BACK_BUTTON" |
| 2876 | |
| 2877 | /** Label text for a WinRT app's privacy policy link |
| 2878 | * |
| 2879 | * Network-enabled WinRT apps must include a privacy policy. On Windows 8, 8.1, and RT, |
| 2880 | * Microsoft mandates that this policy be available via the Windows Settings charm. |
| 2881 | * SDL provides code to add a link there, with its label text being set via the |
| 2882 | * optional hint, SDL_HINT_WINRT_PRIVACY_POLICY_LABEL. |
| 2883 | * |
| 2884 | * Please note that a privacy policy's contents are not set via this hint. A separate |
| 2885 | * hint, SDL_HINT_WINRT_PRIVACY_POLICY_URL, is used to link to the actual text of the |
| 2886 | * policy. |
| 2887 | * |
| 2888 | * The contents of this hint should be encoded as a UTF8 string. |
| 2889 | * |
| 2890 | * The default value is "Privacy Policy". This hint should only be set during app |
| 2891 | * initialization, preferably before any calls to SDL_Init(). |
| 2892 | * |
| 2893 | * For additional information on linking to a privacy policy, see the documentation for |
| 2894 | * SDL_HINT_WINRT_PRIVACY_POLICY_URL. |
| 2895 | */ |
| 2896 | #define SDL_HINT_WINRT_PRIVACY_POLICY_LABEL "SDL_WINRT_PRIVACY_POLICY_LABEL" |
| 2897 | |
| 2898 | /** |
| 2899 | * A URL to a WinRT app's privacy policy |
| 2900 | * |
| 2901 | * All network-enabled WinRT apps must make a privacy policy available to its |
| 2902 | * users. On Windows 8, 8.1, and RT, Microsoft mandates that this policy be be |
| 2903 | * available in the Windows Settings charm, as accessed from within the app. |
| 2904 | * SDL provides code to add a URL-based link there, which can point to the |
| 2905 | * app's privacy policy. |
| 2906 | * |
| 2907 | * To setup a URL to an app's privacy policy, set |
| 2908 | * SDL_HINT_WINRT_PRIVACY_POLICY_URL before calling any SDL_Init() functions. |
| 2909 | * The contents of the hint should be a valid URL. For example, |
| 2910 | * "http://www.example.com". |
| 2911 | * |
| 2912 | * The default value is "", which will prevent SDL from adding a privacy |
| 2913 | * policy link to the Settings charm. This hint should only be set during app |
| 2914 | * init. |
| 2915 | * |
| 2916 | * The label text of an app's "Privacy Policy" link may be customized via |
| 2917 | * another hint, SDL_HINT_WINRT_PRIVACY_POLICY_LABEL. |
| 2918 | * |
| 2919 | * Please note that on Windows Phone, Microsoft does not provide standard UI |
| 2920 | * for displaying a privacy policy link, and as such, |
| 2921 | * SDL_HINT_WINRT_PRIVACY_POLICY_URL will not get used on that platform. |
| 2922 | * Network-enabled phone apps should display their privacy policy through some |
| 2923 | * other, in-app means. |
| 2924 | */ |
| 2925 | #define SDL_HINT_WINRT_PRIVACY_POLICY_URL "SDL_WINRT_PRIVACY_POLICY_URL" |
| 2926 | |
| 2927 | /** |
| 2928 | * Mark X11 windows as override-redirect. |
| 2929 | * |
| 2930 | * If set, this _might_ increase framerate at the expense of the desktop not |
| 2931 | * working as expected. Override-redirect windows aren't noticed by the window |
| 2932 | * manager at all. |
| 2933 | * |
| 2934 | * You should probably only use this for fullscreen windows, and you probably |
| 2935 | * shouldn't even use it for that. But it's here if you want to try! |
| 2936 | */ |
| 2937 | #define SDL_HINT_X11_FORCE_OVERRIDE_REDIRECT "SDL_X11_FORCE_OVERRIDE_REDIRECT" |
| 2938 | |
| 2939 | /** |
| 2940 | * A variable that lets you disable the detection and use of Xinput gamepad |
| 2941 | * devices |
| 2942 | * |
| 2943 | * The variable can be set to the following values: |
| 2944 | * |
| 2945 | * - "0": Disable XInput detection (only uses direct input) |
| 2946 | * - "1": Enable XInput detection (the default) |
| 2947 | */ |
| 2948 | #define SDL_HINT_XINPUT_ENABLED "SDL_XINPUT_ENABLED" |
| 2949 | |
| 2950 | /** |
| 2951 | * A variable that lets you disable the detection and use of DirectInput |
| 2952 | * gamepad devices |
| 2953 | * |
| 2954 | * The variable can be set to the following values: |
| 2955 | * |
| 2956 | * - "0": Disable DirectInput detection (only uses XInput) |
| 2957 | * - "1": Enable DirectInput detection (the default) |
| 2958 | */ |
| 2959 | #define SDL_HINT_DIRECTINPUT_ENABLED "SDL_DIRECTINPUT_ENABLED" |
| 2960 | |
| 2961 | /** |
| 2962 | * A variable that causes SDL to use the old axis and button mapping for |
| 2963 | * XInput devices. |
| 2964 | * |
| 2965 | * This hint is for backwards compatibility only and will be removed in SDL |
| 2966 | * 2.1 |
| 2967 | * |
| 2968 | * The default value is "0". This hint must be set before SDL_Init() |
| 2969 | */ |
| 2970 | #define SDL_HINT_XINPUT_USE_OLD_JOYSTICK_MAPPING "SDL_XINPUT_USE_OLD_JOYSTICK_MAPPING" |
| 2971 | |
| 2972 | /** |
| 2973 | * A variable that causes SDL to not ignore audio "monitors" |
| 2974 | * |
| 2975 | * This is currently only used for PulseAudio and ignored elsewhere. |
| 2976 | * |
| 2977 | * By default, SDL ignores audio devices that aren't associated with physical |
| 2978 | * hardware. Changing this hint to "1" will expose anything SDL sees that |
| 2979 | * appears to be an audio source or sink. This will add "devices" to the list |
| 2980 | * that the user probably doesn't want or need, but it can be useful in |
| 2981 | * scenarios where you want to hook up SDL to some sort of virtual device, |
| 2982 | * etc. |
| 2983 | * |
| 2984 | * The default value is "0". This hint must be set before SDL_Init(). |
| 2985 | * |
| 2986 | * This hint is available since SDL 2.0.16. Before then, virtual devices are |
| 2987 | * always ignored. |
| 2988 | */ |
| 2989 | #define SDL_HINT_AUDIO_INCLUDE_MONITORS "SDL_AUDIO_INCLUDE_MONITORS" |
| 2990 | |
| 2991 | /** |
| 2992 | * A variable that forces X11 windows to create as a custom type. |
| 2993 | * |
| 2994 | * This is currently only used for X11 and ignored elsewhere. |
| 2995 | * |
| 2996 | * During SDL_CreateWindow, SDL uses the _NET_WM_WINDOW_TYPE X11 property to |
| 2997 | * report to the window manager the type of window it wants to create. This |
| 2998 | * might be set to various things if SDL_WINDOW_TOOLTIP or |
| 2999 | * SDL_WINDOW_POPUP_MENU, etc, were specified. For "normal" windows that |
| 3000 | * haven't set a specific type, this hint can be used to specify a custom |
| 3001 | * type. For example, a dock window might set this to |
| 3002 | * "_NET_WM_WINDOW_TYPE_DOCK". |
| 3003 | * |
| 3004 | * If not set or set to "", this hint is ignored. This hint must be set before |
| 3005 | * the SDL_CreateWindow() call that it is intended to affect. |
| 3006 | * |
| 3007 | * This hint is available since SDL 2.0.22. |
| 3008 | */ |
| 3009 | #define SDL_HINT_X11_WINDOW_TYPE "SDL_X11_WINDOW_TYPE" |
| 3010 | |
| 3011 | /** |
| 3012 | * A variable that decides whether to send SDL_QUIT when closing the final |
| 3013 | * window. |
| 3014 | * |
| 3015 | * By default, SDL sends an SDL_QUIT event when there is only one window and |
| 3016 | * it receives an SDL_WINDOWEVENT_CLOSE event, under the assumption most apps |
| 3017 | * would also take the loss of this window as a signal to terminate the |
| 3018 | * program. |
| 3019 | * |
| 3020 | * However, it's not unreasonable in some cases to have the program continue |
| 3021 | * to live on, perhaps to create new windows later. |
| 3022 | * |
| 3023 | * Changing this hint to "0" will cause SDL to not send an SDL_QUIT event when |
| 3024 | * the final window is requesting to close. Note that in this case, there are |
| 3025 | * still other legitimate reasons one might get an SDL_QUIT event: choosing |
| 3026 | * "Quit" from the macOS menu bar, sending a SIGINT (ctrl-c) on Unix, etc. |
| 3027 | * |
| 3028 | * The default value is "1". This hint can be changed at any time. |
| 3029 | * |
| 3030 | * This hint is available since SDL 2.0.22. Before then, you always get an |
| 3031 | * SDL_QUIT event when closing the final window. |
| 3032 | */ |
| 3033 | #define SDL_HINT_QUIT_ON_LAST_WINDOW_CLOSE "SDL_QUIT_ON_LAST_WINDOW_CLOSE" |
| 3034 | |
| 3035 | |
| 3036 | /** |
| 3037 | * A variable that decides what video backend to use. |
| 3038 | * |
| 3039 | * By default, SDL will try all available video backends in a reasonable order |
| 3040 | * until it finds one that can work, but this hint allows the app or user to |
| 3041 | * force a specific target, such as "x11" if, say, you are on Wayland but want |
| 3042 | * to try talking to the X server instead. |
| 3043 | * |
| 3044 | * This functionality has existed since SDL 2.0.0 (indeed, before that) but |
| 3045 | * before 2.0.22 this was an environment variable only. In 2.0.22, it was |
| 3046 | * upgraded to a full SDL hint, so you can set the environment variable as |
| 3047 | * usual or programatically set the hint with SDL_SetHint, which won't |
| 3048 | * propagate to child processes. |
| 3049 | * |
| 3050 | * The default value is unset, in which case SDL will try to figure out the |
| 3051 | * best video backend on your behalf. This hint needs to be set before |
| 3052 | * SDL_Init() is called to be useful. |
| 3053 | * |
| 3054 | * This hint is available since SDL 2.0.22. Before then, you could set the |
| 3055 | * environment variable to get the same effect. |
| 3056 | */ |
| 3057 | #define SDL_HINT_VIDEODRIVER "SDL_VIDEODRIVER" |
| 3058 | |
| 3059 | /** |
| 3060 | * A variable that decides what audio backend to use. |
| 3061 | * |
| 3062 | * By default, SDL will try all available audio backends in a reasonable order |
| 3063 | * until it finds one that can work, but this hint allows the app or user to |
| 3064 | * force a specific target, such as "alsa" if, say, you are on PulseAudio but |
| 3065 | * want to try talking to the lower level instead. |
| 3066 | * |
| 3067 | * This functionality has existed since SDL 2.0.0 (indeed, before that) but |
| 3068 | * before 2.0.22 this was an environment variable only. In 2.0.22, it was |
| 3069 | * upgraded to a full SDL hint, so you can set the environment variable as |
| 3070 | * usual or programatically set the hint with SDL_SetHint, which won't |
| 3071 | * propagate to child processes. |
| 3072 | * |
| 3073 | * The default value is unset, in which case SDL will try to figure out the |
| 3074 | * best audio backend on your behalf. This hint needs to be set before |
| 3075 | * SDL_Init() is called to be useful. |
| 3076 | * |
| 3077 | * This hint is available since SDL 2.0.22. Before then, you could set the |
| 3078 | * environment variable to get the same effect. |
| 3079 | */ |
| 3080 | #define SDL_HINT_AUDIODRIVER "SDL_AUDIODRIVER" |
| 3081 | |
| 3082 | /** |
| 3083 | * A variable that decides what KMSDRM device to use. |
| 3084 | * |
| 3085 | * Internally, SDL might open something like "/dev/dri/cardNN" to access |
| 3086 | * KMSDRM functionality, where "NN" is a device index number. |
| 3087 | * |
| 3088 | * SDL makes a guess at the best index to use (usually zero), but the app or |
| 3089 | * user can set this hint to a number between 0 and 99 to force selection. |
| 3090 | * |
| 3091 | * This hint is available since SDL 2.24.0. |
| 3092 | */ |
| 3093 | #define SDL_HINT_KMSDRM_DEVICE_INDEX "SDL_KMSDRM_DEVICE_INDEX" |
| 3094 | |
| 3095 | |
| 3096 | /** |
| 3097 | * A variable that treats trackpads as touch devices. |
| 3098 | * |
| 3099 | * On macOS (and possibly other platforms in the future), SDL will report |
| 3100 | * touches on a trackpad as mouse input, which is generally what users expect |
| 3101 | * from this device; however, these are often actually full multitouch-capable |
| 3102 | * touch devices, so it might be preferable to some apps to treat them as |
| 3103 | * such. |
| 3104 | * |
| 3105 | * Setting this hint to true will make the trackpad input report as a |
| 3106 | * multitouch device instead of a mouse. The default is false. |
| 3107 | * |
| 3108 | * Note that most platforms don't support this hint. As of 2.24.0, it only |
| 3109 | * supports MacBooks' trackpads on macOS. Others may follow later. |
| 3110 | * |
| 3111 | * This hint is checked during SDL_Init and can not be changed after. |
| 3112 | * |
| 3113 | * This hint is available since SDL 2.24.0. |
| 3114 | */ |
| 3115 | #define SDL_HINT_TRACKPAD_IS_TOUCH_ONLY "SDL_TRACKPAD_IS_TOUCH_ONLY" |
| 3116 | |
| 3117 | /** |
| 3118 | * Cause SDL to call dbus_shutdown() on quit. |
| 3119 | * |
| 3120 | * This is useful as a debug tool to validate memory leaks, but shouldn't ever |
| 3121 | * be set in production applications, as other libraries used by the |
| 3122 | * application might use dbus under the hood and this cause cause crashes if |
| 3123 | * they continue after SDL_Quit(). |
| 3124 | * |
| 3125 | * This variable can be set to the following values: |
| 3126 | * |
| 3127 | * - "0": SDL will not call dbus_shutdown() on quit (default) |
| 3128 | * - "1": SDL will call dbus_shutdown() on quit |
| 3129 | * |
| 3130 | * This hint is available since SDL 2.30.0. |
| 3131 | */ |
| 3132 | #define SDL_HINT_SHUTDOWN_DBUS_ON_QUIT "SDL_SHUTDOWN_DBUS_ON_QUIT" |
| 3133 | |
| 3134 | /** |
| 3135 | * Specify if SDL_RWFromFile should use the resource dir on Apple platforms. |
| 3136 | * |
| 3137 | * SDL2 has always done this on Apple platforms, but it can be surprising to |
| 3138 | * try opening a path to discover that SDL adjusts the path to elsewhere, so |
| 3139 | * this hint allows that behavior to be disabled. |
| 3140 | * |
| 3141 | * If running from a App Bundle, this will be MyApp.app/Contents/Resources. If |
| 3142 | * running as a normal Unix-like process, this will be the directory where the |
| 3143 | * running binary lives. Setting this hint to 0 avoids this and just uses the |
| 3144 | * requested path as-is. |
| 3145 | * |
| 3146 | * This variable can be set to the following values: |
| 3147 | * |
| 3148 | * - "0": SDL will not use the app resource directory. |
| 3149 | * - "1": SDL will use the app's resource directory (default). |
| 3150 | * |
| 3151 | * This hint is available since SDL 2.32.0. |
| 3152 | */ |
| 3153 | #define SDL_HINT_APPLE_RWFROMFILE_USE_RESOURCES "SDL_APPLE_RWFROMFILE_USE_RESOURCES" |
| 3154 | |
| 3155 | |
| 3156 | /** |
| 3157 | * An enumeration of hint priorities |
| 3158 | */ |
| 3159 | typedef enum SDL_HintPriority |
| 3160 | { |
| 3161 | SDL_HINT_DEFAULT, |
| 3162 | SDL_HINT_NORMAL, |
| 3163 | SDL_HINT_OVERRIDE |
| 3164 | } SDL_HintPriority; |
| 3165 | |
| 3166 | |
| 3167 | /** |
| 3168 | * Set a hint with a specific priority. |
| 3169 | * |
| 3170 | * The priority controls the behavior when setting a hint that already has a |
| 3171 | * value. Hints will replace existing hints of their priority and lower. |
| 3172 | * Environment variables are considered to have override priority. |
| 3173 | * |
| 3174 | * \param name the hint to set. |
| 3175 | * \param value the value of the hint variable. |
| 3176 | * \param priority the SDL_HintPriority level for the hint. |
| 3177 | * \returns SDL_TRUE if the hint was set, SDL_FALSE otherwise. |
| 3178 | * |
| 3179 | * \since This function is available since SDL 2.0.0. |
| 3180 | * |
| 3181 | * \sa SDL_GetHint |
| 3182 | * \sa SDL_SetHint |
| 3183 | */ |
| 3184 | extern DECLSPEC SDL_bool SDLCALL SDL_SetHintWithPriority(const char *name, |
| 3185 | const char *value, |
| 3186 | SDL_HintPriority priority); |
| 3187 | |
| 3188 | /** |
| 3189 | * Set a hint with normal priority. |
| 3190 | * |
| 3191 | * Hints will not be set if there is an existing override hint or environment |
| 3192 | * variable that takes precedence. You can use SDL_SetHintWithPriority() to |
| 3193 | * set the hint with override priority instead. |
| 3194 | * |
| 3195 | * \param name the hint to set. |
| 3196 | * \param value the value of the hint variable. |
| 3197 | * \returns SDL_TRUE if the hint was set, SDL_FALSE otherwise. |
| 3198 | * |
| 3199 | * \since This function is available since SDL 2.0.0. |
| 3200 | * |
| 3201 | * \sa SDL_GetHint |
| 3202 | * \sa SDL_SetHintWithPriority |
| 3203 | */ |
| 3204 | extern DECLSPEC SDL_bool SDLCALL SDL_SetHint(const char *name, |
| 3205 | const char *value); |
| 3206 | |
| 3207 | /** |
| 3208 | * Reset a hint to the default value. |
| 3209 | * |
| 3210 | * This will reset a hint to the value of the environment variable, or NULL if |
| 3211 | * the environment isn't set. Callbacks will be called normally with this |
| 3212 | * change. |
| 3213 | * |
| 3214 | * \param name the hint to set. |
| 3215 | * \returns SDL_TRUE if the hint was set, SDL_FALSE otherwise. |
| 3216 | * |
| 3217 | * \since This function is available since SDL 2.24.0. |
| 3218 | * |
| 3219 | * \sa SDL_GetHint |
| 3220 | * \sa SDL_SetHint |
| 3221 | */ |
| 3222 | extern DECLSPEC SDL_bool SDLCALL SDL_ResetHint(const char *name); |
| 3223 | |
| 3224 | /** |
| 3225 | * Reset all hints to the default values. |
| 3226 | * |
| 3227 | * This will reset all hints to the value of the associated environment |
| 3228 | * variable, or NULL if the environment isn't set. Callbacks will be called |
| 3229 | * normally with this change. |
| 3230 | * |
| 3231 | * \since This function is available since SDL 2.26.0. |
| 3232 | * |
| 3233 | * \sa SDL_GetHint |
| 3234 | * \sa SDL_SetHint |
| 3235 | * \sa SDL_ResetHint |
| 3236 | */ |
| 3237 | extern DECLSPEC void SDLCALL SDL_ResetHints(void); |
| 3238 | |
| 3239 | /** |
| 3240 | * Get the value of a hint. |
| 3241 | * |
| 3242 | * \param name the hint to query. |
| 3243 | * \returns the string value of a hint or NULL if the hint isn't set. |
| 3244 | * |
| 3245 | * \since This function is available since SDL 2.0.0. |
| 3246 | * |
| 3247 | * \sa SDL_SetHint |
| 3248 | * \sa SDL_SetHintWithPriority |
| 3249 | */ |
| 3250 | extern DECLSPEC const char * SDLCALL SDL_GetHint(const char *name); |
| 3251 | |
| 3252 | /** |
| 3253 | * Get the boolean value of a hint variable. |
| 3254 | * |
| 3255 | * \param name the name of the hint to get the boolean value from. |
| 3256 | * \param default_value the value to return if the hint does not exist. |
| 3257 | * \returns the boolean value of a hint or the provided default value if the |
| 3258 | * hint does not exist. |
| 3259 | * |
| 3260 | * \since This function is available since SDL 2.0.5. |
| 3261 | * |
| 3262 | * \sa SDL_GetHint |
| 3263 | * \sa SDL_SetHint |
| 3264 | */ |
| 3265 | extern DECLSPEC SDL_bool SDLCALL SDL_GetHintBoolean(const char *name, SDL_bool default_value); |
| 3266 | |
| 3267 | /** |
| 3268 | * Type definition of the hint callback function. |
| 3269 | * |
| 3270 | * \param userdata what was passed as `userdata` to SDL_AddHintCallback(). |
| 3271 | * \param name what was passed as `name` to SDL_AddHintCallback(). |
| 3272 | * \param oldValue the previous hint value. |
| 3273 | * \param newValue the new value hint is to be set to. |
| 3274 | */ |
| 3275 | typedef void (SDLCALL *SDL_HintCallback)(void *userdata, const char *name, const char *oldValue, const char *newValue); |
| 3276 | |
| 3277 | /** |
| 3278 | * Add a function to watch a particular hint. |
| 3279 | * |
| 3280 | * \param name the hint to watch. |
| 3281 | * \param callback An SDL_HintCallback function that will be called when the |
| 3282 | * hint value changes. |
| 3283 | * \param userdata a pointer to pass to the callback function. |
| 3284 | * |
| 3285 | * \since This function is available since SDL 2.0.0. |
| 3286 | * |
| 3287 | * \sa SDL_DelHintCallback |
| 3288 | */ |
| 3289 | extern DECLSPEC void SDLCALL SDL_AddHintCallback(const char *name, |
| 3290 | SDL_HintCallback callback, |
| 3291 | void *userdata); |
| 3292 | |
| 3293 | /** |
| 3294 | * Remove a function watching a particular hint. |
| 3295 | * |
| 3296 | * \param name the hint being watched. |
| 3297 | * \param callback An SDL_HintCallback function that will be called when the |
| 3298 | * hint value changes. |
| 3299 | * \param userdata a pointer being passed to the callback function. |
| 3300 | * |
| 3301 | * \since This function is available since SDL 2.0.0. |
| 3302 | * |
| 3303 | * \sa SDL_AddHintCallback |
| 3304 | */ |
| 3305 | extern DECLSPEC void SDLCALL SDL_DelHintCallback(const char *name, |
| 3306 | SDL_HintCallback callback, |
| 3307 | void *userdata); |
| 3308 | |
| 3309 | /** |
| 3310 | * Clear all hints. |
| 3311 | * |
| 3312 | * This function is automatically called during SDL_Quit(), and deletes all |
| 3313 | * callbacks without calling them and frees all memory associated with hints. |
| 3314 | * If you're calling this from application code you probably want to call |
| 3315 | * SDL_ResetHints() instead. |
| 3316 | * |
| 3317 | * This function will be removed from the API the next time we rev the ABI. |
| 3318 | * |
| 3319 | * \since This function is available since SDL 2.0.0. |
| 3320 | * |
| 3321 | * \sa SDL_ResetHints |
| 3322 | */ |
| 3323 | extern DECLSPEC void SDLCALL SDL_ClearHints(void); |
| 3324 | |
| 3325 | |
| 3326 | /* Ends C function definitions when using C++ */ |
| 3327 | #ifdef __cplusplus |
| 3328 | } |
| 3329 | #endif |
| 3330 | #include "close_code.h" |
| 3331 | |
| 3332 | #endif /* SDL_hints_h_ */ |
| 3333 | |
| 3334 | /* vi: set ts=4 sw=4 expandtab: */ |
| 3335 | |