1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2026 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
47extern "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 8BitDo controllers
832 * should be used.
833 *
834 * The 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_8BITDO "SDL_JOYSTICK_HIDAPI_8BITDO"
842
843/**
844 * A variable controlling whether the HIDAPI driver for Nintendo GameCube
845 * controllers should be used.
846 *
847 * This variable can be set to the following values:
848 *
849 * - "0": HIDAPI driver is not used
850 * - "1": HIDAPI driver is used
851 *
852 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
853 */
854#define SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE "SDL_JOYSTICK_HIDAPI_GAMECUBE"
855
856/**
857 * A variable controlling whether "low_frequency_rumble" and
858 * "high_frequency_rumble" is used to implement the GameCube controller's 3
859 * rumble modes, Stop(0), Rumble(1), and StopHard(2) this is useful for
860 * applications that need full compatibility for things like ADSR envelopes.
861 *
862 * Stop is implemented by setting "low_frequency_rumble" to "0" and
863 * "high_frequency_rumble" ">0" Rumble is both at any arbitrary value,
864 * StopHard is implemented by setting both "low_frequency_rumble" and
865 * "high_frequency_rumble" to "0"
866 *
867 * This variable can be set to the following values:
868 *
869 * - "0": Normal rumble behavior is behavior is used (default)
870 * - "1": Proper GameCube controller rumble behavior is used
871 */
872#define SDL_HINT_JOYSTICK_GAMECUBE_RUMBLE_BRAKE "SDL_JOYSTICK_GAMECUBE_RUMBLE_BRAKE"
873
874/**
875 * A variable controlling whether the HIDAPI driver for Nintendo Switch
876 * Joy-Cons should be used.
877 *
878 * This variable can be set to the following values:
879 *
880 * - "0": HIDAPI driver is not used
881 * - "1": HIDAPI driver is used
882 *
883 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
884 */
885#define SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS "SDL_JOYSTICK_HIDAPI_JOY_CONS"
886
887/**
888 * A variable controlling whether Nintendo Switch Joy-Con controllers will be
889 * combined into a single Pro-like controller 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 combined and each
894 * will be a mini-gamepad
895 * - "1": Left and right Joy-Con controllers will be combined into a single
896 * controller (the default)
897 */
898#define SDL_HINT_JOYSTICK_HIDAPI_COMBINE_JOY_CONS "SDL_JOYSTICK_HIDAPI_COMBINE_JOY_CONS"
899
900/**
901 * A variable controlling whether Nintendo Switch Joy-Con controllers will be
902 * in vertical mode when using the HIDAPI driver
903 *
904 * This variable can be set to the following values:
905 *
906 * - "0": Left and right Joy-Con controllers will not be in vertical mode (the
907 * default)
908 * - "1": Left and right Joy-Con controllers will be in vertical mode
909 *
910 * This hint must be set before calling SDL_Init(SDL_INIT_GAMECONTROLLER)
911 */
912#define SDL_HINT_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS "SDL_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS"
913
914/**
915 * A variable controlling whether the HIDAPI driver for Amazon Luna
916 * controllers connected via Bluetooth 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_LUNA "SDL_JOYSTICK_HIDAPI_LUNA"
926
927/**
928 * A variable controlling whether the HIDAPI driver for Nintendo Online
929 * classic 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_NINTENDO_CLASSIC "SDL_JOYSTICK_HIDAPI_NINTENDO_CLASSIC"
939
940/**
941 * A variable controlling whether the HIDAPI driver for NVIDIA SHIELD
942 * controllers should 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
950 */
951#define SDL_HINT_JOYSTICK_HIDAPI_SHIELD "SDL_JOYSTICK_HIDAPI_SHIELD"
952
953/**
954 * A variable controlling whether the HIDAPI driver for PS3 controllers should
955 * be used.
956 *
957 * This variable can be set to the following values:
958 *
959 * - "0": HIDAPI driver is not used
960 * - "1": HIDAPI driver is used
961 *
962 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI on macOS, and "0" on
963 * other platforms.
964 *
965 * It is not possible to use this driver on Windows, due to limitations in the
966 * default drivers installed. See https://github.com/ViGEm/DsHidMini for an
967 * alternative driver on Windows.
968 */
969#define SDL_HINT_JOYSTICK_HIDAPI_PS3 "SDL_JOYSTICK_HIDAPI_PS3"
970
971/**
972 * A variable controlling whether the HIDAPI driver for PS4 controllers should
973 * be used.
974 *
975 * This variable can be set to the following values:
976 *
977 * - "0": HIDAPI driver is not used
978 * - "1": HIDAPI driver is used
979 *
980 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
981 */
982#define SDL_HINT_JOYSTICK_HIDAPI_PS4 "SDL_JOYSTICK_HIDAPI_PS4"
983
984/**
985 * A variable controlling whether extended input reports should be used for
986 * PS4 controllers when using the HIDAPI driver.
987 *
988 * This variable can be set to the following values:
989 *
990 * - "0": extended reports are not enabled (the default)
991 * - "1": extended reports
992 *
993 * Extended input reports allow rumble on Bluetooth PS4 controllers, but break
994 * DirectInput handling for applications that don't use SDL.
995 *
996 * Once extended reports are enabled, they can not be disabled without power
997 * cycling the controller.
998 *
999 * For compatibility with applications written for versions of SDL prior to
1000 * the introduction of PS5 controller support, this value will also control
1001 * the state of extended reports on PS5 controllers when the
1002 * SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE hint is not explicitly set.
1003 */
1004#define SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE "SDL_JOYSTICK_HIDAPI_PS4_RUMBLE"
1005
1006/**
1007 * A variable controlling whether the HIDAPI driver for PS5 controllers should
1008 * be used.
1009 *
1010 * This variable can be set to the following values:
1011 *
1012 * - "0": HIDAPI driver is not used
1013 * - "1": HIDAPI driver is used
1014 *
1015 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
1016 */
1017#define SDL_HINT_JOYSTICK_HIDAPI_PS5 "SDL_JOYSTICK_HIDAPI_PS5"
1018
1019/**
1020 * A variable controlling whether the player LEDs should be lit to indicate
1021 * which player is associated with a PS5 controller.
1022 *
1023 * This variable can be set to the following values:
1024 *
1025 * - "0": player LEDs are not enabled
1026 * - "1": player LEDs are enabled (the default)
1027 */
1028#define SDL_HINT_JOYSTICK_HIDAPI_PS5_PLAYER_LED "SDL_JOYSTICK_HIDAPI_PS5_PLAYER_LED"
1029
1030/**
1031 * A variable controlling whether extended input reports should be used for
1032 * PS5 controllers when using the HIDAPI driver.
1033 *
1034 * This variable can be set to the following values:
1035 *
1036 * - "0": extended reports are not enabled (the default)
1037 * - "1": extended reports
1038 *
1039 * Extended input reports allow rumble on Bluetooth PS5 controllers, but break
1040 * DirectInput handling for applications that don't use SDL.
1041 *
1042 * Once extended reports are enabled, they can not be disabled without power
1043 * cycling the controller.
1044 *
1045 * For compatibility with applications written for versions of SDL prior to
1046 * the introduction of PS5 controller support, this value defaults to the
1047 * value of SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE.
1048 */
1049#define SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE "SDL_JOYSTICK_HIDAPI_PS5_RUMBLE"
1050
1051/**
1052 * A variable controlling whether the HIDAPI driver for Google Stadia
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
1059 *
1060 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
1061 */
1062#define SDL_HINT_JOYSTICK_HIDAPI_STADIA "SDL_JOYSTICK_HIDAPI_STADIA"
1063
1064/**
1065 * A variable controlling whether the HIDAPI driver for Bluetooth Steam
1066 * Controllers should be used.
1067 *
1068 * This variable can be set to the following values:
1069 *
1070 * - "0": HIDAPI driver is not used
1071 * - "1": HIDAPI driver is used for Steam Controllers, which requires
1072 * Bluetooth access and may prompt the user for permission on iOS and
1073 * Android.
1074 *
1075 * The default is "0"
1076 */
1077#define SDL_HINT_JOYSTICK_HIDAPI_STEAM "SDL_JOYSTICK_HIDAPI_STEAM"
1078
1079/**
1080 * A variable controlling whether the HIDAPI driver for the Steam Deck builtin
1081 * controller 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_STEAMDECK "SDL_JOYSTICK_HIDAPI_STEAMDECK"
1091
1092/**
1093 * A variable controlling whether the HIDAPI driver for Nintendo Switch
1094 * controllers should be used.
1095 *
1096 * This variable can be set to the following values:
1097 *
1098 * - "0": HIDAPI driver is not used
1099 * - "1": HIDAPI driver is used
1100 *
1101 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
1102 */
1103#define SDL_HINT_JOYSTICK_HIDAPI_SWITCH "SDL_JOYSTICK_HIDAPI_SWITCH"
1104
1105/**
1106 * A variable controlling whether the Home button LED should be turned on when
1107 * a Nintendo Switch Pro controller is opened
1108 *
1109 * This variable can be set to the following values:
1110 *
1111 * - "0": home button LED is turned off
1112 * - "1": home button LED is turned on
1113 *
1114 * By default the Home button LED state is not changed. This hint can also be
1115 * set to a floating point value between 0.0 and 1.0 which controls the
1116 * brightness of the Home button LED.
1117 */
1118#define SDL_HINT_JOYSTICK_HIDAPI_SWITCH_HOME_LED "SDL_JOYSTICK_HIDAPI_SWITCH_HOME_LED"
1119
1120/**
1121 * A variable controlling whether the Home button LED should be turned on when
1122 * a Nintendo Switch Joy-Con controller is opened
1123 *
1124 * This variable can be set to the following values:
1125 *
1126 * - "0": home button LED is turned off
1127 * - "1": home button LED is turned on
1128 *
1129 * By default the Home button LED state is not changed. This hint can also be
1130 * set to a floating point value between 0.0 and 1.0 which controls the
1131 * brightness of the Home button LED.
1132 */
1133#define SDL_HINT_JOYSTICK_HIDAPI_JOYCON_HOME_LED "SDL_JOYSTICK_HIDAPI_JOYCON_HOME_LED"
1134
1135/**
1136 * A variable controlling whether the player LEDs should be lit to indicate
1137 * which player is associated with a Nintendo Switch controller.
1138 *
1139 * This variable can be set to the following values:
1140 *
1141 * - "0": player LEDs are not enabled
1142 * - "1": player LEDs are enabled (the default)
1143 */
1144#define SDL_HINT_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED "SDL_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED"
1145
1146/**
1147 * A variable controlling whether the HIDAPI driver for Nintendo Wii and Wii U
1148 * controllers should be used.
1149 *
1150 * This variable can be set to the following values:
1151 *
1152 * - "0": HIDAPI driver is not used
1153 * - "1": HIDAPI driver is used
1154 *
1155 * This driver doesn't work with the dolphinbar, so the default is SDL_FALSE
1156 * for now.
1157 */
1158#define SDL_HINT_JOYSTICK_HIDAPI_WII "SDL_JOYSTICK_HIDAPI_WII"
1159
1160/**
1161 * A variable controlling whether the player LEDs should be lit to indicate
1162 * which player is associated with a Wii controller.
1163 *
1164 * This variable can be set to the following values:
1165 *
1166 * - "0": player LEDs are not enabled
1167 * - "1": player LEDs are enabled (the default)
1168 */
1169#define SDL_HINT_JOYSTICK_HIDAPI_WII_PLAYER_LED "SDL_JOYSTICK_HIDAPI_WII_PLAYER_LED"
1170
1171/**
1172 * A variable controlling whether the HIDAPI driver for XBox controllers
1173 * should be used.
1174 *
1175 * This variable can be set to the following values:
1176 *
1177 * - "0": HIDAPI driver is not used
1178 * - "1": HIDAPI driver is used
1179 *
1180 * The default is "0" on Windows, otherwise the value of
1181 * SDL_HINT_JOYSTICK_HIDAPI
1182 */
1183#define SDL_HINT_JOYSTICK_HIDAPI_XBOX "SDL_JOYSTICK_HIDAPI_XBOX"
1184
1185/**
1186 * A variable controlling whether the HIDAPI driver for XBox 360 controllers
1187 * should be used.
1188 *
1189 * This variable can be set to the following values:
1190 *
1191 * - "0": HIDAPI driver is not used
1192 * - "1": HIDAPI driver is used
1193 *
1194 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI_XBOX
1195 */
1196#define SDL_HINT_JOYSTICK_HIDAPI_XBOX_360 "SDL_JOYSTICK_HIDAPI_XBOX_360"
1197
1198/**
1199 * A variable controlling whether the player LEDs should be lit to indicate
1200 * which player is associated with an Xbox 360 controller.
1201 *
1202 * This variable can be set to the following values:
1203 *
1204 * - "0": player LEDs are not enabled
1205 * - "1": player LEDs are enabled (the default)
1206 */
1207#define SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED "SDL_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED"
1208
1209/**
1210 * A variable controlling whether the HIDAPI driver for XBox 360 wireless
1211 * controllers 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_360
1219 */
1220#define SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_WIRELESS "SDL_JOYSTICK_HIDAPI_XBOX_360_WIRELESS"
1221
1222/**
1223 * A variable controlling whether the HIDAPI driver for XBox One controllers
1224 * should be used.
1225 *
1226 * This variable can be set to the following values:
1227 *
1228 * - "0": HIDAPI driver is not used
1229 * - "1": HIDAPI driver is used
1230 *
1231 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI_XBOX
1232 */
1233#define SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE "SDL_JOYSTICK_HIDAPI_XBOX_ONE"
1234
1235/**
1236 * A variable controlling whether the Home button LED should be turned on when
1237 * an Xbox One controller is opened
1238 *
1239 * This variable can be set to the following values:
1240 *
1241 * - "0": home button LED is turned off
1242 * - "1": home button LED is turned on
1243 *
1244 * By default the Home button LED state is not changed. This hint can also be
1245 * set to a floating point value between 0.0 and 1.0 which controls the
1246 * brightness of the Home button LED. The default brightness is 0.4.
1247 */
1248#define SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED "SDL_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED"
1249
1250/**
1251 * A variable controlling whether IOKit should be used for controller
1252 * handling.
1253 *
1254 * This variable can be set to the following values:
1255 *
1256 * - "0": IOKit is not used
1257 * - "1": IOKit is used (the default)
1258 */
1259#define SDL_HINT_JOYSTICK_IOKIT "SDL_JOYSTICK_IOKIT"
1260
1261/**
1262 * A variable controlling whether GCController should be used for controller
1263 * handling.
1264 *
1265 * This variable can be set to the following values:
1266 *
1267 * - "0": GCController is not used
1268 * - "1": GCController is used (the default)
1269 */
1270#define SDL_HINT_JOYSTICK_MFI "SDL_JOYSTICK_MFI"
1271
1272/**
1273 * A variable controlling whether the RAWINPUT joystick drivers should be used
1274 * for better handling XInput-capable devices.
1275 *
1276 * This variable can be set to the following values:
1277 *
1278 * - "0": RAWINPUT drivers are not used (the default)
1279 * - "1": RAWINPUT drivers are used
1280 */
1281#define SDL_HINT_JOYSTICK_RAWINPUT "SDL_JOYSTICK_RAWINPUT"
1282
1283/**
1284 * A variable controlling whether the RAWINPUT driver should pull correlated
1285 * data from XInput.
1286 *
1287 * This variable can be set to the following values:
1288 *
1289 * - "0": RAWINPUT driver will only use data from raw input APIs
1290 * - "1": RAWINPUT driver will also pull data from XInput, providing better
1291 * trigger axes, guide button presses, and rumble support for Xbox
1292 * controllers
1293 *
1294 * The default is "1". This hint applies to any joysticks opened after setting
1295 * the hint.
1296 */
1297#define SDL_HINT_JOYSTICK_RAWINPUT_CORRELATE_XINPUT "SDL_JOYSTICK_RAWINPUT_CORRELATE_XINPUT"
1298
1299/**
1300 * A variable controlling whether the ROG Chakram mice should show up as
1301 * joysticks
1302 *
1303 * This variable can be set to the following values:
1304 *
1305 * - "0": ROG Chakram mice do not show up as joysticks (the default)
1306 * - "1": ROG Chakram mice show up as joysticks
1307 */
1308#define SDL_HINT_JOYSTICK_ROG_CHAKRAM "SDL_JOYSTICK_ROG_CHAKRAM"
1309
1310/**
1311 * A variable controlling whether a separate thread should be used for
1312 * handling joystick detection and raw input messages on Windows
1313 *
1314 * This variable can be set to the following values:
1315 *
1316 * - "0": A separate thread is not used (the default)
1317 * - "1": A separate thread is used for handling raw input messages
1318 */
1319#define SDL_HINT_JOYSTICK_THREAD "SDL_JOYSTICK_THREAD"
1320
1321/**
1322 * A variable containing a list of throttle style controllers.
1323 *
1324 * The format of the string is a comma separated list of USB VID/PID pairs in
1325 * hexadecimal form, e.g.
1326 *
1327 * 0xAAAA/0xBBBB,0xCCCC/0xDDDD
1328 *
1329 * The variable can also take the form of @file, in which case the named file
1330 * will be loaded and interpreted as the value of the variable.
1331 */
1332#define SDL_HINT_JOYSTICK_THROTTLE_DEVICES "SDL_JOYSTICK_THROTTLE_DEVICES"
1333
1334/**
1335 * A variable containing a list of devices that are not throttle style
1336 * controllers.
1337 *
1338 * This will override SDL_HINT_JOYSTICK_THROTTLE_DEVICES and the built in
1339 * device list.
1340 *
1341 * The format of the string is a comma separated list of USB VID/PID pairs in
1342 * hexadecimal form, e.g.
1343 *
1344 * 0xAAAA/0xBBBB,0xCCCC/0xDDDD
1345 *
1346 * The variable can also take the form of @file, in which case the named file
1347 * will be loaded and interpreted as the value of the variable.
1348 */
1349#define SDL_HINT_JOYSTICK_THROTTLE_DEVICES_EXCLUDED "SDL_JOYSTICK_THROTTLE_DEVICES_EXCLUDED"
1350
1351/**
1352 * A variable controlling whether Windows.Gaming.Input should be used for
1353 * controller handling.
1354 *
1355 * This variable can be set to the following values:
1356 *
1357 * - "0": WGI is not used
1358 * - "1": WGI is used (the default)
1359 */
1360#define SDL_HINT_JOYSTICK_WGI "SDL_JOYSTICK_WGI"
1361
1362/**
1363 * A variable containing a list of wheel style controllers.
1364 *
1365 * The format of the string is a comma separated list of USB VID/PID pairs in
1366 * hexadecimal form, e.g.
1367 *
1368 * 0xAAAA/0xBBBB,0xCCCC/0xDDDD
1369 *
1370 * The variable can also take the form of @file, in which case the named file
1371 * will be loaded and interpreted as the value of the variable.
1372 */
1373#define SDL_HINT_JOYSTICK_WHEEL_DEVICES "SDL_JOYSTICK_WHEEL_DEVICES"
1374
1375/**
1376 * A variable containing a list of devices that are not wheel style
1377 * controllers.
1378 *
1379 * This will override SDL_HINT_JOYSTICK_WHEEL_DEVICES and the built in device
1380 * list.
1381 *
1382 * The format of the string is a comma separated list of USB VID/PID pairs in
1383 * hexadecimal form, e.g.
1384 *
1385 * 0xAAAA/0xBBBB,0xCCCC/0xDDDD
1386 *
1387 * The variable can also take the form of @file, in which case the named file
1388 * will be loaded and interpreted as the value of the variable.
1389 */
1390#define SDL_HINT_JOYSTICK_WHEEL_DEVICES_EXCLUDED "SDL_JOYSTICK_WHEEL_DEVICES_EXCLUDED"
1391
1392/**
1393 * A variable containing a list of devices known to have all axes centered at
1394 * zero.
1395 *
1396 * The format of the string is a comma separated list of USB VID/PID pairs in
1397 * hexadecimal form, e.g.
1398 *
1399 * 0xAAAA/0xBBBB,0xCCCC/0xDDDD
1400 *
1401 * The variable can also take the form of @file, in which case the named file
1402 * will be loaded and interpreted as the value of the variable.
1403 */
1404#define SDL_HINT_JOYSTICK_ZERO_CENTERED_DEVICES "SDL_JOYSTICK_ZERO_CENTERED_DEVICES"
1405
1406/**
1407 * Determines whether SDL enforces that DRM master is required in order to
1408 * initialize the KMSDRM video backend.
1409 *
1410 * The DRM subsystem has a concept of a "DRM master" which is a DRM client
1411 * that has the ability to set planes, set cursor, etc. When SDL is DRM
1412 * master, it can draw to the screen using the SDL rendering APIs. Without DRM
1413 * master, SDL is still able to process input and query attributes of attached
1414 * displays, but it cannot change display state or draw to the screen
1415 * directly.
1416 *
1417 * In some cases, it can be useful to have the KMSDRM backend even if it
1418 * cannot be used for rendering. An app may want to use SDL for input
1419 * processing while using another rendering API (such as an MMAL overlay on
1420 * Raspberry Pi) or using its own code to render to DRM overlays that SDL
1421 * doesn't support.
1422 *
1423 * This hint must be set before initializing the video subsystem.
1424 *
1425 * This variable can be set to the following values:
1426 *
1427 * - "0": SDL will allow usage of the KMSDRM backend without DRM master
1428 * - "1": SDL Will require DRM master to use the KMSDRM backend (default)
1429 */
1430#define SDL_HINT_KMSDRM_REQUIRE_DRM_MASTER "SDL_KMSDRM_REQUIRE_DRM_MASTER"
1431
1432/**
1433 * A comma separated list of devices to open as joysticks
1434 *
1435 * This variable is currently only used by the Linux joystick driver.
1436 */
1437#define SDL_HINT_JOYSTICK_DEVICE "SDL_JOYSTICK_DEVICE"
1438
1439
1440/**
1441 * A variable containing a list of devices and their desired number of haptic
1442 * (force feedback) enabled axis.
1443 *
1444 * The format of the string is a comma separated list of USB VID/PID pairs in
1445 * hexadecimal form plus the number of desired axes, e.g.
1446 *
1447 * `0xAAAA/0xBBBB/1,0xCCCC/0xDDDD/3`
1448 *
1449 * This hint supports a "wildcard" device that will set the number of haptic
1450 * axes on all initialized haptic devices which were not defined explicitly in
1451 * this hint.
1452 *
1453 * `0xFFFF/0xFFFF/1`
1454 *
1455 * This hint should be set before a controller is opened. The number of haptic
1456 * axes won't exceed the number of real axes found on the device.
1457 */
1458#define SDL_HINT_JOYSTICK_HAPTIC_AXES "SDL_JOYSTICK_HAPTIC_AXES"
1459
1460/**
1461 * A variable controlling whether joysticks on Linux will always treat 'hat'
1462 * axis inputs (ABS_HAT0X - ABS_HAT3Y) as 8-way digital hats without checking
1463 * whether they may be analog.
1464 *
1465 * This variable can be set to the following values:
1466 *
1467 * - "0": Only map hat axis inputs to digital hat outputs if the input axes
1468 * appear to actually be digital (the default)
1469 * - "1": Always handle the input axes numbered ABS_HAT0X to ABS_HAT3Y as
1470 * digital hats
1471 */
1472#define SDL_HINT_LINUX_DIGITAL_HATS "SDL_LINUX_DIGITAL_HATS"
1473
1474/**
1475 * A variable controlling whether digital hats on Linux will apply deadzones
1476 * to their underlying input axes or use unfiltered values.
1477 *
1478 * This variable can be set to the following values:
1479 *
1480 * - "0": Return digital hat values based on unfiltered input axis values
1481 * - "1": Return digital hat values with deadzones on the input axes taken
1482 * into account (the default)
1483 */
1484#define SDL_HINT_LINUX_HAT_DEADZONES "SDL_LINUX_HAT_DEADZONES"
1485
1486/**
1487 * A variable controlling whether to use the classic /dev/input/js* joystick
1488 * interface or the newer /dev/input/event* joystick interface on Linux
1489 *
1490 * This variable can be set to the following values:
1491 *
1492 * - "0": Use /dev/input/event*
1493 * - "1": Use /dev/input/js*
1494 *
1495 * By default the /dev/input/event* interfaces are used
1496 */
1497#define SDL_HINT_LINUX_JOYSTICK_CLASSIC "SDL_LINUX_JOYSTICK_CLASSIC"
1498
1499/**
1500 * A variable controlling whether joysticks on Linux adhere to their
1501 * HID-defined deadzones or return unfiltered values.
1502 *
1503 * This variable can be set to the following values:
1504 *
1505 * - "0": Return unfiltered joystick axis values (the default)
1506 * - "1": Return axis values with deadzones taken into account
1507 */
1508#define SDL_HINT_LINUX_JOYSTICK_DEADZONES "SDL_LINUX_JOYSTICK_DEADZONES"
1509
1510/**
1511 * A variable controlling the default SDL log levels.
1512 *
1513 * This variable is a comma separated set of category=level tokens that define
1514 * the default logging levels for SDL applications.
1515 *
1516 * The category can be a numeric category, one of "app", "error", "assert",
1517 * "system", "audio", "video", "render", "input", "test", or `*` for any
1518 * unspecified category.
1519 *
1520 * The level can be a numeric level, one of "verbose", "debug", "info",
1521 * "warn", "error", "critical", or "quiet" to disable that category.
1522 *
1523 * You can omit the category if you want to set the logging level for all
1524 * categories.
1525 *
1526 * If this hint isn't set, the default log levels are equivalent to:
1527 * "app=info,assert=warn,test=verbose,*=error"
1528 */
1529#define SDL_HINT_LOGGING "SDL_LOGGING"
1530
1531/**
1532 * When set don't force the SDL app to become a foreground process
1533 *
1534 * This hint only applies to Mac OS X.
1535 */
1536#define SDL_HINT_MAC_BACKGROUND_APP "SDL_MAC_BACKGROUND_APP"
1537
1538/**
1539 * A variable that determines whether ctrl+click should generate a right-click
1540 * event on Mac
1541 *
1542 * If present, holding ctrl while left clicking will generate a right click
1543 * event when on Mac.
1544 */
1545#define SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK "SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK"
1546
1547/**
1548 * A variable controlling whether dispatching OpenGL context updates should
1549 * block the dispatching thread until the main thread finishes processing
1550 *
1551 * This variable can be set to the following values:
1552 *
1553 * - "0": Dispatching OpenGL context updates will block the dispatching thread
1554 * until the main thread finishes processing (default).
1555 * - "1": Dispatching OpenGL context updates will allow the dispatching thread
1556 * to continue execution.
1557 *
1558 * Generally you want the default, but if you have OpenGL code in a background
1559 * thread on a Mac, and the main thread hangs because it's waiting for that
1560 * background thread, but that background thread is also hanging because it's
1561 * waiting for the main thread to do an update, this might fix your issue.
1562 *
1563 * This hint only applies to macOS.
1564 *
1565 * This hint is available since SDL 2.24.0.
1566 */
1567#define SDL_HINT_MAC_OPENGL_ASYNC_DISPATCH "SDL_MAC_OPENGL_ASYNC_DISPATCH"
1568
1569/**
1570 * A variable setting the double click radius, in pixels.
1571 */
1572#define SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS "SDL_MOUSE_DOUBLE_CLICK_RADIUS"
1573
1574/**
1575 * A variable setting the double click time, in milliseconds.
1576 */
1577#define SDL_HINT_MOUSE_DOUBLE_CLICK_TIME "SDL_MOUSE_DOUBLE_CLICK_TIME"
1578
1579/**
1580 * Allow mouse click events when clicking to focus an SDL window
1581 *
1582 * This variable can be set to the following values:
1583 *
1584 * - "0": Ignore mouse clicks that activate a window
1585 * - "1": Generate events for mouse clicks that activate a window
1586 *
1587 * By default SDL will ignore mouse clicks that activate a window
1588 */
1589#define SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH "SDL_MOUSE_FOCUS_CLICKTHROUGH"
1590
1591/**
1592 * A variable setting the speed scale for mouse motion, in floating point,
1593 * when the mouse is not in relative mode
1594 */
1595#define SDL_HINT_MOUSE_NORMAL_SPEED_SCALE "SDL_MOUSE_NORMAL_SPEED_SCALE"
1596
1597/**
1598 * A variable controlling whether relative mouse mode constrains the mouse to
1599 * the center of the window
1600 *
1601 * This variable can be set to the following values:
1602 *
1603 * - "0": Relative mouse mode constrains the mouse to the window
1604 * - "1": Relative mouse mode constrains the mouse to the center of the window
1605 *
1606 * Constraining to the center of the window works better for FPS games and
1607 * when the application is running over RDP. Constraining to the whole window
1608 * works better for 2D games and increases the chance that the mouse will be
1609 * in the correct position when using high DPI mice.
1610 *
1611 * By default SDL will constrain the mouse to the center of the window
1612 */
1613#define SDL_HINT_MOUSE_RELATIVE_MODE_CENTER "SDL_MOUSE_RELATIVE_MODE_CENTER"
1614
1615/**
1616 * A variable controlling whether relative mouse mode is implemented using
1617 * mouse warping
1618 *
1619 * This variable can be set to the following values:
1620 *
1621 * - "0": Relative mouse mode uses raw input
1622 * - "1": Relative mouse mode uses mouse warping
1623 *
1624 * By default SDL will use raw input for relative mouse mode
1625 */
1626#define SDL_HINT_MOUSE_RELATIVE_MODE_WARP "SDL_MOUSE_RELATIVE_MODE_WARP"
1627
1628/**
1629 * A variable controlling whether relative mouse motion is affected by
1630 * renderer scaling
1631 *
1632 * This variable can be set to the following values:
1633 *
1634 * - "0": Relative motion is unaffected by DPI or renderer's logical size
1635 * - "1": Relative motion is scaled according to DPI scaling and logical size
1636 *
1637 * By default relative mouse deltas are affected by DPI and renderer scaling
1638 */
1639#define SDL_HINT_MOUSE_RELATIVE_SCALING "SDL_MOUSE_RELATIVE_SCALING"
1640
1641/**
1642 * A variable setting the scale for mouse motion, in floating point, when the
1643 * mouse is in relative mode
1644 */
1645#define SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE "SDL_MOUSE_RELATIVE_SPEED_SCALE"
1646
1647/**
1648 * A variable controlling whether the system mouse acceleration curve is used
1649 * for relative mouse motion.
1650 *
1651 * This variable can be set to the following values:
1652 *
1653 * - "0": Relative mouse motion will be unscaled (the default)
1654 * - "1": Relative mouse motion will be scaled using the system mouse
1655 * acceleration curve.
1656 *
1657 * If SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE is set, that will override the
1658 * system speed scale.
1659 */
1660#define SDL_HINT_MOUSE_RELATIVE_SYSTEM_SCALE "SDL_MOUSE_RELATIVE_SYSTEM_SCALE"
1661
1662/**
1663 * A variable controlling whether a motion event should be generated for mouse
1664 * warping in relative mode.
1665 *
1666 * This variable can be set to the following values:
1667 *
1668 * - "0": Warping the mouse will not generate a motion event in relative mode
1669 * - "1": Warping the mouse will generate a motion event in relative mode
1670 *
1671 * By default warping the mouse will not generate motion events in relative
1672 * mode. This avoids the application having to filter out large relative
1673 * motion due to warping.
1674 */
1675#define SDL_HINT_MOUSE_RELATIVE_WARP_MOTION "SDL_MOUSE_RELATIVE_WARP_MOTION"
1676
1677/**
1678 * A variable controlling whether the hardware cursor stays visible when
1679 * relative mode is active.
1680 *
1681 * This variable can be set to the following values: "0" - The cursor will be
1682 * hidden while relative mode is active (default) "1" - The cursor will remain
1683 * visible while relative mode is active
1684 *
1685 * Note that for systems without raw hardware inputs, relative mode is
1686 * implemented using warping, so the hardware cursor will visibly warp between
1687 * frames if this is enabled on those systems.
1688 */
1689#define SDL_HINT_MOUSE_RELATIVE_CURSOR_VISIBLE "SDL_MOUSE_RELATIVE_CURSOR_VISIBLE"
1690
1691/**
1692 * A variable controlling whether mouse events should generate synthetic touch
1693 * events
1694 *
1695 * This variable can be set to the following values:
1696 *
1697 * - "0": Mouse events will not generate touch events (default for desktop
1698 * platforms)
1699 * - "1": Mouse events will generate touch events (default for mobile
1700 * platforms, such as Android and iOS)
1701 */
1702#define SDL_HINT_MOUSE_TOUCH_EVENTS "SDL_MOUSE_TOUCH_EVENTS"
1703
1704/**
1705 * A variable controlling whether the mouse is captured while mouse buttons
1706 * are pressed
1707 *
1708 * This variable can be set to the following values:
1709 *
1710 * - "0": The mouse is not captured while mouse buttons are pressed
1711 * - "1": The mouse is captured while mouse buttons are pressed
1712 *
1713 * By default the mouse is captured while mouse buttons are pressed so if the
1714 * mouse is dragged outside the window, the application continues to receive
1715 * mouse events until the button is released.
1716 */
1717#define SDL_HINT_MOUSE_AUTO_CAPTURE "SDL_MOUSE_AUTO_CAPTURE"
1718
1719/**
1720 * Tell SDL not to catch the SIGINT or SIGTERM signals.
1721 *
1722 * This hint only applies to Unix-like platforms, and should set before any
1723 * calls to SDL_Init()
1724 *
1725 * The variable can be set to the following values:
1726 *
1727 * - "0": SDL will install a SIGINT and SIGTERM handler, and when it catches a
1728 * signal, convert it into an SDL_QUIT event.
1729 * - "1": SDL will not install a signal handler at all.
1730 */
1731#define SDL_HINT_NO_SIGNAL_HANDLERS "SDL_NO_SIGNAL_HANDLERS"
1732
1733/**
1734 * A variable controlling what driver to use for OpenGL ES contexts.
1735 *
1736 * On some platforms, currently Windows and X11, OpenGL drivers may support
1737 * creating contexts with an OpenGL ES profile. By default SDL uses these
1738 * profiles, when available, otherwise it attempts to load an OpenGL ES
1739 * library, e.g. that provided by the ANGLE project. This variable controls
1740 * whether SDL follows this default behaviour or will always load an OpenGL ES
1741 * library.
1742 *
1743 * Circumstances where this is useful include - Testing an app with a
1744 * particular OpenGL ES implementation, e.g ANGLE, or emulator, e.g. those
1745 * from ARM, Imagination or Qualcomm. - Resolving OpenGL ES function addresses
1746 * at link time by linking with the OpenGL ES library instead of querying them
1747 * at run time with SDL_GL_GetProcAddress().
1748 *
1749 * Caution: for an application to work with the default behaviour across
1750 * different OpenGL drivers it must query the OpenGL ES function addresses at
1751 * run time using SDL_GL_GetProcAddress().
1752 *
1753 * This variable is ignored on most platforms because OpenGL ES is native or
1754 * not supported.
1755 *
1756 * This variable can be set to the following values:
1757 *
1758 * - "0": Use ES profile of OpenGL, if available. (Default when not set.)
1759 * - "1": Load OpenGL ES library using the default library names.
1760 */
1761#define SDL_HINT_OPENGL_ES_DRIVER "SDL_OPENGL_ES_DRIVER"
1762
1763/**
1764 * A variable controlling which orientations are allowed on iOS/Android.
1765 *
1766 * In some circumstances it is necessary to be able to explicitly control
1767 * which UI orientations are allowed.
1768 *
1769 * This variable is a space delimited list of the following values:
1770 *
1771 * - "LandscapeLeft"
1772 * - "LandscapeRight"
1773 * - "Portrait"
1774 * - "PortraitUpsideDown"
1775 */
1776#define SDL_HINT_ORIENTATIONS "SDL_IOS_ORIENTATIONS"
1777
1778/**
1779 * A variable controlling the use of a sentinel event when polling the event
1780 * queue
1781 *
1782 * This variable can be set to the following values:
1783 *
1784 * - "0": Disable poll sentinels
1785 * - "1": Enable poll sentinels
1786 *
1787 * When polling for events, SDL_PumpEvents is used to gather new events from
1788 * devices. If a device keeps producing new events between calls to
1789 * SDL_PumpEvents, a poll loop will become stuck until the new events stop.
1790 * This is most noticeable when moving a high frequency mouse.
1791 *
1792 * By default, poll sentinels are enabled.
1793 */
1794#define SDL_HINT_POLL_SENTINEL "SDL_POLL_SENTINEL"
1795
1796/**
1797 * Override for SDL_GetPreferredLocales()
1798 *
1799 * If set, this will be favored over anything the OS might report for the
1800 * user's preferred locales. Changing this hint at runtime will not generate a
1801 * SDL_LOCALECHANGED event (but if you can change the hint, you can push your
1802 * own event, if you want).
1803 *
1804 * The format of this hint is a comma-separated list of language and locale,
1805 * combined with an underscore, as is a common format: "en_GB". Locale is
1806 * optional: "en". So you might have a list like this: "en_GB,jp,es_PT"
1807 */
1808#define SDL_HINT_PREFERRED_LOCALES "SDL_PREFERRED_LOCALES"
1809
1810/**
1811 * A variable describing the content orientation on QtWayland-based platforms.
1812 *
1813 * On QtWayland platforms, windows are rotated client-side to allow for custom
1814 * transitions. In order to correctly position overlays (e.g. volume bar) and
1815 * gestures (e.g. events view, close/minimize gestures), the system needs to
1816 * know in which orientation the application is currently drawing its
1817 * contents.
1818 *
1819 * This does not cause the window to be rotated or resized, the application
1820 * needs to take care of drawing the content in the right orientation (the
1821 * framebuffer is always in portrait mode).
1822 *
1823 * This variable can be one of the following values:
1824 *
1825 * - "primary" (default)
1826 * - "portrait"
1827 * - "landscape"
1828 * - "inverted-portrait"
1829 * - "inverted-landscape"
1830 *
1831 * Since SDL 2.0.22 this variable accepts a comma-separated list of values
1832 * above.
1833 */
1834#define SDL_HINT_QTWAYLAND_CONTENT_ORIENTATION "SDL_QTWAYLAND_CONTENT_ORIENTATION"
1835
1836/**
1837 * Flags to set on QtWayland windows to integrate with the native window
1838 * manager.
1839 *
1840 * On QtWayland platforms, this hint controls the flags to set on the windows.
1841 * For example, on Sailfish OS "OverridesSystemGestures" disables swipe
1842 * gestures.
1843 *
1844 * This variable is a space-separated list of the following values (empty = no
1845 * flags):
1846 *
1847 * - "OverridesSystemGestures"
1848 * - "StaysOnTop"
1849 * - "BypassWindowManager"
1850 */
1851#define SDL_HINT_QTWAYLAND_WINDOW_FLAGS "SDL_QTWAYLAND_WINDOW_FLAGS"
1852
1853/**
1854 * A variable controlling whether the 2D render API is compatible or
1855 * efficient.
1856 *
1857 * This variable can be set to the following values:
1858 *
1859 * - "0": Don't use batching to make rendering more efficient.
1860 * - "1": Use batching, but might cause problems if app makes its own direct
1861 * OpenGL calls.
1862 *
1863 * Up to SDL 2.0.9, the render API would draw immediately when requested. Now
1864 * it batches up draw requests and sends them all to the GPU only when forced
1865 * to (during SDL_RenderPresent, when changing render targets, by updating a
1866 * texture that the batch needs, etc). This is significantly more efficient,
1867 * but it can cause problems for apps that expect to render on top of the
1868 * render API's output. As such, SDL will disable batching if a specific
1869 * render backend is requested (since this might indicate that the app is
1870 * planning to use the underlying graphics API directly). This hint can be
1871 * used to explicitly request batching in this instance. It is a contract that
1872 * you will either never use the underlying graphics API directly, or if you
1873 * do, you will call SDL_RenderFlush() before you do so any current batch goes
1874 * to the GPU before your work begins. Not following this contract will result
1875 * in undefined behavior.
1876 */
1877#define SDL_HINT_RENDER_BATCHING "SDL_RENDER_BATCHING"
1878
1879/**
1880 * A variable controlling how the 2D render API renders lines
1881 *
1882 * This variable can be set to the following values:
1883 *
1884 * - "0": Use the default line drawing method (Bresenham's line algorithm as
1885 * of SDL 2.0.20)
1886 * - "1": Use the driver point API using Bresenham's line algorithm (correct,
1887 * draws many points)
1888 * - "2": Use the driver line API (occasionally misses line endpoints based on
1889 * hardware driver quirks, was the default before 2.0.20)
1890 * - "3": Use the driver geometry API (correct, draws thicker diagonal lines)
1891 *
1892 * This variable should be set when the renderer is created.
1893 */
1894#define SDL_HINT_RENDER_LINE_METHOD "SDL_RENDER_LINE_METHOD"
1895
1896/**
1897 * A variable controlling whether to enable Direct3D 11+'s Debug Layer.
1898 *
1899 * This variable does not have any effect on the Direct3D 9 based renderer.
1900 *
1901 * This variable can be set to the following values:
1902 *
1903 * - "0": Disable Debug Layer use
1904 * - "1": Enable Debug Layer use
1905 *
1906 * By default, SDL does not use Direct3D Debug Layer.
1907 */
1908#define SDL_HINT_RENDER_DIRECT3D11_DEBUG "SDL_RENDER_DIRECT3D11_DEBUG"
1909
1910/**
1911 * A variable controlling whether the Direct3D device is initialized for
1912 * thread-safe operations.
1913 *
1914 * This variable can be set to the following values:
1915 *
1916 * - "0": Thread-safety is not enabled (faster)
1917 * - "1": Thread-safety is enabled
1918 *
1919 * By default the Direct3D device is created with thread-safety disabled.
1920 */
1921#define SDL_HINT_RENDER_DIRECT3D_THREADSAFE "SDL_RENDER_DIRECT3D_THREADSAFE"
1922
1923/**
1924 * A variable specifying which render driver to use.
1925 *
1926 * If the application doesn't pick a specific renderer to use, this variable
1927 * specifies the name of the preferred renderer. If the preferred renderer
1928 * can't be initialized, the normal default renderer is used.
1929 *
1930 * This variable is case insensitive and can be set to the following values:
1931 *
1932 * - "direct3d"
1933 * - "direct3d11"
1934 * - "direct3d12"
1935 * - "opengl"
1936 * - "opengles2"
1937 * - "opengles"
1938 * - "metal"
1939 * - "software"
1940 *
1941 * The default varies by platform, but it's the first one in the list that is
1942 * available on the current platform.
1943 */
1944#define SDL_HINT_RENDER_DRIVER "SDL_RENDER_DRIVER"
1945
1946/**
1947 * A variable controlling the scaling policy for SDL_RenderSetLogicalSize.
1948 *
1949 * This variable can be set to the following values:
1950 *
1951 * "0" or "letterbox" - Uses letterbox/sidebars to fit the entire rendering on
1952 * screen "1" or "overscan" - Will zoom the rendering so it fills the entire
1953 * screen, allowing edges to be drawn offscreen
1954 *
1955 * By default letterbox is used
1956 */
1957#define SDL_HINT_RENDER_LOGICAL_SIZE_MODE "SDL_RENDER_LOGICAL_SIZE_MODE"
1958
1959/**
1960 * A variable controlling whether the OpenGL render driver uses shaders if
1961 * they are available.
1962 *
1963 * This variable can be set to the following values:
1964 *
1965 * - "0": Disable shaders
1966 * - "1": Enable shaders
1967 *
1968 * By default shaders are used if OpenGL supports them.
1969 */
1970#define SDL_HINT_RENDER_OPENGL_SHADERS "SDL_RENDER_OPENGL_SHADERS"
1971
1972/**
1973 * A variable controlling the scaling quality
1974 *
1975 * This variable can be set to the following values:
1976 *
1977 * - "0" or "nearest": Nearest pixel sampling
1978 * - "1" or "linear": Linear filtering (supported by OpenGL and Direct3D)
1979 * - "2" or "best": Currently this is the same as "linear"
1980 *
1981 * By default nearest pixel sampling is used
1982 */
1983#define SDL_HINT_RENDER_SCALE_QUALITY "SDL_RENDER_SCALE_QUALITY"
1984
1985/**
1986 * A variable controlling whether updates to the SDL screen surface should be
1987 * synchronized with the vertical refresh, to avoid tearing.
1988 *
1989 * This variable can be set to the following values:
1990 *
1991 * - "0": Disable vsync
1992 * - "1": Enable vsync
1993 *
1994 * By default SDL does not sync screen surface updates with vertical refresh.
1995 */
1996#define SDL_HINT_RENDER_VSYNC "SDL_RENDER_VSYNC"
1997
1998/**
1999 * A variable controlling whether the Metal render driver select low power
2000 * device over default one
2001 *
2002 * This variable can be set to the following values:
2003 *
2004 * - "0": Use the prefered OS device
2005 * - "1": Select a low power one
2006 *
2007 * By default the prefered OS device is used.
2008 */
2009#define SDL_HINT_RENDER_METAL_PREFER_LOW_POWER_DEVICE "SDL_RENDER_METAL_PREFER_LOW_POWER_DEVICE"
2010
2011/**
2012 * A variable containing a list of ROG gamepad capable mice.
2013 *
2014 * The format of the string is a comma separated list of USB VID/PID pairs in
2015 * hexadecimal form, e.g.
2016 *
2017 * 0xAAAA/0xBBBB,0xCCCC/0xDDDD
2018 *
2019 * The variable can also take the form of @file, in which case the named file
2020 * will be loaded and interpreted as the value of the variable.
2021 */
2022#define SDL_HINT_ROG_GAMEPAD_MICE "SDL_ROG_GAMEPAD_MICE"
2023
2024/**
2025 * A variable containing a list of devices that are not ROG gamepad capable
2026 * mice.
2027 *
2028 * This will override SDL_HINT_ROG_GAMEPAD_MICE and the built in device list.
2029 *
2030 * The format of the string is a comma separated list of USB VID/PID pairs in
2031 * hexadecimal form, e.g.
2032 *
2033 * 0xAAAA/0xBBBB,0xCCCC/0xDDDD
2034 *
2035 * The variable can also take the form of @file, in which case the named file
2036 * will be loaded and interpreted as the value of the variable.
2037 */
2038#define SDL_HINT_ROG_GAMEPAD_MICE_EXCLUDED "SDL_ROG_GAMEPAD_MICE_EXCLUDED"
2039
2040/**
2041 * Variable controlling the width of the PS2's framebuffer in pixels
2042 *
2043 * By default, this variable is "640"
2044 */
2045#define SDL_HINT_PS2_GS_WIDTH "SDL_PS2_GS_WIDTH"
2046
2047/**
2048 * Variable controlling the height of the PS2's framebuffer in pixels
2049 *
2050 * By default, this variable is "448"
2051 */
2052#define SDL_HINT_PS2_GS_HEIGHT "SDL_PS2_GS_HEIGHT"
2053
2054/**
2055 * Variable controlling whether the signal is interlaced or progressive
2056 *
2057 * - "0": Image is interlaced. (default)
2058 * - "1": Image is progressive
2059 */
2060#define SDL_HINT_PS2_GS_PROGRESSIVE "SDL_PS2_GS_PROGRESSIVE"
2061
2062/**
2063 * Variable controlling the video mode of the console
2064 *
2065 * - "": Console-native. (default)
2066 * - "NTSC": 60hz region
2067 * - "PAL": 50hz region
2068 */
2069#define SDL_HINT_PS2_GS_MODE "SDL_PS2_GS_MODE"
2070
2071/**
2072 * A variable controlling if VSYNC is automatically disable if doesn't reach
2073 * the enough FPS
2074 *
2075 * This variable can be set to the following values:
2076 *
2077 * - "0": It will be using VSYNC as defined in the main flag. Default
2078 * - "1": If VSYNC was previously enabled, then it will disable VSYNC if
2079 * doesn't reach enough speed
2080 *
2081 * By default SDL does not enable the automatic VSYNC
2082 */
2083#define SDL_HINT_PS2_DYNAMIC_VSYNC "SDL_PS2_DYNAMIC_VSYNC"
2084
2085/**
2086 * A variable to control whether the return key on the soft keyboard should
2087 * hide the soft keyboard on Android and iOS.
2088 *
2089 * The variable can be set to the following values:
2090 *
2091 * - "0": The return key will be handled as a key event. This is the behaviour
2092 * of SDL <= 2.0.3. (default)
2093 * - "1": The return key will hide the keyboard.
2094 *
2095 * The value of this hint is used at runtime, so it can be changed at any
2096 * time.
2097 */
2098#define SDL_HINT_RETURN_KEY_HIDES_IME "SDL_RETURN_KEY_HIDES_IME"
2099
2100/**
2101 * Tell SDL which Dispmanx layer to use on a Raspberry PI
2102 *
2103 * Also known as Z-order. The variable can take a negative or positive value.
2104 * The default is 10000.
2105 */
2106#define SDL_HINT_RPI_VIDEO_LAYER "SDL_RPI_VIDEO_LAYER"
2107
2108/**
2109 * Specify an "activity name" for screensaver inhibition.
2110 *
2111 * Some platforms, notably Linux desktops, list the applications which are
2112 * inhibiting the screensaver or other power-saving features.
2113 *
2114 * This hint lets you specify the "activity name" sent to the OS when
2115 * SDL_DisableScreenSaver() is used (or the screensaver is automatically
2116 * disabled). The contents of this hint are used when the screensaver is
2117 * disabled. You should use a string that describes what your program is doing
2118 * (and, therefore, why the screensaver is disabled). For example, "Playing a
2119 * game" or "Watching a video".
2120 *
2121 * Setting this to "" or leaving it unset will have SDL use a reasonable
2122 * default: "Playing a game" or something similar.
2123 *
2124 * On targets where this is not supported, this hint does nothing.
2125 */
2126#define SDL_HINT_SCREENSAVER_INHIBIT_ACTIVITY_NAME "SDL_SCREENSAVER_INHIBIT_ACTIVITY_NAME"
2127
2128/**
2129 * Specifies whether SDL_THREAD_PRIORITY_TIME_CRITICAL should be treated as
2130 * realtime.
2131 *
2132 * On some platforms, like Linux, a realtime priority thread may be subject to
2133 * restrictions that require special handling by the application. This hint
2134 * exists to let SDL know that the app is prepared to handle said
2135 * restrictions.
2136 *
2137 * On Linux, SDL will apply the following configuration to any thread that
2138 * becomes realtime:
2139 *
2140 * - The SCHED_RESET_ON_FORK bit will be set on the scheduling policy.
2141 * - An RLIMIT_RTTIME budget will be configured to the rtkit specified limit.
2142 * - Exceeding this limit will result in the kernel sending SIGKILL to the
2143 * app.
2144 *
2145 * Refer to the man pages for more information.
2146 *
2147 * This variable can be set to the following values:
2148 *
2149 * - "0": default platform specific behaviour
2150 * - "1": Force SDL_THREAD_PRIORITY_TIME_CRITICAL to a realtime scheduling
2151 * policy
2152 */
2153#define SDL_HINT_THREAD_FORCE_REALTIME_TIME_CRITICAL "SDL_THREAD_FORCE_REALTIME_TIME_CRITICAL"
2154
2155/**
2156 * A string specifying additional information to use with
2157 * SDL_SetThreadPriority.
2158 *
2159 * By default SDL_SetThreadPriority will make appropriate system changes in
2160 * order to apply a thread priority. For example on systems using pthreads the
2161 * scheduler policy is changed automatically to a policy that works well with
2162 * a given priority. Code which has specific requirements can override SDL's
2163 * default behavior with this hint.
2164 *
2165 * pthread hint values are "current", "other", "fifo" and "rr". Currently no
2166 * other platform hint values are defined but may be in the future.
2167 */
2168#define SDL_HINT_THREAD_PRIORITY_POLICY "SDL_THREAD_PRIORITY_POLICY"
2169
2170/**
2171 * A string specifying SDL's threads stack size in bytes or "0" for the
2172 * backend's default size
2173 *
2174 * Use this hint in case you need to set SDL's threads stack size to other
2175 * than the default. This is specially useful if you build SDL against a non
2176 * glibc libc library (such as musl) which provides a relatively small default
2177 * thread stack size (a few kilobytes versus the default 8MB glibc uses).
2178 * Support for this hint is currently available only in the pthread, Windows,
2179 * and PSP backend.
2180 *
2181 * Instead of this hint, in 2.0.9 and later, you can use
2182 * SDL_CreateThreadWithStackSize(). This hint only works with the classic
2183 * SDL_CreateThread().
2184 */
2185#define SDL_HINT_THREAD_STACK_SIZE "SDL_THREAD_STACK_SIZE"
2186
2187/**
2188 * A variable that controls the timer resolution, in milliseconds.
2189 *
2190 * The higher resolution the timer, the more frequently the CPU services timer
2191 * interrupts, and the more precise delays are, but this takes up power and
2192 * CPU time. This hint is only used on Windows.
2193 *
2194 * See this blog post for more information:
2195 * http://randomascii.wordpress.com/2013/07/08/windows-timer-resolution-megawatts-wasted/
2196 *
2197 * If this variable is set to "0", the system timer resolution is not set.
2198 *
2199 * The default value is "1". This hint may be set at any time.
2200 */
2201#define SDL_HINT_TIMER_RESOLUTION "SDL_TIMER_RESOLUTION"
2202
2203/**
2204 * A variable controlling whether touch events should generate synthetic mouse
2205 * events
2206 *
2207 * This variable can be set to the following values:
2208 *
2209 * - "0": Touch events will not generate mouse events
2210 * - "1": Touch events will generate mouse events
2211 *
2212 * By default SDL will generate mouse events for touch events
2213 */
2214#define SDL_HINT_TOUCH_MOUSE_EVENTS "SDL_TOUCH_MOUSE_EVENTS"
2215
2216/**
2217 * A variable controlling which touchpad should generate synthetic mouse
2218 * events
2219 *
2220 * This variable can be set to the following values:
2221 *
2222 * - "0": Only front touchpad should generate mouse events. Default
2223 * - "1": Only back touchpad should generate mouse events.
2224 * - "2": Both touchpads should generate mouse events.
2225 *
2226 * By default SDL will generate mouse events for all touch devices
2227 */
2228#define SDL_HINT_VITA_TOUCH_MOUSE_DEVICE "SDL_HINT_VITA_TOUCH_MOUSE_DEVICE"
2229
2230/**
2231 * A variable controlling whether the Android / tvOS remotes should be listed
2232 * as joystick devices, instead of sending keyboard events.
2233 *
2234 * This variable can be set to the following values:
2235 *
2236 * - "0": Remotes send enter/escape/arrow key events
2237 * - "1": Remotes are available as 2 axis, 2 button joysticks (the default).
2238 */
2239#define SDL_HINT_TV_REMOTE_AS_JOYSTICK "SDL_TV_REMOTE_AS_JOYSTICK"
2240
2241/**
2242 * A variable controlling whether the screensaver is enabled.
2243 *
2244 * This variable can be set to the following values:
2245 *
2246 * - "0": Disable screensaver
2247 * - "1": Enable screensaver
2248 *
2249 * By default SDL will disable the screensaver.
2250 */
2251#define SDL_HINT_VIDEO_ALLOW_SCREENSAVER "SDL_VIDEO_ALLOW_SCREENSAVER"
2252
2253/**
2254 * Tell the video driver that we only want a double buffer.
2255 *
2256 * By default, most lowlevel 2D APIs will use a triple buffer scheme that
2257 * wastes no CPU time on waiting for vsync after issuing a flip, but
2258 * introduces a frame of latency. On the other hand, using a double buffer
2259 * scheme instead is recommended for cases where low latency is an important
2260 * factor because we save a whole frame of latency. We do so by waiting for
2261 * vsync immediately after issuing a flip, usually just after eglSwapBuffers
2262 * call in the backend's *_SwapWindow function.
2263 *
2264 * Since it's driver-specific, it's only supported where possible and
2265 * implemented. Currently supported the following drivers:
2266 *
2267 * - Wayland (wayland)
2268 * - KMSDRM (kmsdrm)
2269 * - Raspberry Pi (raspberrypi)
2270 */
2271#define SDL_HINT_VIDEO_DOUBLE_BUFFER "SDL_VIDEO_DOUBLE_BUFFER"
2272
2273/**
2274 * A variable controlling whether the EGL window is allowed to be composited
2275 * as transparent, rather than opaque.
2276 *
2277 * Most window systems will always render windows opaque, even if the surface
2278 * format has an alpha channel. This is not always true, however, so by
2279 * default SDL will try to enforce opaque composition. To override this
2280 * behavior, you can set this hint to "1".
2281 */
2282#define SDL_HINT_VIDEO_EGL_ALLOW_TRANSPARENCY "SDL_VIDEO_EGL_ALLOW_TRANSPARENCY"
2283
2284/**
2285 * A variable controlling whether the graphics context is externally managed.
2286 *
2287 * This variable can be set to the following values:
2288 *
2289 * - "0": SDL will manage graphics contexts that are attached to windows.
2290 * - "1": Disable graphics context management on windows.
2291 *
2292 * By default SDL will manage OpenGL contexts in certain situations. For
2293 * example, on Android the context will be automatically saved and restored
2294 * when pausing the application. Additionally, some platforms will assume
2295 * usage of OpenGL if Vulkan isn't used. Setting this to "1" will prevent this
2296 * behavior, which is desireable when the application manages the graphics
2297 * context, such as an externally managed OpenGL context or attaching a Vulkan
2298 * surface to the window.
2299 */
2300#define SDL_HINT_VIDEO_EXTERNAL_CONTEXT "SDL_VIDEO_EXTERNAL_CONTEXT"
2301
2302/**
2303 * If set to 1, then do not allow high-DPI windows.
2304 *
2305 * ("Retina" on Mac and iOS)
2306 */
2307#define SDL_HINT_VIDEO_HIGHDPI_DISABLED "SDL_VIDEO_HIGHDPI_DISABLED"
2308
2309/**
2310 * A variable that dictates policy for fullscreen Spaces on Mac OS X.
2311 *
2312 * This hint only applies to Mac OS X.
2313 *
2314 * The variable can be set to the following values:
2315 *
2316 * - "0": Disable Spaces support (FULLSCREEN_DESKTOP won't use them and
2317 * SDL_WINDOW_RESIZABLE windows won't offer the "fullscreen" button on their
2318 * titlebars).
2319 * - "1": Enable Spaces support (FULLSCREEN_DESKTOP will use them and
2320 * SDL_WINDOW_RESIZABLE windows will offer the "fullscreen" button on their
2321 * titlebars).
2322 *
2323 * The default value is "1". This hint must be set before any windows are
2324 * created.
2325 */
2326#define SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES "SDL_VIDEO_MAC_FULLSCREEN_SPACES"
2327
2328/**
2329 * Minimize your SDL_Window if it loses key focus when in fullscreen mode.
2330 *
2331 * Defaults to false.
2332 */
2333#define SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS"
2334
2335/**
2336 * A variable controlling whether the libdecor Wayland backend is allowed to
2337 * be used.
2338 *
2339 * This variable can be set to the following values:
2340 *
2341 * - "0": libdecor use is disabled.
2342 * - "1": libdecor use is enabled (default).
2343 *
2344 * libdecor is used over xdg-shell when xdg-decoration protocol is
2345 * unavailable.
2346 */
2347#define SDL_HINT_VIDEO_WAYLAND_ALLOW_LIBDECOR "SDL_VIDEO_WAYLAND_ALLOW_LIBDECOR"
2348
2349/**
2350 * A variable controlling whether the libdecor Wayland backend is preferred
2351 * over native decorations.
2352 *
2353 * When this hint is set, libdecor will be used to provide window decorations,
2354 * even if xdg-decoration is available. (Note that, by default, libdecor will
2355 * use xdg-decoration itself if available).
2356 *
2357 * This variable can be set to the following values:
2358 *
2359 * - "0": libdecor is enabled only if server-side decorations are unavailable.
2360 * - "1": libdecor is always enabled if available.
2361 *
2362 * libdecor is used over xdg-shell when xdg-decoration protocol is
2363 * unavailable.
2364 */
2365#define SDL_HINT_VIDEO_WAYLAND_PREFER_LIBDECOR "SDL_VIDEO_WAYLAND_PREFER_LIBDECOR"
2366
2367/**
2368 * A variable controlling whether video mode emulation is enabled under
2369 * Wayland.
2370 *
2371 * When this hint is set, a standard set of emulated CVT video modes will be
2372 * exposed for use by the application. If it is disabled, the only modes
2373 * exposed will be the logical desktop size and, in the case of a scaled
2374 * desktop, the native display resolution.
2375 *
2376 * This variable can be set to the following values:
2377 *
2378 * - "0": Video mode emulation is disabled.
2379 * - "1": Video mode emulation is enabled.
2380 *
2381 * By default video mode emulation is enabled.
2382 */
2383#define SDL_HINT_VIDEO_WAYLAND_MODE_EMULATION "SDL_VIDEO_WAYLAND_MODE_EMULATION"
2384
2385/**
2386 * Enable or disable mouse pointer warp emulation, needed by some older games.
2387 *
2388 * When this hint is set, any SDL will emulate mouse warps using relative
2389 * mouse mode. This is required for some older games (such as Source engine
2390 * games), which warp the mouse to the centre of the screen rather than using
2391 * relative mouse motion. Note that relative mouse mode may have different
2392 * mouse acceleration behaviour than pointer warps.
2393 *
2394 * This variable can be set to the following values:
2395 *
2396 * - "0": All mouse warps fail, as mouse warping is not available under
2397 * wayland.
2398 * - "1": Some mouse warps will be emulated by forcing relative mouse mode.
2399 *
2400 * If not set, this is automatically enabled unless an application uses
2401 * relative mouse mode directly.
2402 */
2403#define SDL_HINT_VIDEO_WAYLAND_EMULATE_MOUSE_WARP "SDL_VIDEO_WAYLAND_EMULATE_MOUSE_WARP"
2404
2405/**
2406 * A variable that is the address of another SDL_Window* (as a hex string
2407 * formatted with "%p").
2408 *
2409 * If this hint is set before SDL_CreateWindowFrom() and the SDL_Window* it is
2410 * set to has SDL_WINDOW_OPENGL set (and running on WGL only, currently), then
2411 * two things will occur on the newly created SDL_Window:
2412 *
2413 * 1. Its pixel format will be set to the same pixel format as this
2414 * SDL_Window. This is needed for example when sharing an OpenGL context
2415 * across multiple windows.
2416 *
2417 * 2. The flag SDL_WINDOW_OPENGL will be set on the new window so it can be
2418 * used for OpenGL rendering.
2419 *
2420 * This variable can be set to the following values: The address (as a string
2421 * "%p") of the SDL_Window* that new windows created with
2422 * SDL_CreateWindowFrom() should share a pixel format with.
2423 */
2424#define SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT "SDL_VIDEO_WINDOW_SHARE_PIXEL_FORMAT"
2425
2426/**
2427 * When calling SDL_CreateWindowFrom(), make the window compatible with
2428 * OpenGL.
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_OPENGL to the SDL_WindowFlags
2434 *
2435 * By default SDL will not make the foreign window compatible with OpenGL.
2436 */
2437#define SDL_HINT_VIDEO_FOREIGN_WINDOW_OPENGL "SDL_VIDEO_FOREIGN_WINDOW_OPENGL"
2438
2439/**
2440 * When calling SDL_CreateWindowFrom(), make the window compatible with
2441 * Vulkan.
2442 *
2443 * This variable can be set to the following values:
2444 *
2445 * - "0": Don't add any graphics flags to the SDL_WindowFlags
2446 * - "1": Add SDL_WINDOW_VULKAN to the SDL_WindowFlags
2447 *
2448 * By default SDL will not make the foreign window compatible with Vulkan.
2449 */
2450#define SDL_HINT_VIDEO_FOREIGN_WINDOW_VULKAN "SDL_VIDEO_FOREIGN_WINDOW_VULKAN"
2451
2452/**
2453 * A variable specifying which shader compiler to preload when using the
2454 * Chrome ANGLE binaries
2455 *
2456 * SDL has EGL and OpenGL ES2 support on Windows via the ANGLE project. It can
2457 * use two different sets of binaries, those compiled by the user from source
2458 * or those provided by the Chrome browser. In the later case, these binaries
2459 * require that SDL loads a DLL providing the shader compiler.
2460 *
2461 * This variable can be set to the following values:
2462 *
2463 * - "d3dcompiler_46.dll: default, best for Vista or later.
2464 * - "d3dcompiler_43.dll: for XP support.
2465 * - "none": do not load any library, useful if you compiled ANGLE from source
2466 * and included the compiler in your binaries.
2467 */
2468#define SDL_HINT_VIDEO_WIN_D3DCOMPILER "SDL_VIDEO_WIN_D3DCOMPILER"
2469
2470/**
2471 * A variable controlling whether X11 should use GLX or EGL by default
2472 *
2473 * This variable can be set to the following values:
2474 *
2475 * - "0": Use GLX
2476 * - "1": Use EGL
2477 *
2478 * By default SDL will use GLX when both are present.
2479 */
2480#define SDL_HINT_VIDEO_X11_FORCE_EGL "SDL_VIDEO_X11_FORCE_EGL"
2481
2482/**
2483 * A variable controlling whether the X11 _NET_WM_BYPASS_COMPOSITOR hint
2484 * should be used.
2485 *
2486 * This variable can be set to the following values:
2487 *
2488 * - "0": Disable _NET_WM_BYPASS_COMPOSITOR
2489 * - "1": Enable _NET_WM_BYPASS_COMPOSITOR
2490 *
2491 * By default SDL will use _NET_WM_BYPASS_COMPOSITOR
2492 */
2493#define SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR "SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR"
2494
2495/**
2496 * A variable controlling whether the X11 _NET_WM_PING protocol should be
2497 * supported.
2498 *
2499 * This variable can be set to the following values:
2500 *
2501 * - "0": Disable _NET_WM_PING
2502 * - "1": Enable _NET_WM_PING
2503 *
2504 * By default SDL will use _NET_WM_PING, but for applications that know they
2505 * will not always be able to respond to ping requests in a timely manner they
2506 * can turn it off to avoid the window manager thinking the app is hung. The
2507 * hint is checked in CreateWindow.
2508 */
2509#define SDL_HINT_VIDEO_X11_NET_WM_PING "SDL_VIDEO_X11_NET_WM_PING"
2510
2511/**
2512 * A variable forcing the visual ID chosen for new X11 windows
2513 */
2514#define SDL_HINT_VIDEO_X11_WINDOW_VISUALID "SDL_VIDEO_X11_WINDOW_VISUALID"
2515
2516/**
2517 * A no-longer-used variable controlling whether the X11 Xinerama extension
2518 * should be used.
2519 *
2520 * Before SDL 2.0.24, this would let apps and users disable Xinerama support
2521 * on X11. Now SDL never uses Xinerama, and does not check for this hint at
2522 * all. The preprocessor define is left here for source compatibility.
2523 */
2524#define SDL_HINT_VIDEO_X11_XINERAMA "SDL_VIDEO_X11_XINERAMA"
2525
2526/**
2527 * A variable controlling whether the X11 XRandR extension should be used.
2528 *
2529 * This variable can be set to the following values:
2530 *
2531 * - "0": Disable XRandR
2532 * - "1": Enable XRandR
2533 *
2534 * By default SDL will use XRandR.
2535 */
2536#define SDL_HINT_VIDEO_X11_XRANDR "SDL_VIDEO_X11_XRANDR"
2537
2538/**
2539 * A no-longer-used variable controlling whether the X11 VidMode extension
2540 * should be used.
2541 *
2542 * Before SDL 2.0.24, this would let apps and users disable XVidMode support
2543 * on X11. Now SDL never uses XVidMode, and does not check for this hint at
2544 * all. The preprocessor define is left here for source compatibility.
2545 */
2546#define SDL_HINT_VIDEO_X11_XVIDMODE "SDL_VIDEO_X11_XVIDMODE"
2547
2548/**
2549 * Controls how the fact chunk affects the loading of a WAVE file.
2550 *
2551 * The fact chunk stores information about the number of samples of a WAVE
2552 * file. The Standards Update from Microsoft notes that this value can be used
2553 * to 'determine the length of the data in seconds'. This is especially useful
2554 * for compressed formats (for which this is a mandatory chunk) if they
2555 * produce multiple sample frames per block and truncating the block is not
2556 * allowed. The fact chunk can exactly specify how many sample frames there
2557 * should be in this case.
2558 *
2559 * Unfortunately, most application seem to ignore the fact chunk and so SDL
2560 * ignores it by default as well.
2561 *
2562 * This variable can be set to the following values:
2563 *
2564 * - "truncate": Use the number of samples to truncate the wave data if the
2565 * fact chunk is present and valid
2566 * - "strict": Like "truncate", but raise an error if the fact chunk is
2567 * invalid, not present for non-PCM formats, or if the data chunk doesn't
2568 * have that many samples
2569 * - "ignorezero": Like "truncate", but ignore fact chunk if the number of
2570 * samples is zero
2571 * - "ignore": Ignore fact chunk entirely (default)
2572 */
2573#define SDL_HINT_WAVE_FACT_CHUNK "SDL_WAVE_FACT_CHUNK"
2574
2575/**
2576 * Controls how the size of the RIFF chunk affects the loading of a WAVE file.
2577 *
2578 * The size of the RIFF chunk (which includes all the sub-chunks of the WAVE
2579 * file) is not always reliable. In case the size is wrong, it's possible to
2580 * just ignore it and step through the chunks until a fixed limit is reached.
2581 *
2582 * Note that files that have trailing data unrelated to the WAVE file or
2583 * corrupt files may slow down the loading process without a reliable
2584 * boundary. By default, SDL stops after 10000 chunks to prevent wasting time.
2585 * Use the environment variable SDL_WAVE_CHUNK_LIMIT to adjust this value.
2586 *
2587 * This variable can be set to the following values:
2588 *
2589 * - "force": Always use the RIFF chunk size as a boundary for the chunk
2590 * search
2591 * - "ignorezero": Like "force", but a zero size searches up to 4 GiB
2592 * (default)
2593 * - "ignore": Ignore the RIFF chunk size and always search up to 4 GiB
2594 * - "maximum": Search for chunks until the end of file (not recommended)
2595 */
2596#define SDL_HINT_WAVE_RIFF_CHUNK_SIZE "SDL_WAVE_RIFF_CHUNK_SIZE"
2597
2598/**
2599 * Controls how a truncated WAVE file is handled.
2600 *
2601 * A WAVE file is considered truncated if any of the chunks are incomplete or
2602 * the data chunk size is not a multiple of the block size. By default, SDL
2603 * decodes until the first incomplete block, as most applications seem to do.
2604 *
2605 * This variable can be set to the following values:
2606 *
2607 * - "verystrict": Raise an error if the file is truncated
2608 * - "strict": Like "verystrict", but the size of the RIFF chunk is ignored
2609 * - "dropframe": Decode until the first incomplete sample frame
2610 * - "dropblock": Decode until the first incomplete block (default)
2611 */
2612#define SDL_HINT_WAVE_TRUNCATION "SDL_WAVE_TRUNCATION"
2613
2614/**
2615 * Tell SDL not to name threads on Windows with the 0x406D1388 Exception.
2616 *
2617 * The 0x406D1388 Exception is a trick used to inform Visual Studio of a
2618 * thread's name, but it tends to cause problems with other debuggers, and the
2619 * .NET runtime. Note that SDL 2.0.6 and later will still use the (safer)
2620 * SetThreadDescription API, introduced in the Windows 10 Creators Update, if
2621 * available.
2622 *
2623 * The variable can be set to the following values:
2624 *
2625 * - "0": SDL will raise the 0x406D1388 Exception to name threads. This is the
2626 * default behavior of SDL <= 2.0.4.
2627 * - "1": SDL will not raise this exception, and threads will be unnamed.
2628 * (default) This is necessary with .NET languages or debuggers that aren't
2629 * Visual Studio.
2630 */
2631#define SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING "SDL_WINDOWS_DISABLE_THREAD_NAMING"
2632
2633/**
2634 * Controls whether menus can be opened with their keyboard shortcut
2635 * (Alt+mnemonic).
2636 *
2637 * If the mnemonics are enabled, then menus can be opened by pressing the Alt
2638 * key and the corresponding mnemonic (for example, Alt+F opens the File
2639 * menu). However, in case an invalid mnemonic is pressed, Windows makes an
2640 * audible beep to convey that nothing happened. This is true even if the
2641 * window has no menu at all!
2642 *
2643 * Because most SDL applications don't have menus, and some want to use the
2644 * Alt key for other purposes, SDL disables mnemonics (and the beeping) by
2645 * default.
2646 *
2647 * Note: This also affects keyboard events: with mnemonics enabled, when a
2648 * menu is opened from the keyboard, you will not receive a KEYUP event for
2649 * the mnemonic key, and *might* not receive one for Alt.
2650 *
2651 * This variable can be set to the following values:
2652 *
2653 * - "0": Alt+mnemonic does nothing, no beeping. (default)
2654 * - "1": Alt+mnemonic opens menus, invalid mnemonics produce a beep.
2655 */
2656#define SDL_HINT_WINDOWS_ENABLE_MENU_MNEMONICS "SDL_WINDOWS_ENABLE_MENU_MNEMONICS"
2657
2658/**
2659 * A variable controlling whether the windows message loop is processed by SDL
2660 *
2661 * This variable can be set to the following values:
2662 *
2663 * - "0": The window message loop is not run
2664 * - "1": The window message loop is processed in SDL_PumpEvents()
2665 *
2666 * By default SDL will process the windows message loop
2667 */
2668#define SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP "SDL_WINDOWS_ENABLE_MESSAGELOOP"
2669
2670/**
2671 * Force SDL to use Critical Sections for mutexes on Windows.
2672 *
2673 * On Windows 7 and newer, Slim Reader/Writer Locks are available. They offer
2674 * better performance, allocate no kernel resources and use less memory. SDL
2675 * will fall back to Critical Sections on older OS versions or if forced to by
2676 * this hint.
2677 *
2678 * This variable can be set to the following values:
2679 *
2680 * - "0": Use SRW Locks when available. If not, fall back to Critical
2681 * Sections. (default)
2682 * - "1": Force the use of Critical Sections in all cases.
2683 */
2684#define SDL_HINT_WINDOWS_FORCE_MUTEX_CRITICAL_SECTIONS "SDL_WINDOWS_FORCE_MUTEX_CRITICAL_SECTIONS"
2685
2686/**
2687 * Force SDL to use Kernel Semaphores on Windows.
2688 *
2689 * Kernel Semaphores are inter-process and require a context switch on every
2690 * interaction. On Windows 8 and newer, the WaitOnAddress API is available.
2691 * Using that and atomics to implement semaphores increases performance. SDL
2692 * will fall back to Kernel Objects on older OS versions or if forced to by
2693 * this hint.
2694 *
2695 * This variable can be set to the following values:
2696 *
2697 * - "0": Use Atomics and WaitOnAddress API when available. If not, fall back
2698 * to Kernel Objects. (default)
2699 * - "1": Force the use of Kernel Objects in all cases.
2700 */
2701#define SDL_HINT_WINDOWS_FORCE_SEMAPHORE_KERNEL "SDL_WINDOWS_FORCE_SEMAPHORE_KERNEL"
2702
2703/**
2704 * A variable to specify custom icon resource id from RC file on Windows
2705 * platform
2706 */
2707#define SDL_HINT_WINDOWS_INTRESOURCE_ICON "SDL_WINDOWS_INTRESOURCE_ICON"
2708
2709/**
2710 * A variable to specify custom icon resource id from RC file on Windows
2711 * platform
2712 */
2713#define SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL "SDL_WINDOWS_INTRESOURCE_ICON_SMALL"
2714
2715/**
2716 * Tell SDL not to generate window-close events for Alt+F4 on Windows.
2717 *
2718 * The variable can be set to the following values:
2719 *
2720 * - "0": SDL will generate a window-close event when it sees Alt+F4.
2721 * - "1": SDL will only do normal key handling for Alt+F4.
2722 */
2723#define SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4 "SDL_WINDOWS_NO_CLOSE_ON_ALT_F4"
2724
2725/**
2726 * Use the D3D9Ex API introduced in Windows Vista, instead of normal D3D9.
2727 *
2728 * Direct3D 9Ex contains changes to state management that can eliminate device
2729 * loss errors during scenarios like Alt+Tab or UAC prompts. D3D9Ex may
2730 * require some changes to your application to cope with the new behavior, so
2731 * this is disabled by default.
2732 *
2733 * This hint must be set before initializing the video subsystem.
2734 *
2735 * For more information on Direct3D 9Ex, see: -
2736 * https://docs.microsoft.com/en-us/windows/win32/direct3darticles/graphics-apis-in-windows-vista#direct3d-9ex
2737 * -
2738 * https://docs.microsoft.com/en-us/windows/win32/direct3darticles/direct3d-9ex-improvements
2739 *
2740 * This variable can be set to the following values:
2741 *
2742 * - "0": Use the original Direct3D 9 API (default)
2743 * - "1": Use the Direct3D 9Ex API on Vista and later (and fall back if D3D9Ex
2744 * is unavailable)
2745 */
2746#define SDL_HINT_WINDOWS_USE_D3D9EX "SDL_WINDOWS_USE_D3D9EX"
2747
2748/**
2749 * Controls whether SDL will declare the process to be DPI aware.
2750 *
2751 * This hint must be set before initializing the video subsystem.
2752 *
2753 * The main purpose of declaring DPI awareness is to disable OS bitmap scaling
2754 * of SDL windows on monitors with a DPI scale factor.
2755 *
2756 * This hint is equivalent to requesting DPI awareness via external means
2757 * (e.g. calling SetProcessDpiAwarenessContext) and does not cause SDL to use
2758 * a virtualized coordinate system, so it will generally give you 1 SDL
2759 * coordinate = 1 pixel even on high-DPI displays.
2760 *
2761 * For more information, see:
2762 * https://docs.microsoft.com/en-us/windows/win32/hidpi/high-dpi-desktop-application-development-on-windows
2763 *
2764 * This variable can be set to the following values:
2765 *
2766 * - "": Do not change the DPI awareness (default).
2767 * - "unaware": Declare the process as DPI unaware. (Windows 8.1 and later).
2768 * - "system": Request system DPI awareness. (Vista and later).
2769 * - "permonitor": Request per-monitor DPI awareness. (Windows 8.1 and later).
2770 * - "permonitorv2": Request per-monitor V2 DPI awareness. (Windows 10,
2771 * version 1607 and later). The most visible difference from "permonitor" is
2772 * that window title bar will be scaled to the visually correct size when
2773 * dragging between monitors with different scale factors. This is the
2774 * preferred DPI awareness level.
2775 *
2776 * If the requested DPI awareness is not available on the currently running
2777 * OS, SDL will try to request the best available match.
2778 */
2779#define SDL_HINT_WINDOWS_DPI_AWARENESS "SDL_WINDOWS_DPI_AWARENESS"
2780
2781/**
2782 * Uses DPI-scaled points as the SDL coordinate system on Windows.
2783 *
2784 * This changes the SDL coordinate system units to be DPI-scaled points,
2785 * rather than pixels everywhere. This means windows will be appropriately
2786 * sized, even when created on high-DPI displays with scaling.
2787 *
2788 * e.g. requesting a 640x480 window from SDL, on a display with 125% scaling
2789 * in Windows display settings, will create a window with an 800x600 client
2790 * area (in pixels).
2791 *
2792 * Setting this to "1" implicitly requests process DPI awareness (setting
2793 * SDL_WINDOWS_DPI_AWARENESS is unnecessary), and forces
2794 * SDL_WINDOW_ALLOW_HIGHDPI on all windows.
2795 *
2796 * This variable can be set to the following values:
2797 *
2798 * - "0": SDL coordinates equal Windows coordinates. No automatic window
2799 * resizing when dragging between monitors with different scale factors
2800 * (unless this is performed by Windows itself, which is the case when the
2801 * process is DPI unaware).
2802 * - "1": SDL coordinates are in DPI-scaled points. Automatically resize
2803 * windows as needed on displays with non-100% scale factors.
2804 */
2805#define SDL_HINT_WINDOWS_DPI_SCALING "SDL_WINDOWS_DPI_SCALING"
2806
2807/**
2808 * A variable controlling whether the window frame and title bar are
2809 * interactive when the cursor is hidden
2810 *
2811 * This variable can be set to the following values:
2812 *
2813 * - "0": The window frame is not interactive when the cursor is hidden (no
2814 * move, resize, etc)
2815 * - "1": The window frame is interactive when the cursor is hidden
2816 *
2817 * By default SDL will allow interaction with the window frame when the cursor
2818 * is hidden
2819 */
2820#define SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN "SDL_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN"
2821
2822/**
2823 * A variable controlling whether the window is activated when the
2824 * SDL_ShowWindow function is called
2825 *
2826 * This variable can be set to the following values:
2827 *
2828 * - "0": The window is activated when the SDL_ShowWindow function is called
2829 * - "1": The window is not activated when the SDL_ShowWindow function is
2830 * called
2831 *
2832 * By default SDL will activate the window when the SDL_ShowWindow function is
2833 * called
2834 */
2835#define SDL_HINT_WINDOW_NO_ACTIVATION_WHEN_SHOWN "SDL_WINDOW_NO_ACTIVATION_WHEN_SHOWN"
2836
2837/** Allows back-button-press events on Windows Phone to be marked as handled
2838 *
2839 * Windows Phone devices typically feature a Back button. When pressed,
2840 * the OS will emit back-button-press events, which apps are expected to
2841 * handle in an appropriate manner. If apps do not explicitly mark these
2842 * events as 'Handled', then the OS will invoke its default behavior for
2843 * unhandled back-button-press events, which on Windows Phone 8 and 8.1 is to
2844 * terminate the app (and attempt to switch to the previous app, or to the
2845 * device's home screen).
2846 *
2847 * Setting the SDL_HINT_WINRT_HANDLE_BACK_BUTTON hint to "1" will cause SDL
2848 * to mark back-button-press events as Handled, if and when one is sent to
2849 * the app.
2850 *
2851 * Internally, Windows Phone sends back button events as parameters to
2852 * special back-button-press callback functions. Apps that need to respond
2853 * to back-button-press events are expected to register one or more
2854 * callback functions for such, shortly after being launched (during the
2855 * app's initialization phase). After the back button is pressed, the OS
2856 * will invoke these callbacks. If the app's callback(s) do not explicitly
2857 * mark the event as handled by the time they return, or if the app never
2858 * registers one of these callback, the OS will consider the event
2859 * un-handled, and it will apply its default back button behavior (terminate
2860 * the app).
2861 *
2862 * SDL registers its own back-button-press callback with the Windows Phone
2863 * OS. This callback will emit a pair of SDL key-press events (SDL_KEYDOWN
2864 * and SDL_KEYUP), each with a scancode of SDL_SCANCODE_AC_BACK, after which
2865 * it will check the contents of the hint, SDL_HINT_WINRT_HANDLE_BACK_BUTTON.
2866 * If the hint's value is set to "1", the back button event's Handled
2867 * property will get set to 'true'. If the hint's value is set to something
2868 * else, or if it is unset, SDL will leave the event's Handled property
2869 * alone. (By default, the OS sets this property to 'false', to note.)
2870 *
2871 * SDL apps can either set SDL_HINT_WINRT_HANDLE_BACK_BUTTON well before a
2872 * back button is pressed, or can set it in direct-response to a back button
2873 * being pressed.
2874 *
2875 * In order to get notified when a back button is pressed, SDL apps should
2876 * register a callback function with SDL_AddEventWatch(), and have it listen
2877 * for SDL_KEYDOWN events that have a scancode of SDL_SCANCODE_AC_BACK.
2878 * (Alternatively, SDL_KEYUP events can be listened-for. Listening for
2879 * either event type is suitable.) Any value of SDL_HINT_WINRT_HANDLE_BACK_BUTTON
2880 * set by such a callback, will be applied to the OS' current
2881 * back-button-press event.
2882 *
2883 * More details on back button behavior in Windows Phone apps can be found
2884 * at the following page, on Microsoft's developer site:
2885 *
2886 * http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj247550(v=vs.105).aspx
2887 */
2888#define SDL_HINT_WINRT_HANDLE_BACK_BUTTON "SDL_WINRT_HANDLE_BACK_BUTTON"
2889
2890/** Label text for a WinRT app's privacy policy link
2891 *
2892 * Network-enabled WinRT apps must include a privacy policy. On Windows 8, 8.1, and RT,
2893 * Microsoft mandates that this policy be available via the Windows Settings charm.
2894 * SDL provides code to add a link there, with its label text being set via the
2895 * optional hint, SDL_HINT_WINRT_PRIVACY_POLICY_LABEL.
2896 *
2897 * Please note that a privacy policy's contents are not set via this hint. A separate
2898 * hint, SDL_HINT_WINRT_PRIVACY_POLICY_URL, is used to link to the actual text of the
2899 * policy.
2900 *
2901 * The contents of this hint should be encoded as a UTF8 string.
2902 *
2903 * The default value is "Privacy Policy". This hint should only be set during app
2904 * initialization, preferably before any calls to SDL_Init().
2905 *
2906 * For additional information on linking to a privacy policy, see the documentation for
2907 * SDL_HINT_WINRT_PRIVACY_POLICY_URL.
2908 */
2909#define SDL_HINT_WINRT_PRIVACY_POLICY_LABEL "SDL_WINRT_PRIVACY_POLICY_LABEL"
2910
2911/**
2912 * A URL to a WinRT app's privacy policy
2913 *
2914 * All network-enabled WinRT apps must make a privacy policy available to its
2915 * users. On Windows 8, 8.1, and RT, Microsoft mandates that this policy be be
2916 * available in the Windows Settings charm, as accessed from within the app.
2917 * SDL provides code to add a URL-based link there, which can point to the
2918 * app's privacy policy.
2919 *
2920 * To setup a URL to an app's privacy policy, set
2921 * SDL_HINT_WINRT_PRIVACY_POLICY_URL before calling any SDL_Init() functions.
2922 * The contents of the hint should be a valid URL. For example,
2923 * "http://www.example.com".
2924 *
2925 * The default value is "", which will prevent SDL from adding a privacy
2926 * policy link to the Settings charm. This hint should only be set during app
2927 * init.
2928 *
2929 * The label text of an app's "Privacy Policy" link may be customized via
2930 * another hint, SDL_HINT_WINRT_PRIVACY_POLICY_LABEL.
2931 *
2932 * Please note that on Windows Phone, Microsoft does not provide standard UI
2933 * for displaying a privacy policy link, and as such,
2934 * SDL_HINT_WINRT_PRIVACY_POLICY_URL will not get used on that platform.
2935 * Network-enabled phone apps should display their privacy policy through some
2936 * other, in-app means.
2937 */
2938#define SDL_HINT_WINRT_PRIVACY_POLICY_URL "SDL_WINRT_PRIVACY_POLICY_URL"
2939
2940/**
2941 * Mark X11 windows as override-redirect.
2942 *
2943 * If set, this _might_ increase framerate at the expense of the desktop not
2944 * working as expected. Override-redirect windows aren't noticed by the window
2945 * manager at all.
2946 *
2947 * You should probably only use this for fullscreen windows, and you probably
2948 * shouldn't even use it for that. But it's here if you want to try!
2949 */
2950#define SDL_HINT_X11_FORCE_OVERRIDE_REDIRECT "SDL_X11_FORCE_OVERRIDE_REDIRECT"
2951
2952/**
2953 * A variable that lets you disable the detection and use of Xinput gamepad
2954 * devices
2955 *
2956 * The variable can be set to the following values:
2957 *
2958 * - "0": Disable XInput detection (only uses direct input)
2959 * - "1": Enable XInput detection (the default)
2960 */
2961#define SDL_HINT_XINPUT_ENABLED "SDL_XINPUT_ENABLED"
2962
2963/**
2964 * A variable that lets you disable the detection and use of DirectInput
2965 * gamepad devices
2966 *
2967 * The variable can be set to the following values:
2968 *
2969 * - "0": Disable DirectInput detection (only uses XInput)
2970 * - "1": Enable DirectInput detection (the default)
2971 */
2972#define SDL_HINT_DIRECTINPUT_ENABLED "SDL_DIRECTINPUT_ENABLED"
2973
2974/**
2975 * A variable that causes SDL to use the old axis and button mapping for
2976 * XInput devices.
2977 *
2978 * This hint is for backwards compatibility only and will be removed in SDL
2979 * 2.1
2980 *
2981 * The default value is "0". This hint must be set before SDL_Init()
2982 */
2983#define SDL_HINT_XINPUT_USE_OLD_JOYSTICK_MAPPING "SDL_XINPUT_USE_OLD_JOYSTICK_MAPPING"
2984
2985/**
2986 * A variable that causes SDL to not ignore audio "monitors"
2987 *
2988 * This is currently only used for PulseAudio and ignored elsewhere.
2989 *
2990 * By default, SDL ignores audio devices that aren't associated with physical
2991 * hardware. Changing this hint to "1" will expose anything SDL sees that
2992 * appears to be an audio source or sink. This will add "devices" to the list
2993 * that the user probably doesn't want or need, but it can be useful in
2994 * scenarios where you want to hook up SDL to some sort of virtual device,
2995 * etc.
2996 *
2997 * The default value is "0". This hint must be set before SDL_Init().
2998 *
2999 * This hint is available since SDL 2.0.16. Before then, virtual devices are
3000 * always ignored.
3001 */
3002#define SDL_HINT_AUDIO_INCLUDE_MONITORS "SDL_AUDIO_INCLUDE_MONITORS"
3003
3004/**
3005 * A variable that forces X11 windows to create as a custom type.
3006 *
3007 * This is currently only used for X11 and ignored elsewhere.
3008 *
3009 * During SDL_CreateWindow, SDL uses the _NET_WM_WINDOW_TYPE X11 property to
3010 * report to the window manager the type of window it wants to create. This
3011 * might be set to various things if SDL_WINDOW_TOOLTIP or
3012 * SDL_WINDOW_POPUP_MENU, etc, were specified. For "normal" windows that
3013 * haven't set a specific type, this hint can be used to specify a custom
3014 * type. For example, a dock window might set this to
3015 * "_NET_WM_WINDOW_TYPE_DOCK".
3016 *
3017 * If not set or set to "", this hint is ignored. This hint must be set before
3018 * the SDL_CreateWindow() call that it is intended to affect.
3019 *
3020 * This hint is available since SDL 2.0.22.
3021 */
3022#define SDL_HINT_X11_WINDOW_TYPE "SDL_X11_WINDOW_TYPE"
3023
3024/**
3025 * A variable that decides whether to send SDL_QUIT when closing the final
3026 * window.
3027 *
3028 * By default, SDL sends an SDL_QUIT event when there is only one window and
3029 * it receives an SDL_WINDOWEVENT_CLOSE event, under the assumption most apps
3030 * would also take the loss of this window as a signal to terminate the
3031 * program.
3032 *
3033 * However, it's not unreasonable in some cases to have the program continue
3034 * to live on, perhaps to create new windows later.
3035 *
3036 * Changing this hint to "0" will cause SDL to not send an SDL_QUIT event when
3037 * the final window is requesting to close. Note that in this case, there are
3038 * still other legitimate reasons one might get an SDL_QUIT event: choosing
3039 * "Quit" from the macOS menu bar, sending a SIGINT (ctrl-c) on Unix, etc.
3040 *
3041 * The default value is "1". This hint can be changed at any time.
3042 *
3043 * This hint is available since SDL 2.0.22. Before then, you always get an
3044 * SDL_QUIT event when closing the final window.
3045 */
3046#define SDL_HINT_QUIT_ON_LAST_WINDOW_CLOSE "SDL_QUIT_ON_LAST_WINDOW_CLOSE"
3047
3048
3049/**
3050 * A variable that decides what video backend to use.
3051 *
3052 * By default, SDL will try all available video backends in a reasonable order
3053 * until it finds one that can work, but this hint allows the app or user to
3054 * force a specific target, such as "x11" if, say, you are on Wayland but want
3055 * to try talking to the X server instead.
3056 *
3057 * This functionality has existed since SDL 2.0.0 (indeed, before that) but
3058 * before 2.0.22 this was an environment variable only. In 2.0.22, it was
3059 * upgraded to a full SDL hint, so you can set the environment variable as
3060 * usual or programatically set the hint with SDL_SetHint, which won't
3061 * propagate to child processes.
3062 *
3063 * The default value is unset, in which case SDL will try to figure out the
3064 * best video backend on your behalf. This hint needs to be set before
3065 * SDL_Init() is called to be useful.
3066 *
3067 * This hint is available since SDL 2.0.22. Before then, you could set the
3068 * environment variable to get the same effect.
3069 */
3070#define SDL_HINT_VIDEODRIVER "SDL_VIDEODRIVER"
3071
3072/**
3073 * A variable that decides what audio backend to use.
3074 *
3075 * By default, SDL will try all available audio backends in a reasonable order
3076 * until it finds one that can work, but this hint allows the app or user to
3077 * force a specific target, such as "alsa" if, say, you are on PulseAudio but
3078 * want to try talking to the lower level instead.
3079 *
3080 * This functionality has existed since SDL 2.0.0 (indeed, before that) but
3081 * before 2.0.22 this was an environment variable only. In 2.0.22, it was
3082 * upgraded to a full SDL hint, so you can set the environment variable as
3083 * usual or programatically set the hint with SDL_SetHint, which won't
3084 * propagate to child processes.
3085 *
3086 * The default value is unset, in which case SDL will try to figure out the
3087 * best audio backend on your behalf. This hint needs to be set before
3088 * SDL_Init() is called to be useful.
3089 *
3090 * This hint is available since SDL 2.0.22. Before then, you could set the
3091 * environment variable to get the same effect.
3092 */
3093#define SDL_HINT_AUDIODRIVER "SDL_AUDIODRIVER"
3094
3095/**
3096 * A variable that decides what KMSDRM device to use.
3097 *
3098 * Internally, SDL might open something like "/dev/dri/cardNN" to access
3099 * KMSDRM functionality, where "NN" is a device index number.
3100 *
3101 * SDL makes a guess at the best index to use (usually zero), but the app or
3102 * user can set this hint to a number between 0 and 99 to force selection.
3103 *
3104 * This hint is available since SDL 2.24.0.
3105 */
3106#define SDL_HINT_KMSDRM_DEVICE_INDEX "SDL_KMSDRM_DEVICE_INDEX"
3107
3108
3109/**
3110 * A variable that treats trackpads as touch devices.
3111 *
3112 * On macOS (and possibly other platforms in the future), SDL will report
3113 * touches on a trackpad as mouse input, which is generally what users expect
3114 * from this device; however, these are often actually full multitouch-capable
3115 * touch devices, so it might be preferable to some apps to treat them as
3116 * such.
3117 *
3118 * Setting this hint to true will make the trackpad input report as a
3119 * multitouch device instead of a mouse. The default is false.
3120 *
3121 * Note that most platforms don't support this hint. As of 2.24.0, it only
3122 * supports MacBooks' trackpads on macOS. Others may follow later.
3123 *
3124 * This hint is checked during SDL_Init and can not be changed after.
3125 *
3126 * This hint is available since SDL 2.24.0.
3127 */
3128#define SDL_HINT_TRACKPAD_IS_TOUCH_ONLY "SDL_TRACKPAD_IS_TOUCH_ONLY"
3129
3130/**
3131 * Cause SDL to call dbus_shutdown() on quit.
3132 *
3133 * This is useful as a debug tool to validate memory leaks, but shouldn't ever
3134 * be set in production applications, as other libraries used by the
3135 * application might use dbus under the hood and this cause cause crashes if
3136 * they continue after SDL_Quit().
3137 *
3138 * This variable can be set to the following values:
3139 *
3140 * - "0": SDL will not call dbus_shutdown() on quit (default)
3141 * - "1": SDL will call dbus_shutdown() on quit
3142 *
3143 * This hint is available since SDL 2.30.0.
3144 */
3145#define SDL_HINT_SHUTDOWN_DBUS_ON_QUIT "SDL_SHUTDOWN_DBUS_ON_QUIT"
3146
3147/**
3148 * Specify if SDL_RWFromFile should use the resource dir on Apple platforms.
3149 *
3150 * SDL2 has always done this on Apple platforms, but it can be surprising to
3151 * try opening a path to discover that SDL adjusts the path to elsewhere, so
3152 * this hint allows that behavior to be disabled.
3153 *
3154 * If running from a App Bundle, this will be MyApp.app/Contents/Resources. If
3155 * running as a normal Unix-like process, this will be the directory where the
3156 * running binary lives. Setting this hint to 0 avoids this and just uses the
3157 * requested path as-is.
3158 *
3159 * This variable can be set to the following values:
3160 *
3161 * - "0": SDL will not use the app resource directory.
3162 * - "1": SDL will use the app's resource directory (default).
3163 *
3164 * This hint is available since SDL 2.32.0.
3165 */
3166#define SDL_HINT_APPLE_RWFROMFILE_USE_RESOURCES "SDL_APPLE_RWFROMFILE_USE_RESOURCES"
3167
3168
3169/**
3170 * An enumeration of hint priorities
3171 */
3172typedef enum SDL_HintPriority
3173{
3174 SDL_HINT_DEFAULT,
3175 SDL_HINT_NORMAL,
3176 SDL_HINT_OVERRIDE
3177} SDL_HintPriority;
3178
3179
3180/**
3181 * Set a hint with a specific priority.
3182 *
3183 * The priority controls the behavior when setting a hint that already has a
3184 * value. Hints will replace existing hints of their priority and lower.
3185 * Environment variables are considered to have override priority.
3186 *
3187 * \param name the hint to set.
3188 * \param value the value of the hint variable.
3189 * \param priority the SDL_HintPriority level for the hint.
3190 * \returns SDL_TRUE if the hint was set, SDL_FALSE otherwise.
3191 *
3192 * \since This function is available since SDL 2.0.0.
3193 *
3194 * \sa SDL_GetHint
3195 * \sa SDL_SetHint
3196 */
3197extern DECLSPEC SDL_bool SDLCALL SDL_SetHintWithPriority(const char *name,
3198 const char *value,
3199 SDL_HintPriority priority);
3200
3201/**
3202 * Set a hint with normal priority.
3203 *
3204 * Hints will not be set if there is an existing override hint or environment
3205 * variable that takes precedence. You can use SDL_SetHintWithPriority() to
3206 * set the hint with override priority instead.
3207 *
3208 * \param name the hint to set.
3209 * \param value the value of the hint variable.
3210 * \returns SDL_TRUE if the hint was set, SDL_FALSE otherwise.
3211 *
3212 * \since This function is available since SDL 2.0.0.
3213 *
3214 * \sa SDL_GetHint
3215 * \sa SDL_SetHintWithPriority
3216 */
3217extern DECLSPEC SDL_bool SDLCALL SDL_SetHint(const char *name,
3218 const char *value);
3219
3220/**
3221 * Reset a hint to the default value.
3222 *
3223 * This will reset a hint to the value of the environment variable, or NULL if
3224 * the environment isn't set. Callbacks will be called normally with this
3225 * change.
3226 *
3227 * \param name the hint to set.
3228 * \returns SDL_TRUE if the hint was set, SDL_FALSE otherwise.
3229 *
3230 * \since This function is available since SDL 2.24.0.
3231 *
3232 * \sa SDL_GetHint
3233 * \sa SDL_SetHint
3234 */
3235extern DECLSPEC SDL_bool SDLCALL SDL_ResetHint(const char *name);
3236
3237/**
3238 * Reset all hints to the default values.
3239 *
3240 * This will reset all hints to the value of the associated environment
3241 * variable, or NULL if the environment isn't set. Callbacks will be called
3242 * normally with this change.
3243 *
3244 * \since This function is available since SDL 2.26.0.
3245 *
3246 * \sa SDL_GetHint
3247 * \sa SDL_SetHint
3248 * \sa SDL_ResetHint
3249 */
3250extern DECLSPEC void SDLCALL SDL_ResetHints(void);
3251
3252/**
3253 * Get the value of a hint.
3254 *
3255 * \param name the hint to query.
3256 * \returns the string value of a hint or NULL if the hint isn't set.
3257 *
3258 * \since This function is available since SDL 2.0.0.
3259 *
3260 * \sa SDL_SetHint
3261 * \sa SDL_SetHintWithPriority
3262 */
3263extern DECLSPEC const char * SDLCALL SDL_GetHint(const char *name);
3264
3265/**
3266 * Get the boolean value of a hint variable.
3267 *
3268 * \param name the name of the hint to get the boolean value from.
3269 * \param default_value the value to return if the hint does not exist.
3270 * \returns the boolean value of a hint or the provided default value if the
3271 * hint does not exist.
3272 *
3273 * \since This function is available since SDL 2.0.5.
3274 *
3275 * \sa SDL_GetHint
3276 * \sa SDL_SetHint
3277 */
3278extern DECLSPEC SDL_bool SDLCALL SDL_GetHintBoolean(const char *name, SDL_bool default_value);
3279
3280/**
3281 * Type definition of the hint callback function.
3282 *
3283 * \param userdata what was passed as `userdata` to SDL_AddHintCallback().
3284 * \param name what was passed as `name` to SDL_AddHintCallback().
3285 * \param oldValue the previous hint value.
3286 * \param newValue the new value hint is to be set to.
3287 */
3288typedef void (SDLCALL *SDL_HintCallback)(void *userdata, const char *name, const char *oldValue, const char *newValue);
3289
3290/**
3291 * Add a function to watch a particular hint.
3292 *
3293 * \param name the hint to watch.
3294 * \param callback An SDL_HintCallback function that will be called when the
3295 * hint value changes.
3296 * \param userdata a pointer to pass to the callback function.
3297 *
3298 * \since This function is available since SDL 2.0.0.
3299 *
3300 * \sa SDL_DelHintCallback
3301 */
3302extern DECLSPEC void SDLCALL SDL_AddHintCallback(const char *name,
3303 SDL_HintCallback callback,
3304 void *userdata);
3305
3306/**
3307 * Remove a function watching a particular hint.
3308 *
3309 * \param name the hint being watched.
3310 * \param callback An SDL_HintCallback function that will be called when the
3311 * hint value changes.
3312 * \param userdata a pointer being passed to the callback function.
3313 *
3314 * \since This function is available since SDL 2.0.0.
3315 *
3316 * \sa SDL_AddHintCallback
3317 */
3318extern DECLSPEC void SDLCALL SDL_DelHintCallback(const char *name,
3319 SDL_HintCallback callback,
3320 void *userdata);
3321
3322/**
3323 * Clear all hints.
3324 *
3325 * This function is automatically called during SDL_Quit(), and deletes all
3326 * callbacks without calling them and frees all memory associated with hints.
3327 * If you're calling this from application code you probably want to call
3328 * SDL_ResetHints() instead.
3329 *
3330 * This function will be removed from the API the next time we rev the ABI.
3331 *
3332 * \since This function is available since SDL 2.0.0.
3333 *
3334 * \sa SDL_ResetHints
3335 */
3336extern DECLSPEC void SDLCALL SDL_ClearHints(void);
3337
3338
3339/* Ends C function definitions when using C++ */
3340#ifdef __cplusplus
3341}
3342#endif
3343#include "close_code.h"
3344
3345#endif /* SDL_hints_h_ */
3346
3347/* vi: set ts=4 sw=4 expandtab: */
3348