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