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