SDL 3.0
SDL_hints.h
Go to the documentation of this file.
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2024 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 <SDL3/SDL_stdinc.h>
43#include <SDL3/SDL_error.h>
44
45#include <SDL3/SDL_begin_code.h>
46/* Set up for C function definitions, even when using C++ */
47#ifdef __cplusplus
48extern "C" {
49#endif
50
51/**
52 * Specify the behavior of Alt+Tab while the keyboard is grabbed.
53 *
54 * By default, SDL emulates Alt+Tab functionality while the keyboard is
55 * grabbed and your window is full-screen. This prevents the user from getting
56 * stuck in your application if you've enabled keyboard grab.
57 *
58 * The variable can be set to the following values:
59 *
60 * - "0": SDL will not handle Alt+Tab. Your application is responsible for
61 * handling Alt+Tab while the keyboard is grabbed.
62 * - "1": SDL will minimize your window when Alt+Tab is pressed (default)
63 *
64 * This hint can be set anytime.
65 *
66 * \since This hint is available since SDL 3.0.0.
67 */
68#define SDL_HINT_ALLOW_ALT_TAB_WHILE_GRABBED "SDL_ALLOW_ALT_TAB_WHILE_GRABBED"
69
70/**
71 * A variable to control whether the SDL activity is allowed to be re-created.
72 *
73 * If this hint is true, the activity can be recreated on demand by the OS,
74 * and Java static data and C++ static data remain with their current values.
75 * If this hint is false, then SDL will call exit() when you return from your
76 * main function and the application will be terminated and then started fresh
77 * each time.
78 *
79 * The variable can be set to the following values:
80 *
81 * - "0": The application starts fresh at each launch. (default)
82 * - "1": The application activity can be recreated by the OS.
83 *
84 * This hint can be set anytime.
85 *
86 * \since This hint is available since SDL 3.0.0.
87 */
88#define SDL_HINT_ANDROID_ALLOW_RECREATE_ACTIVITY "SDL_ANDROID_ALLOW_RECREATE_ACTIVITY"
89
90/**
91 * A variable to control whether the event loop will block itself when the app
92 * is paused.
93 *
94 * The variable can be set to the following values:
95 *
96 * - "0": Non blocking.
97 * - "1": Blocking. (default)
98 *
99 * This hint should be set before SDL is initialized.
100 *
101 * \since This hint is available since SDL 3.0.0.
102 */
103#define SDL_HINT_ANDROID_BLOCK_ON_PAUSE "SDL_ANDROID_BLOCK_ON_PAUSE"
104
105/**
106 * A variable to control whether we trap the Android back button to handle it
107 * manually.
108 *
109 * This is necessary for the right mouse button to work on some Android
110 * devices, or to be able to trap the back button for use in your code
111 * reliably. If this hint is true, the back button will show up as an
112 * SDL_EVENT_KEY_DOWN / SDL_EVENT_KEY_UP pair with a keycode of
113 * SDL_SCANCODE_AC_BACK.
114 *
115 * The variable can be set to the following values:
116 *
117 * - "0": Back button will be handled as usual for system. (default)
118 * - "1": Back button will be trapped, allowing you to handle the key press
119 * manually. (This will also let right mouse click work on systems where the
120 * right mouse button functions as back.)
121 *
122 * This hint can be set anytime.
123 *
124 * \since This hint is available since SDL 3.0.0.
125 */
126#define SDL_HINT_ANDROID_TRAP_BACK_BUTTON "SDL_ANDROID_TRAP_BACK_BUTTON"
127
128/**
129 * A variable setting the app ID string.
130 *
131 * This string is used by desktop compositors to identify and group windows
132 * together, as well as match applications with associated desktop settings
133 * and icons.
134 *
135 * This will override SDL_PROP_APP_METADATA_IDENTIFIER_STRING, if set by the
136 * application.
137 *
138 * This hint should be set before SDL is initialized.
139 *
140 * \since This hint is available since SDL 3.0.0.
141 */
142#define SDL_HINT_APP_ID "SDL_APP_ID"
143
144/**
145 * A variable setting the application name.
146 *
147 * This hint lets you specify the application name sent to the OS when
148 * required. For example, this will often appear in volume control applets for
149 * audio streams, and in lists of applications which are inhibiting the
150 * screensaver. You should use a string that describes your program ("My Game
151 * 2: The Revenge")
152 *
153 * This will override SDL_PROP_APP_METADATA_NAME_STRING, if set by the
154 * application.
155 *
156 * This hint should be set before SDL is initialized.
157 *
158 * \since This hint is available since SDL 3.0.0.
159 */
160#define SDL_HINT_APP_NAME "SDL_APP_NAME"
161
162/**
163 * A variable controlling whether controllers used with the Apple TV generate
164 * UI events.
165 *
166 * When UI events are generated by controller input, the app will be
167 * backgrounded when the Apple TV remote's menu button is pressed, and when
168 * the pause or B buttons on gamepads are pressed.
169 *
170 * More information about properly making use of controllers for the Apple TV
171 * can be found here:
172 * https://developer.apple.com/tvos/human-interface-guidelines/remote-and-controllers/
173 *
174 * The variable can be set to the following values:
175 *
176 * - "0": Controller input does not generate UI events. (default)
177 * - "1": Controller input generates UI events.
178 *
179 * This hint can be set anytime.
180 *
181 * \since This hint is available since SDL 3.0.0.
182 */
183#define SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS "SDL_APPLE_TV_CONTROLLER_UI_EVENTS"
184
185/**
186 * A variable controlling whether the Apple TV remote's joystick axes will
187 * automatically match the rotation of the remote.
188 *
189 * The variable can be set to the following values:
190 *
191 * - "0": Remote orientation does not affect joystick axes. (default)
192 * - "1": Joystick axes are based on the orientation of the remote.
193 *
194 * This hint can be set anytime.
195 *
196 * \since This hint is available since SDL 3.0.0.
197 */
198#define SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION "SDL_APPLE_TV_REMOTE_ALLOW_ROTATION"
199
200/**
201 * A variable controlling the audio category on iOS and macOS.
202 *
203 * The variable can be set to the following values:
204 *
205 * - "ambient": Use the AVAudioSessionCategoryAmbient audio category, will be
206 * muted by the phone mute switch (default)
207 * - "playback": Use the AVAudioSessionCategoryPlayback category.
208 *
209 * For more information, see Apple's documentation:
210 * https://developer.apple.com/library/content/documentation/Audio/Conceptual/AudioSessionProgrammingGuide/AudioSessionCategoriesandModes/AudioSessionCategoriesandModes.html
211 *
212 * This hint should be set before an audio device is opened.
213 *
214 * \since This hint is available since SDL 3.0.0.
215 */
216#define SDL_HINT_AUDIO_CATEGORY "SDL_AUDIO_CATEGORY"
217
218/**
219 * Specify an application icon name for an audio device.
220 *
221 * Some audio backends (such as Pulseaudio and Pipewire) allow you to set an
222 * XDG icon name for your application. Among other things, this icon might
223 * show up in a system control panel that lets the user adjust the volume on
224 * specific audio streams instead of using one giant master volume slider.
225 * Note that this is unrelated to the icon used by the windowing system, which
226 * may be set with SDL_SetWindowIcon (or via desktop file on Wayland).
227 *
228 * Setting this to "" or leaving it unset will have SDL use a reasonable
229 * default, "applications-games", which is likely to be installed. See
230 * https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html
231 * and
232 * https://specifications.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html
233 * for the relevant XDG icon specs.
234 *
235 * This hint should be set before an audio device is opened.
236 *
237 * \since This hint is available since SDL 3.0.0.
238 */
239#define SDL_HINT_AUDIO_DEVICE_APP_ICON_NAME "SDL_AUDIO_DEVICE_APP_ICON_NAME"
240
241/**
242 * A variable controlling device buffer size.
243 *
244 * This hint is an integer > 0, that represents the size of the device's
245 * buffer in sample frames (stereo audio data in 16-bit format is 4 bytes per
246 * sample frame, for example).
247 *
248 * SDL3 generally decides this value on behalf of the app, but if for some
249 * reason the app needs to dictate this (because they want either lower
250 * latency or higher throughput AND ARE WILLING TO DEAL WITH what that might
251 * require of the app), they can specify it.
252 *
253 * SDL will try to accommodate this value, but there is no promise you'll get
254 * the buffer size requested. Many platforms won't honor this request at all,
255 * or might adjust it.
256 *
257 * This hint should be set before an audio device is opened.
258 *
259 * \since This hint is available since SDL 3.0.0.
260 */
261#define SDL_HINT_AUDIO_DEVICE_SAMPLE_FRAMES "SDL_AUDIO_DEVICE_SAMPLE_FRAMES"
262
263/**
264 * Specify an audio stream name for an audio device.
265 *
266 * Some audio backends (such as PulseAudio) allow you to describe your audio
267 * stream. Among other things, this description might show up in a system
268 * control panel that lets the user adjust the volume on specific audio
269 * streams instead of using one giant master volume slider.
270 *
271 * This hints lets you transmit that information to the OS. The contents of
272 * this hint are used while opening an audio device. You should use a string
273 * that describes your what your program is playing ("audio stream" is
274 * probably sufficient in many cases, but this could be useful for something
275 * like "team chat" if you have a headset playing VoIP audio separately).
276 *
277 * Setting this to "" or leaving it unset will have SDL use a reasonable
278 * default: "audio stream" or something similar.
279 *
280 * Note that while this talks about audio streams, this is an OS-level
281 * concept, so it applies to a physical audio device in this case, and not an
282 * SDL_AudioStream, nor an SDL logical audio device.
283 *
284 * This hint should be set before an audio device is opened.
285 *
286 * \since This hint is available since SDL 3.0.0.
287 */
288#define SDL_HINT_AUDIO_DEVICE_STREAM_NAME "SDL_AUDIO_DEVICE_STREAM_NAME"
289
290/**
291 * Specify an application role for an audio device.
292 *
293 * Some audio backends (such as Pipewire) allow you to describe the role of
294 * your audio stream. Among other things, this description might show up in a
295 * system control panel or software for displaying and manipulating media
296 * playback/recording graphs.
297 *
298 * This hints lets you transmit that information to the OS. The contents of
299 * this hint are used while opening an audio device. You should use a string
300 * that describes your what your program is playing (Game, Music, Movie,
301 * etc...).
302 *
303 * Setting this to "" or leaving it unset will have SDL use a reasonable
304 * default: "Game" or something similar.
305 *
306 * Note that while this talks about audio streams, this is an OS-level
307 * concept, so it applies to a physical audio device in this case, and not an
308 * SDL_AudioStream, nor an SDL logical audio device.
309 *
310 * This hint should be set before an audio device is opened.
311 *
312 * \since This hint is available since SDL 3.0.0.
313 */
314#define SDL_HINT_AUDIO_DEVICE_STREAM_ROLE "SDL_AUDIO_DEVICE_STREAM_ROLE"
315
316/**
317 * A variable that specifies an audio backend to use.
318 *
319 * By default, SDL will try all available audio backends in a reasonable order
320 * until it finds one that can work, but this hint allows the app or user to
321 * force a specific driver, such as "pipewire" if, say, you are on PulseAudio
322 * but want to try talking to the lower level instead.
323 *
324 * This hint should be set before SDL is initialized.
325 *
326 * \since This hint is available since SDL 3.0.0.
327 */
328#define SDL_HINT_AUDIO_DRIVER "SDL_AUDIO_DRIVER"
329
330/**
331 * A variable that causes SDL to not ignore audio "monitors".
332 *
333 * This is currently only used by the PulseAudio driver.
334 *
335 * By default, SDL ignores audio devices that aren't associated with physical
336 * hardware. Changing this hint to "1" will expose anything SDL sees that
337 * appears to be an audio source or sink. This will add "devices" to the list
338 * that the user probably doesn't want or need, but it can be useful in
339 * scenarios where you want to hook up SDL to some sort of virtual device,
340 * etc.
341 *
342 * The variable can be set to the following values:
343 *
344 * - "0": Audio monitor devices will be ignored. (default)
345 * - "1": Audio monitor devices will show up in the device list.
346 *
347 * This hint should be set before SDL is initialized.
348 *
349 * \since This hint is available since SDL 3.0.0.
350 */
351#define SDL_HINT_AUDIO_INCLUDE_MONITORS "SDL_AUDIO_INCLUDE_MONITORS"
352
353/**
354 * A variable controlling whether SDL updates joystick state when getting
355 * input events.
356 *
357 * The variable can be set to the following values:
358 *
359 * - "0": You'll call SDL_UpdateJoysticks() manually.
360 * - "1": SDL will automatically call SDL_UpdateJoysticks(). (default)
361 *
362 * This hint can be set anytime.
363 *
364 * \since This hint is available since SDL 3.0.0.
365 */
366#define SDL_HINT_AUTO_UPDATE_JOYSTICKS "SDL_AUTO_UPDATE_JOYSTICKS"
367
368/**
369 * A variable controlling whether SDL updates sensor state when getting input
370 * events.
371 *
372 * The variable can be set to the following values:
373 *
374 * - "0": You'll call SDL_UpdateSensors() manually.
375 * - "1": SDL will automatically call SDL_UpdateSensors(). (default)
376 *
377 * This hint can be set anytime.
378 *
379 * \since This hint is available since SDL 3.0.0.
380 */
381#define SDL_HINT_AUTO_UPDATE_SENSORS "SDL_AUTO_UPDATE_SENSORS"
382
383/**
384 * Prevent SDL from using version 4 of the bitmap header when saving BMPs.
385 *
386 * The bitmap header version 4 is required for proper alpha channel support
387 * and SDL will use it when required. Should this not be desired, this hint
388 * can force the use of the 40 byte header version which is supported
389 * everywhere.
390 *
391 * The variable can be set to the following values:
392 *
393 * - "0": Surfaces with a colorkey or an alpha channel are saved to a 32-bit
394 * BMP file with an alpha mask. SDL will use the bitmap header version 4 and
395 * set the alpha mask accordingly. (default)
396 * - "1": Surfaces with a colorkey or an alpha channel are saved to a 32-bit
397 * BMP file without an alpha mask. The alpha channel data will be in the
398 * file, but applications are going to ignore it.
399 *
400 * This hint can be set anytime.
401 *
402 * \since This hint is available since SDL 3.0.0.
403 */
404#define SDL_HINT_BMP_SAVE_LEGACY_FORMAT "SDL_BMP_SAVE_LEGACY_FORMAT"
405
406/**
407 * A variable that decides what camera backend to use.
408 *
409 * By default, SDL will try all available camera backends in a reasonable
410 * order until it finds one that can work, but this hint allows the app or
411 * user to force a specific target, such as "directshow" if, say, you are on
412 * Windows Media Foundations but want to try DirectShow instead.
413 *
414 * The default value is unset, in which case SDL will try to figure out the
415 * best camera backend on your behalf. This hint needs to be set before
416 * SDL_Init() is called to be useful.
417 *
418 * \since This hint is available since SDL 3.0.0.
419 */
420#define SDL_HINT_CAMERA_DRIVER "SDL_CAMERA_DRIVER"
421
422/**
423 * A variable that limits what CPU features are available.
424 *
425 * By default, SDL marks all features the current CPU supports as available.
426 * This hint allows to limit these to a subset.
427 *
428 * When the hint is unset, or empty, SDL will enable all detected CPU
429 * features.
430 *
431 * The variable can be set to a comma separated list containing the following
432 * items:
433 *
434 * - "all"
435 * - "altivec"
436 * - "sse"
437 * - "sse2"
438 * - "sse3"
439 * - "sse41"
440 * - "sse42"
441 * - "avx"
442 * - "avx2"
443 * - "avx512f"
444 * - "arm-simd"
445 * - "neon"
446 * - "lsx"
447 * - "lasx"
448 *
449 * The items can be prefixed by '+'/'-' to add/remove features.
450 *
451 * \since This hint is available since SDL 3.0.0.
452 */
453#define SDL_HINT_CPU_FEATURE_MASK "SDL_CPU_FEATURE_MASK"
454
455/**
456 * A variable controlling whether DirectInput should be used for controllers.
457 *
458 * The variable can be set to the following values:
459 *
460 * - "0": Disable DirectInput detection.
461 * - "1": Enable DirectInput detection. (default)
462 *
463 * This hint should be set before SDL is initialized.
464 *
465 * \since This hint is available since SDL 3.0.0.
466 */
467#define SDL_HINT_JOYSTICK_DIRECTINPUT "SDL_JOYSTICK_DIRECTINPUT"
468
469/**
470 * A variable that specifies a dialog backend to use.
471 *
472 * By default, SDL will try all available dialog backends in a reasonable
473 * order until it finds one that can work, but this hint allows the app or
474 * user to force a specific target.
475 *
476 * If the specified target does not exist or is not available, the
477 * dialog-related function calls will fail.
478 *
479 * This hint currently only applies to platforms using the generic "Unix"
480 * dialog implementation, but may be extended to more platforms in the future.
481 * Note that some Unix and Unix-like platforms have their own implementation,
482 * such as macOS and Haiku.
483 *
484 * The variable can be set to the following values:
485 *
486 * - NULL: Select automatically (default, all platforms)
487 * - "portal": Use XDG Portals through DBus (Unix only)
488 * - "zenity": Use the Zenity program (Unix only)
489 *
490 * More options may be added in the future.
491 *
492 * This hint can be set anytime.
493 *
494 * \since This hint is available since SDL 3.0.0.
495 */
496#define SDL_HINT_FILE_DIALOG_DRIVER "SDL_FILE_DIALOG_DRIVER"
497
498/**
499 * Override for SDL_GetDisplayUsableBounds().
500 *
501 * If set, this hint will override the expected results for
502 * SDL_GetDisplayUsableBounds() for display index 0. Generally you don't want
503 * to do this, but this allows an embedded system to request that some of the
504 * screen be reserved for other uses when paired with a well-behaved
505 * application.
506 *
507 * The contents of this hint must be 4 comma-separated integers, the first is
508 * the bounds x, then y, width and height, in that order.
509 *
510 * This hint can be set anytime.
511 *
512 * \since This hint is available since SDL 3.0.0.
513 */
514#define SDL_HINT_DISPLAY_USABLE_BOUNDS "SDL_DISPLAY_USABLE_BOUNDS"
515
516/**
517 * Disable giving back control to the browser automatically when running with
518 * asyncify.
519 *
520 * With -s ASYNCIFY, SDL calls emscripten_sleep during operations such as
521 * refreshing the screen or polling events.
522 *
523 * This hint only applies to the emscripten platform.
524 *
525 * The variable can be set to the following values:
526 *
527 * - "0": Disable emscripten_sleep calls (if you give back browser control
528 * manually or use asyncify for other purposes).
529 * - "1": Enable emscripten_sleep calls. (default)
530 *
531 * This hint can be set anytime.
532 *
533 * \since This hint is available since SDL 3.0.0.
534 */
535#define SDL_HINT_EMSCRIPTEN_ASYNCIFY "SDL_EMSCRIPTEN_ASYNCIFY"
536
537/**
538 * Specify the CSS selector used for the "default" window/canvas.
539 *
540 * This hint only applies to the emscripten platform.
541 *
542 * The default value is "#canvas"
543 *
544 * This hint should be set before creating a window.
545 *
546 * \since This hint is available since SDL 3.0.0.
547 */
548#define SDL_HINT_EMSCRIPTEN_CANVAS_SELECTOR "SDL_EMSCRIPTEN_CANVAS_SELECTOR"
549
550/**
551 * Override the binding element for keyboard inputs for Emscripten builds.
552 *
553 * This hint only applies to the emscripten platform.
554 *
555 * The variable can be one of:
556 *
557 * - "#window": the javascript window object (default)
558 * - "#document": the javascript document object
559 * - "#screen": the javascript window.screen object
560 * - "#canvas": the WebGL canvas element
561 * - any other string without a leading # sign applies to the element on the
562 * page with that ID.
563 *
564 * This hint should be set before creating a window.
565 *
566 * \since This hint is available since SDL 3.0.0.
567 */
568#define SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT "SDL_EMSCRIPTEN_KEYBOARD_ELEMENT"
569
570/**
571 * A variable that controls whether the on-screen keyboard should be shown
572 * when text input is active.
573 *
574 * The variable can be set to the following values:
575 *
576 * - "auto": The on-screen keyboard will be shown if there is no physical
577 * keyboard attached. (default)
578 * - "0": Do not show the on-screen keyboard.
579 * - "1": Show the on-screen keyboard, if available.
580 *
581 * This hint must be set before SDL_StartTextInput() is called
582 *
583 * \since This hint is available since SDL 3.0.0.
584 */
585#define SDL_HINT_ENABLE_SCREEN_KEYBOARD "SDL_ENABLE_SCREEN_KEYBOARD"
586
587/**
588 * A variable controlling verbosity of the logging of SDL events pushed onto
589 * the internal queue.
590 *
591 * The variable can be set to the following values, from least to most
592 * verbose:
593 *
594 * - "0": Don't log any events. (default)
595 * - "1": Log most events (other than the really spammy ones).
596 * - "2": Include mouse and finger motion events.
597 *
598 * This is generally meant to be used to debug SDL itself, but can be useful
599 * for application developers that need better visibility into what is going
600 * on in the event queue. Logged events are sent through SDL_Log(), which
601 * means by default they appear on stdout on most platforms or maybe
602 * OutputDebugString() on Windows, and can be funneled by the app with
603 * SDL_SetLogOutputFunction(), etc.
604 *
605 * This hint can be set anytime.
606 *
607 * \since This hint is available since SDL 3.0.0.
608 */
609#define SDL_HINT_EVENT_LOGGING "SDL_EVENT_LOGGING"
610
611/**
612 * A variable controlling whether raising the window should be done more
613 * forcefully.
614 *
615 * The variable can be set to the following values:
616 *
617 * - "0": Honor the OS policy for raising windows. (default)
618 * - "1": Force the window to be raised, overriding any OS policy.
619 *
620 * At present, this is only an issue under MS Windows, which makes it nearly
621 * impossible to programmatically move a window to the foreground, for
622 * "security" reasons. See http://stackoverflow.com/a/34414846 for a
623 * discussion.
624 *
625 * This hint can be set anytime.
626 *
627 * \since This hint is available since SDL 3.0.0.
628 */
629#define SDL_HINT_FORCE_RAISEWINDOW "SDL_FORCE_RAISEWINDOW"
630
631/**
632 * A variable controlling how 3D acceleration is used to accelerate the SDL
633 * screen surface.
634 *
635 * SDL can try to accelerate the SDL screen surface by using streaming
636 * textures with a 3D rendering engine. This variable controls whether and how
637 * this is done.
638 *
639 * The variable can be set to the following values:
640 *
641 * - "0": Disable 3D acceleration
642 * - "1": Enable 3D acceleration, using the default renderer. (default)
643 * - "X": Enable 3D acceleration, using X where X is one of the valid
644 * rendering drivers. (e.g. "direct3d", "opengl", etc.)
645 *
646 * This hint should be set before calling SDL_GetWindowSurface()
647 *
648 * \since This hint is available since SDL 3.0.0.
649 */
650#define SDL_HINT_FRAMEBUFFER_ACCELERATION "SDL_FRAMEBUFFER_ACCELERATION"
651
652/**
653 * A variable that lets you manually hint extra gamecontroller db entries.
654 *
655 * The variable should be newline delimited rows of gamecontroller config
656 * data, see SDL_gamepad.h
657 *
658 * You can update mappings after SDL is initialized with
659 * SDL_GetGamepadMappingForGUID() and SDL_AddGamepadMapping()
660 *
661 * This hint should be set before SDL is initialized.
662 *
663 * \since This hint is available since SDL 3.0.0.
664 */
665#define SDL_HINT_GAMECONTROLLERCONFIG "SDL_GAMECONTROLLERCONFIG"
666
667/**
668 * A variable that lets you provide a file with extra gamecontroller db
669 * entries.
670 *
671 * The file should contain lines of gamecontroller config data, see
672 * SDL_gamepad.h
673 *
674 * You can update mappings after SDL is initialized with
675 * SDL_GetGamepadMappingForGUID() and SDL_AddGamepadMapping()
676 *
677 * This hint should be set before SDL is initialized.
678 *
679 * \since This hint is available since SDL 3.0.0.
680 */
681#define SDL_HINT_GAMECONTROLLERCONFIG_FILE "SDL_GAMECONTROLLERCONFIG_FILE"
682
683/**
684 * A variable that overrides the automatic controller type detection.
685 *
686 * The variable should be comma separated entries, in the form: VID/PID=type
687 *
688 * The VID and PID should be hexadecimal with exactly 4 digits, e.g. 0x00fd
689 *
690 * This hint affects what low level protocol is used with the HIDAPI driver.
691 *
692 * The variable can be set to the following values:
693 *
694 * - "Xbox360"
695 * - "XboxOne"
696 * - "PS3"
697 * - "PS4"
698 * - "PS5"
699 * - "SwitchPro"
700 *
701 * This hint should be set before SDL is initialized.
702 *
703 * \since This hint is available since SDL 3.0.0.
704 */
705#define SDL_HINT_GAMECONTROLLERTYPE "SDL_GAMECONTROLLERTYPE"
706
707/**
708 * A variable containing a list of devices to skip when scanning for game
709 * controllers.
710 *
711 * The format of the string is a comma separated list of USB VID/PID pairs in
712 * hexadecimal form, e.g.
713 *
714 * 0xAAAA/0xBBBB,0xCCCC/0xDDDD
715 *
716 * The variable can also take the form of "@file", in which case the named
717 * file will be loaded and interpreted as the value of the variable.
718 *
719 * This hint can be set anytime.
720 *
721 * \since This hint is available since SDL 3.0.0.
722 */
723#define SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES "SDL_GAMECONTROLLER_IGNORE_DEVICES"
724
725/**
726 * If set, all devices will be skipped when scanning for game controllers
727 * except for the ones listed in this variable.
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
735 * file will be loaded and interpreted as the value of the variable.
736 *
737 * This hint can be set anytime.
738 *
739 * \since This hint is available since SDL 3.0.0.
740 */
741#define SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT "SDL_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT"
742
743/**
744 * A variable that controls whether the device's built-in accelerometer and
745 * gyro should be used as sensors for gamepads.
746 *
747 * The variable can be set to the following values:
748 *
749 * - "0": Sensor fusion is disabled
750 * - "1": Sensor fusion is enabled for all controllers that lack sensors
751 *
752 * Or the variable can be a comma separated list of USB VID/PID pairs in
753 * hexadecimal form, e.g.
754 *
755 * 0xAAAA/0xBBBB,0xCCCC/0xDDDD
756 *
757 * The variable can also take the form of "@file", in which case the named
758 * file will be loaded and interpreted as the value of the variable.
759 *
760 * This hint should be set before a gamepad is opened.
761 *
762 * \since This hint is available since SDL 3.0.0.
763 */
764#define SDL_HINT_GAMECONTROLLER_SENSOR_FUSION "SDL_GAMECONTROLLER_SENSOR_FUSION"
765
766/**
767 * This variable sets the default text of the TextInput window on GDK
768 * platforms.
769 *
770 * This hint is available only if SDL_GDK_TEXTINPUT defined.
771 *
772 * This hint should be set before calling SDL_StartTextInput()
773 *
774 * \since This hint is available since SDL 3.0.0.
775 */
776#define SDL_HINT_GDK_TEXTINPUT_DEFAULT_TEXT "SDL_GDK_TEXTINPUT_DEFAULT_TEXT"
777
778/**
779 * This variable sets the description of the TextInput window on GDK
780 * platforms.
781 *
782 * This hint is available only if SDL_GDK_TEXTINPUT defined.
783 *
784 * This hint should be set before calling SDL_StartTextInput()
785 *
786 * \since This hint is available since SDL 3.0.0.
787 */
788#define SDL_HINT_GDK_TEXTINPUT_DESCRIPTION "SDL_GDK_TEXTINPUT_DESCRIPTION"
789
790/**
791 * This variable sets the maximum input length of the TextInput window on GDK
792 * platforms.
793 *
794 * The value must be a stringified integer, for example "10" to allow for up
795 * to 10 characters of text input.
796 *
797 * This hint is available only if SDL_GDK_TEXTINPUT defined.
798 *
799 * This hint should be set before calling SDL_StartTextInput()
800 *
801 * \since This hint is available since SDL 3.0.0.
802 */
803#define SDL_HINT_GDK_TEXTINPUT_MAX_LENGTH "SDL_GDK_TEXTINPUT_MAX_LENGTH"
804
805/**
806 * This variable sets the input scope of the TextInput window on GDK
807 * platforms.
808 *
809 * Set this hint to change the XGameUiTextEntryInputScope value that will be
810 * passed to the window creation function. The value must be a stringified
811 * integer, for example "0" for XGameUiTextEntryInputScope::Default.
812 *
813 * This hint is available only if SDL_GDK_TEXTINPUT defined.
814 *
815 * This hint should be set before calling SDL_StartTextInput()
816 *
817 * \since This hint is available since SDL 3.0.0.
818 */
819#define SDL_HINT_GDK_TEXTINPUT_SCOPE "SDL_GDK_TEXTINPUT_SCOPE"
820
821/**
822 * This variable sets the title of the TextInput window on GDK platforms.
823 *
824 * This hint is available only if SDL_GDK_TEXTINPUT defined.
825 *
826 * This hint should be set before calling SDL_StartTextInput()
827 *
828 * \since This hint is available since SDL 3.0.0.
829 */
830#define SDL_HINT_GDK_TEXTINPUT_TITLE "SDL_GDK_TEXTINPUT_TITLE"
831
832/**
833 * A variable to control whether SDL_hid_enumerate() enumerates all HID
834 * devices or only controllers.
835 *
836 * The variable can be set to the following values:
837 *
838 * - "0": SDL_hid_enumerate() will enumerate all HID devices.
839 * - "1": SDL_hid_enumerate() will only enumerate controllers. (default)
840 *
841 * By default SDL will only enumerate controllers, to reduce risk of hanging
842 * or crashing on devices with bad drivers and avoiding macOS keyboard capture
843 * permission prompts.
844 *
845 * This hint can be set anytime.
846 *
847 * \since This hint is available since SDL 3.0.0.
848 */
849#define SDL_HINT_HIDAPI_ENUMERATE_ONLY_CONTROLLERS "SDL_HIDAPI_ENUMERATE_ONLY_CONTROLLERS"
850
851/**
852 * A variable containing a list of devices to ignore in SDL_hid_enumerate().
853 *
854 * The format of the string is a comma separated list of USB VID/PID pairs in
855 * hexadecimal form, e.g.
856 *
857 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
858 *
859 * For example, to ignore the Shanwan DS3 controller and any Valve controller,
860 * you might use the string "0x2563/0x0523,0x28de/0x0000"
861 *
862 * This hint can be set anytime.
863 *
864 * \since This hint is available since SDL 3.0.0.
865 */
866#define SDL_HINT_HIDAPI_IGNORE_DEVICES "SDL_HIDAPI_IGNORE_DEVICES"
867
868/**
869 * A variable describing what IME UI elements the application can display.
870 *
871 * By default IME UI is handled using native components by the OS where
872 * possible, however this can interfere with or not be visible when exclusive
873 * fullscreen mode is used.
874 *
875 * The variable can be set to a comma separated list containing the following
876 * items:
877 *
878 * - "none" or "0": The application can't render any IME elements, and native
879 * UI should be used. (default)
880 * - "composition": The application handles SDL_EVENT_TEXT_EDITING events and
881 * can render the composition text.
882 * - "candidates": The application handles SDL_EVENT_TEXT_EDITING_CANDIDATES
883 * and can render the candidate list.
884 *
885 * This hint should be set before SDL is initialized.
886 *
887 * \since This hint is available since SDL 3.0.0.
888 */
889#define SDL_HINT_IME_IMPLEMENTED_UI "SDL_IME_IMPLEMENTED_UI"
890
891/**
892 * A variable controlling whether the home indicator bar on iPhone X should be
893 * hidden.
894 *
895 * The variable can be set to the following values:
896 *
897 * - "0": The indicator bar is not hidden. (default for windowed applications)
898 * - "1": The indicator bar is hidden and is shown when the screen is touched
899 * (useful for movie playback applications).
900 * - "2": The indicator bar is dim and the first swipe makes it visible and
901 * the second swipe performs the "home" action. (default for fullscreen
902 * applications)
903 *
904 * This hint can be set anytime.
905 *
906 * \since This hint is available since SDL 3.0.0.
907 */
908#define SDL_HINT_IOS_HIDE_HOME_INDICATOR "SDL_IOS_HIDE_HOME_INDICATOR"
909
910/**
911 * A variable that lets you enable joystick (and gamecontroller) events even
912 * when your app is in the background.
913 *
914 * The variable can be set to the following values:
915 *
916 * - "0": Disable joystick & gamecontroller input events when the application
917 * is in the background. (default)
918 * - "1": Enable joystick & gamecontroller input events when the application
919 * is in the background.
920 *
921 * This hint can be set anytime.
922 *
923 * \since This hint is available since SDL 3.0.0.
924 */
925#define SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS "SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS"
926
927/**
928 * A variable containing a list of arcade stick style controllers.
929 *
930 * The format of the string is a comma separated list of USB VID/PID pairs in
931 * hexadecimal form, e.g.
932 *
933 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
934 *
935 * The variable can also take the form of "@file", in which case the named
936 * file will be loaded and interpreted as the value of the variable.
937 *
938 * This hint can be set anytime.
939 *
940 * \since This hint is available since SDL 3.0.0.
941 */
942#define SDL_HINT_JOYSTICK_ARCADESTICK_DEVICES "SDL_JOYSTICK_ARCADESTICK_DEVICES"
943
944/**
945 * A variable containing a list of devices that are not arcade stick style
946 * controllers.
947 *
948 * This will override SDL_HINT_JOYSTICK_ARCADESTICK_DEVICES and the built in
949 * device list.
950 *
951 * The format of the string is a comma separated list of USB VID/PID pairs in
952 * hexadecimal form, e.g.
953 *
954 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
955 *
956 * The variable can also take the form of "@file", in which case the named
957 * file will be loaded and interpreted as the value of the variable.
958 *
959 * This hint can be set anytime.
960 *
961 * \since This hint is available since SDL 3.0.0.
962 */
963#define SDL_HINT_JOYSTICK_ARCADESTICK_DEVICES_EXCLUDED "SDL_JOYSTICK_ARCADESTICK_DEVICES_EXCLUDED"
964
965/**
966 * A variable containing a list of devices that should not be considered
967 * joysticks.
968 *
969 * The format of the string is a comma separated list of USB VID/PID pairs in
970 * hexadecimal form, e.g.
971 *
972 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
973 *
974 * The variable can also take the form of "@file", in which case the named
975 * file will be loaded and interpreted as the value of the variable.
976 *
977 * This hint can be set anytime.
978 *
979 * \since This hint is available since SDL 3.0.0.
980 */
981#define SDL_HINT_JOYSTICK_BLACKLIST_DEVICES "SDL_JOYSTICK_BLACKLIST_DEVICES"
982
983/**
984 * A variable containing a list of devices that should be considered
985 * joysticks.
986 *
987 * This will override SDL_HINT_JOYSTICK_BLACKLIST_DEVICES and the built in
988 * device list.
989 *
990 * The format of the string is a comma separated list of USB VID/PID pairs in
991 * hexadecimal form, e.g.
992 *
993 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
994 *
995 * The variable can also take the form of "@file", in which case the named
996 * file will be loaded and interpreted as the value of the variable.
997 *
998 * This hint can be set anytime.
999 *
1000 * \since This hint is available since SDL 3.0.0.
1001 */
1002#define SDL_HINT_JOYSTICK_BLACKLIST_DEVICES_EXCLUDED "SDL_JOYSTICK_BLACKLIST_DEVICES_EXCLUDED"
1003
1004/**
1005 * A variable containing a comma separated list of devices to open as
1006 * joysticks.
1007 *
1008 * This variable is currently only used by the Linux joystick driver.
1009 *
1010 * \since This hint is available since SDL 3.0.0.
1011 */
1012#define SDL_HINT_JOYSTICK_DEVICE "SDL_JOYSTICK_DEVICE"
1013
1014/**
1015 * A variable containing a list of flightstick style controllers.
1016 *
1017 * The format of the string is a comma separated list of USB VID/PID pairs in
1018 * hexadecimal form, e.g.
1019 *
1020 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
1021 *
1022 * The variable can also take the form of @file, in which case the named file
1023 * will be loaded and interpreted as the value of the variable.
1024 *
1025 * This hint can be set anytime.
1026 *
1027 * \since This hint is available since SDL 3.0.0.
1028 */
1029#define SDL_HINT_JOYSTICK_FLIGHTSTICK_DEVICES "SDL_JOYSTICK_FLIGHTSTICK_DEVICES"
1030
1031/**
1032 * A variable containing a list of devices that are not flightstick style
1033 * controllers.
1034 *
1035 * This will override SDL_HINT_JOYSTICK_FLIGHTSTICK_DEVICES and the built in
1036 * device list.
1037 *
1038 * The format of the string is a comma separated list of USB VID/PID pairs in
1039 * hexadecimal form, e.g.
1040 *
1041 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
1042 *
1043 * The variable can also take the form of "@file", in which case the named
1044 * file will be loaded and interpreted as the value of the variable.
1045 *
1046 * This hint can be set anytime.
1047 *
1048 * \since This hint is available since SDL 3.0.0.
1049 */
1050#define SDL_HINT_JOYSTICK_FLIGHTSTICK_DEVICES_EXCLUDED "SDL_JOYSTICK_FLIGHTSTICK_DEVICES_EXCLUDED"
1051
1052/**
1053 * A variable containing a list of devices known to have a GameCube form
1054 * factor.
1055 *
1056 * The format of the string is a comma separated list of USB VID/PID pairs in
1057 * hexadecimal form, e.g.
1058 *
1059 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
1060 *
1061 * The variable can also take the form of "@file", in which case the named
1062 * file will be loaded and interpreted as the value of the variable.
1063 *
1064 * This hint can be set anytime.
1065 *
1066 * \since This hint is available since SDL 3.0.0.
1067 */
1068#define SDL_HINT_JOYSTICK_GAMECUBE_DEVICES "SDL_JOYSTICK_GAMECUBE_DEVICES"
1069
1070/**
1071 * A variable containing a list of devices known not to have a GameCube form
1072 * factor.
1073 *
1074 * This will override SDL_HINT_JOYSTICK_GAMECUBE_DEVICES and the built in
1075 * device list.
1076 *
1077 * The format of the string is a comma separated list of USB VID/PID pairs in
1078 * hexadecimal form, e.g.
1079 *
1080 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
1081 *
1082 * The variable can also take the form of "@file", in which case the named
1083 * file will be loaded and interpreted as the value of the variable.
1084 *
1085 * This hint can be set anytime.
1086 *
1087 * \since This hint is available since SDL 3.0.0.
1088 */
1089#define SDL_HINT_JOYSTICK_GAMECUBE_DEVICES_EXCLUDED "SDL_JOYSTICK_GAMECUBE_DEVICES_EXCLUDED"
1090
1091/**
1092 * A variable controlling whether the HIDAPI joystick drivers should be used.
1093 *
1094 * The variable can be set to the following values:
1095 *
1096 * - "0": HIDAPI drivers are not used.
1097 * - "1": HIDAPI drivers are used. (default)
1098 *
1099 * This variable is the default for all drivers, but can be overridden by the
1100 * hints for specific drivers below.
1101 *
1102 * This hint should be set before enumerating controllers.
1103 *
1104 * \since This hint is available since SDL 3.0.0.
1105 */
1106#define SDL_HINT_JOYSTICK_HIDAPI "SDL_JOYSTICK_HIDAPI"
1107
1108/**
1109 * A variable controlling whether Nintendo Switch Joy-Con controllers will be
1110 * combined into a single Pro-like controller when using the HIDAPI driver.
1111 *
1112 * The variable can be set to the following values:
1113 *
1114 * - "0": Left and right Joy-Con controllers will not be combined and each
1115 * will be a mini-gamepad.
1116 * - "1": Left and right Joy-Con controllers will be combined into a single
1117 * controller. (default)
1118 *
1119 * This hint should be set before enumerating controllers.
1120 *
1121 * \since This hint is available since SDL 3.0.0.
1122 */
1123#define SDL_HINT_JOYSTICK_HIDAPI_COMBINE_JOY_CONS "SDL_JOYSTICK_HIDAPI_COMBINE_JOY_CONS"
1124
1125/**
1126 * A variable controlling whether the HIDAPI driver for Nintendo GameCube
1127 * controllers should be used.
1128 *
1129 * The variable can be set to the following values:
1130 *
1131 * - "0": HIDAPI driver is not used.
1132 * - "1": HIDAPI driver is used.
1133 *
1134 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
1135 *
1136 * This hint should be set before enumerating controllers.
1137 *
1138 * \since This hint is available since SDL 3.0.0.
1139 */
1140#define SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE "SDL_JOYSTICK_HIDAPI_GAMECUBE"
1141
1142/**
1143 * A variable controlling whether rumble is used to implement the GameCube
1144 * controller's 3 rumble modes, Stop(0), Rumble(1), and StopHard(2).
1145 *
1146 * This is useful for applications that need full compatibility for things
1147 * like ADSR envelopes. - Stop is implemented by setting low_frequency_rumble
1148 * to 0 and high_frequency_rumble >0 - Rumble is both at any arbitrary value -
1149 * StopHard is implemented by setting both low_frequency_rumble and
1150 * high_frequency_rumble to 0
1151 *
1152 * The variable can be set to the following values:
1153 *
1154 * - "0": Normal rumble behavior is behavior is used. (default)
1155 * - "1": Proper GameCube controller rumble behavior is used.
1156 *
1157 * This hint can be set anytime.
1158 *
1159 * \since This hint is available since SDL 3.0.0.
1160 */
1161#define SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE_RUMBLE_BRAKE "SDL_JOYSTICK_HIDAPI_GAMECUBE_RUMBLE_BRAKE"
1162
1163/**
1164 * A variable controlling whether the HIDAPI driver for Nintendo Switch
1165 * Joy-Cons should be used.
1166 *
1167 * The variable can be set to the following values:
1168 *
1169 * - "0": HIDAPI driver is not used.
1170 * - "1": HIDAPI driver is used.
1171 *
1172 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
1173 *
1174 * This hint should be set before enumerating controllers.
1175 *
1176 * \since This hint is available since SDL 3.0.0.
1177 */
1178#define SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS "SDL_JOYSTICK_HIDAPI_JOY_CONS"
1179
1180/**
1181 * A variable controlling whether the Home button LED should be turned on when
1182 * a Nintendo Switch Joy-Con controller is opened.
1183 *
1184 * The variable can be set to the following values:
1185 *
1186 * - "0": home button LED is turned off
1187 * - "1": home button LED is turned on
1188 *
1189 * By default the Home button LED state is not changed. This hint can also be
1190 * set to a floating point value between 0.0 and 1.0 which controls the
1191 * brightness of the Home button LED.
1192 *
1193 * This hint can be set anytime.
1194 *
1195 * \since This hint is available since SDL 3.0.0.
1196 */
1197#define SDL_HINT_JOYSTICK_HIDAPI_JOYCON_HOME_LED "SDL_JOYSTICK_HIDAPI_JOYCON_HOME_LED"
1198
1199/**
1200 * A variable controlling whether the HIDAPI driver for Amazon Luna
1201 * controllers connected via Bluetooth should be used.
1202 *
1203 * The variable can be set to the following values:
1204 *
1205 * - "0": HIDAPI driver is not used.
1206 * - "1": HIDAPI driver is used.
1207 *
1208 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
1209 *
1210 * This hint should be set before enumerating controllers.
1211 *
1212 * \since This hint is available since SDL 3.0.0.
1213 */
1214#define SDL_HINT_JOYSTICK_HIDAPI_LUNA "SDL_JOYSTICK_HIDAPI_LUNA"
1215
1216/**
1217 * A variable controlling whether the HIDAPI driver for Nintendo Online
1218 * classic controllers should be used.
1219 *
1220 * The variable can be set to the following values:
1221 *
1222 * - "0": HIDAPI driver is not used.
1223 * - "1": HIDAPI driver is used.
1224 *
1225 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
1226 *
1227 * This hint should be set before enumerating controllers.
1228 *
1229 * \since This hint is available since SDL 3.0.0.
1230 */
1231#define SDL_HINT_JOYSTICK_HIDAPI_NINTENDO_CLASSIC "SDL_JOYSTICK_HIDAPI_NINTENDO_CLASSIC"
1232
1233/**
1234 * A variable controlling whether the HIDAPI driver for PS3 controllers should
1235 * be used.
1236 *
1237 * The variable can be set to the following values:
1238 *
1239 * - "0": HIDAPI driver is not used.
1240 * - "1": HIDAPI driver is used.
1241 *
1242 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI on macOS, and "0" on
1243 * other platforms.
1244 *
1245 * For official Sony driver (sixaxis.sys) use
1246 * SDL_HINT_JOYSTICK_HIDAPI_PS3_SIXAXIS_DRIVER. See
1247 * https://github.com/ViGEm/DsHidMini for an alternative driver on Windows.
1248 *
1249 * This hint should be set before enumerating controllers.
1250 *
1251 * \since This hint is available since SDL 3.0.0.
1252 */
1253#define SDL_HINT_JOYSTICK_HIDAPI_PS3 "SDL_JOYSTICK_HIDAPI_PS3"
1254
1255/**
1256 * A variable controlling whether the Sony driver (sixaxis.sys) for PS3
1257 * controllers (Sixaxis/DualShock 3) should be used.
1258 *
1259 * The variable can be set to the following values:
1260 *
1261 * - "0": Sony driver (sixaxis.sys) is not used.
1262 * - "1": Sony driver (sixaxis.sys) is used.
1263 *
1264 * The default value is 0.
1265 *
1266 * This hint should be set before enumerating controllers.
1267 *
1268 * \since This hint is available since SDL 3.0.0.
1269 */
1270#define SDL_HINT_JOYSTICK_HIDAPI_PS3_SIXAXIS_DRIVER "SDL_JOYSTICK_HIDAPI_PS3_SIXAXIS_DRIVER"
1271
1272/**
1273 * A variable controlling whether the HIDAPI driver for PS4 controllers should
1274 * be used.
1275 *
1276 * The variable can be set to the following values:
1277 *
1278 * - "0": HIDAPI driver is not used.
1279 * - "1": HIDAPI driver is used.
1280 *
1281 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
1282 *
1283 * This hint should be set before enumerating controllers.
1284 *
1285 * \since This hint is available since SDL 3.0.0.
1286 */
1287#define SDL_HINT_JOYSTICK_HIDAPI_PS4 "SDL_JOYSTICK_HIDAPI_PS4"
1288
1289/**
1290 * A variable controlling the update rate of the PS4 controller over Bluetooth
1291 * when using the HIDAPI driver.
1292 *
1293 * This defaults to 4 ms, to match the behavior over USB, and to be more
1294 * friendly to other Bluetooth devices and older Bluetooth hardware on the
1295 * computer. It can be set to "1" (1000Hz), "2" (500Hz) and "4" (250Hz)
1296 *
1297 * This hint can be set anytime, but only takes effect when extended input
1298 * reports are enabled.
1299 *
1300 * \since This hint is available since SDL 3.0.0.
1301 */
1302#define SDL_HINT_JOYSTICK_HIDAPI_PS4_REPORT_INTERVAL "SDL_JOYSTICK_HIDAPI_PS4_REPORT_INTERVAL"
1303
1304/**
1305 * A variable controlling whether extended input reports should be used for
1306 * PS4 controllers when using the HIDAPI driver.
1307 *
1308 * The variable can be set to the following values:
1309 *
1310 * - "0": extended reports are not enabled. (default)
1311 * - "1": extended reports are enabled.
1312 *
1313 * Extended input reports allow rumble on Bluetooth PS4 controllers, but break
1314 * DirectInput handling for applications that don't use SDL.
1315 *
1316 * Once extended reports are enabled, they can not be disabled without power
1317 * cycling the controller.
1318 *
1319 * For compatibility with applications written for versions of SDL prior to
1320 * the introduction of PS5 controller support, this value will also control
1321 * the state of extended reports on PS5 controllers when the
1322 * SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE hint is not explicitly set.
1323 *
1324 * This hint can be enabled anytime.
1325 *
1326 * \since This hint is available since SDL 3.0.0.
1327 */
1328#define SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE "SDL_JOYSTICK_HIDAPI_PS4_RUMBLE"
1329
1330/**
1331 * A variable controlling whether the HIDAPI driver for PS5 controllers should
1332 * be used.
1333 *
1334 * The variable can be set to the following values:
1335 *
1336 * - "0": HIDAPI driver is not used.
1337 * - "1": HIDAPI driver is used.
1338 *
1339 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
1340 *
1341 * This hint should be set before enumerating controllers.
1342 *
1343 * \since This hint is available since SDL 3.0.0.
1344 */
1345#define SDL_HINT_JOYSTICK_HIDAPI_PS5 "SDL_JOYSTICK_HIDAPI_PS5"
1346
1347/**
1348 * A variable controlling whether the player LEDs should be lit to indicate
1349 * which player is associated with a PS5 controller.
1350 *
1351 * The variable can be set to the following values:
1352 *
1353 * - "0": player LEDs are not enabled.
1354 * - "1": player LEDs are enabled. (default)
1355 *
1356 * \since This hint is available since SDL 3.0.0.
1357 */
1358#define SDL_HINT_JOYSTICK_HIDAPI_PS5_PLAYER_LED "SDL_JOYSTICK_HIDAPI_PS5_PLAYER_LED"
1359
1360/**
1361 * A variable controlling whether extended input reports should be used for
1362 * PS5 controllers when using the HIDAPI driver.
1363 *
1364 * The variable can be set to the following values:
1365 *
1366 * - "0": extended reports are not enabled. (default)
1367 * - "1": extended reports.
1368 *
1369 * Extended input reports allow rumble on Bluetooth PS5 controllers, but break
1370 * DirectInput handling for applications that don't use SDL.
1371 *
1372 * Once extended reports are enabled, they can not be disabled without power
1373 * cycling the controller.
1374 *
1375 * For compatibility with applications written for versions of SDL prior to
1376 * the introduction of PS5 controller support, this value defaults to the
1377 * value of SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE.
1378 *
1379 * This hint can be enabled anytime.
1380 *
1381 * \since This hint is available since SDL 3.0.0.
1382 */
1383#define SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE "SDL_JOYSTICK_HIDAPI_PS5_RUMBLE"
1384
1385/**
1386 * A variable controlling whether the HIDAPI driver for NVIDIA SHIELD
1387 * controllers should be used.
1388 *
1389 * The variable can be set to the following values:
1390 *
1391 * - "0": HIDAPI driver is not used.
1392 * - "1": HIDAPI driver is used.
1393 *
1394 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
1395 *
1396 * This hint should be set before enumerating controllers.
1397 *
1398 * \since This hint is available since SDL 3.0.0.
1399 */
1400#define SDL_HINT_JOYSTICK_HIDAPI_SHIELD "SDL_JOYSTICK_HIDAPI_SHIELD"
1401
1402/**
1403 * A variable controlling whether the HIDAPI driver for Google Stadia
1404 * controllers should be used.
1405 *
1406 * The variable can be set to the following values:
1407 *
1408 * - "0": HIDAPI driver is not used.
1409 * - "1": HIDAPI driver is used.
1410 *
1411 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
1412 *
1413 * \since This hint is available since SDL 3.0.0.
1414 */
1415#define SDL_HINT_JOYSTICK_HIDAPI_STADIA "SDL_JOYSTICK_HIDAPI_STADIA"
1416
1417/**
1418 * A variable controlling whether the HIDAPI driver for Bluetooth Steam
1419 * Controllers should be used.
1420 *
1421 * The variable can be set to the following values:
1422 *
1423 * - "0": HIDAPI driver is not used. (default)
1424 * - "1": HIDAPI driver is used for Steam Controllers, which requires
1425 * Bluetooth access and may prompt the user for permission on iOS and
1426 * Android.
1427 *
1428 * This hint should be set before enumerating controllers.
1429 *
1430 * \since This hint is available since SDL 3.0.0.
1431 */
1432#define SDL_HINT_JOYSTICK_HIDAPI_STEAM "SDL_JOYSTICK_HIDAPI_STEAM"
1433
1434/**
1435 * A variable controlling whether the HIDAPI driver for the Steam Deck builtin
1436 * controller should be used.
1437 *
1438 * The variable can be set to the following values:
1439 *
1440 * - "0": HIDAPI driver is not used.
1441 * - "1": HIDAPI driver is used.
1442 *
1443 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
1444 *
1445 * This hint should be set before enumerating controllers.
1446 *
1447 * \since This hint is available since SDL 3.0.0.
1448 */
1449#define SDL_HINT_JOYSTICK_HIDAPI_STEAMDECK "SDL_JOYSTICK_HIDAPI_STEAMDECK"
1450
1451/**
1452 * A variable controlling whether the HIDAPI driver for Nintendo Switch
1453 * controllers should be used.
1454 *
1455 * The variable can be set to the following values:
1456 *
1457 * - "0": HIDAPI driver is not used.
1458 * - "1": HIDAPI driver is used.
1459 *
1460 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
1461 *
1462 * This hint should be set before enumerating controllers.
1463 *
1464 * \since This hint is available since SDL 3.0.0.
1465 */
1466#define SDL_HINT_JOYSTICK_HIDAPI_SWITCH "SDL_JOYSTICK_HIDAPI_SWITCH"
1467
1468/**
1469 * A variable controlling whether the Home button LED should be turned on when
1470 * a Nintendo Switch Pro controller is opened.
1471 *
1472 * The variable can be set to the following values:
1473 *
1474 * - "0": Home button LED is turned off.
1475 * - "1": Home button LED is turned on.
1476 *
1477 * By default the Home button LED state is not changed. This hint can also be
1478 * set to a floating point value between 0.0 and 1.0 which controls the
1479 * brightness of the Home button LED.
1480 *
1481 * This hint can be set anytime.
1482 *
1483 * \since This hint is available since SDL 3.0.0.
1484 */
1485#define SDL_HINT_JOYSTICK_HIDAPI_SWITCH_HOME_LED "SDL_JOYSTICK_HIDAPI_SWITCH_HOME_LED"
1486
1487/**
1488 * A variable controlling whether the player LEDs should be lit to indicate
1489 * which player is associated with a Nintendo Switch controller.
1490 *
1491 * The variable can be set to the following values:
1492 *
1493 * - "0": Player LEDs are not enabled.
1494 * - "1": Player LEDs are enabled. (default)
1495 *
1496 * This hint can be set anytime.
1497 *
1498 * \since This hint is available since SDL 3.0.0.
1499 */
1500#define SDL_HINT_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED "SDL_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED"
1501
1502/**
1503 * A variable controlling whether Nintendo Switch Joy-Con controllers will be
1504 * in vertical mode when using the HIDAPI driver.
1505 *
1506 * The variable can be set to the following values:
1507 *
1508 * - "0": Left and right Joy-Con controllers will not be in vertical mode.
1509 * (default)
1510 * - "1": Left and right Joy-Con controllers will be in vertical mode.
1511 *
1512 * This hint should be set before opening a Joy-Con controller.
1513 *
1514 * \since This hint is available since SDL 3.0.0.
1515 */
1516#define SDL_HINT_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS "SDL_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS"
1517
1518/**
1519 * A variable controlling whether the HIDAPI driver for Nintendo Wii and Wii U
1520 * controllers should be used.
1521 *
1522 * The variable can be set to the following values:
1523 *
1524 * - "0": HIDAPI driver is not used.
1525 * - "1": HIDAPI driver is used.
1526 *
1527 * This driver doesn't work with the dolphinbar, so the default is SDL_FALSE
1528 * for now.
1529 *
1530 * This hint should be set before enumerating controllers.
1531 *
1532 * \since This hint is available since SDL 3.0.0.
1533 */
1534#define SDL_HINT_JOYSTICK_HIDAPI_WII "SDL_JOYSTICK_HIDAPI_WII"
1535
1536/**
1537 * A variable controlling whether the player LEDs should be lit to indicate
1538 * which player is associated with a Wii controller.
1539 *
1540 * The variable can be set to the following values:
1541 *
1542 * - "0": Player LEDs are not enabled.
1543 * - "1": Player LEDs are enabled. (default)
1544 *
1545 * This hint can be set anytime.
1546 *
1547 * \since This hint is available since SDL 3.0.0.
1548 */
1549#define SDL_HINT_JOYSTICK_HIDAPI_WII_PLAYER_LED "SDL_JOYSTICK_HIDAPI_WII_PLAYER_LED"
1550
1551/**
1552 * A variable controlling whether the HIDAPI driver for XBox controllers
1553 * should be used.
1554 *
1555 * The variable can be set to the following values:
1556 *
1557 * - "0": HIDAPI driver is not used.
1558 * - "1": HIDAPI driver is used.
1559 *
1560 * The default is "0" on Windows, otherwise the value of
1561 * SDL_HINT_JOYSTICK_HIDAPI
1562 *
1563 * This hint should be set before enumerating controllers.
1564 *
1565 * \since This hint is available since SDL 3.0.0.
1566 */
1567#define SDL_HINT_JOYSTICK_HIDAPI_XBOX "SDL_JOYSTICK_HIDAPI_XBOX"
1568
1569/**
1570 * A variable controlling whether the HIDAPI driver for XBox 360 controllers
1571 * should be used.
1572 *
1573 * The variable can be set to the following values:
1574 *
1575 * - "0": HIDAPI driver is not used.
1576 * - "1": HIDAPI driver is used.
1577 *
1578 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI_XBOX
1579 *
1580 * This hint should be set before enumerating controllers.
1581 *
1582 * \since This hint is available since SDL 3.0.0.
1583 */
1584#define SDL_HINT_JOYSTICK_HIDAPI_XBOX_360 "SDL_JOYSTICK_HIDAPI_XBOX_360"
1585
1586/**
1587 * A variable controlling whether the player LEDs should be lit to indicate
1588 * which player is associated with an Xbox 360 controller.
1589 *
1590 * The variable can be set to the following values:
1591 *
1592 * - "0": Player LEDs are not enabled.
1593 * - "1": Player LEDs are enabled. (default)
1594 *
1595 * This hint can be set anytime.
1596 *
1597 * \since This hint is available since SDL 3.0.0.
1598 */
1599#define SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED "SDL_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED"
1600
1601/**
1602 * A variable controlling whether the HIDAPI driver for XBox 360 wireless
1603 * controllers should be used.
1604 *
1605 * The variable can be set to the following values:
1606 *
1607 * - "0": HIDAPI driver is not used.
1608 * - "1": HIDAPI driver is used.
1609 *
1610 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI_XBOX_360
1611 *
1612 * This hint should be set before enumerating controllers.
1613 *
1614 * \since This hint is available since SDL 3.0.0.
1615 */
1616#define SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_WIRELESS "SDL_JOYSTICK_HIDAPI_XBOX_360_WIRELESS"
1617
1618/**
1619 * A variable controlling whether the HIDAPI driver for XBox One controllers
1620 * should be used.
1621 *
1622 * The variable can be set to the following values:
1623 *
1624 * - "0": HIDAPI driver is not used.
1625 * - "1": HIDAPI driver is used.
1626 *
1627 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI_XBOX.
1628 *
1629 * This hint should be set before enumerating controllers.
1630 *
1631 * \since This hint is available since SDL 3.0.0.
1632 */
1633#define SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE "SDL_JOYSTICK_HIDAPI_XBOX_ONE"
1634
1635/**
1636 * A variable controlling whether the Home button LED should be turned on when
1637 * an Xbox One controller is opened.
1638 *
1639 * The variable can be set to the following values:
1640 *
1641 * - "0": Home button LED is turned off.
1642 * - "1": Home button LED is turned on.
1643 *
1644 * By default the Home button LED state is not changed. This hint can also be
1645 * set to a floating point value between 0.0 and 1.0 which controls the
1646 * brightness of the Home button LED. The default brightness is 0.4.
1647 *
1648 * This hint can be set anytime.
1649 *
1650 * \since This hint is available since SDL 3.0.0.
1651 */
1652#define SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED "SDL_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED"
1653
1654/**
1655 * A variable controlling whether IOKit should be used for controller
1656 * handling.
1657 *
1658 * The variable can be set to the following values:
1659 *
1660 * - "0": IOKit is not used.
1661 * - "1": IOKit is used. (default)
1662 *
1663 * This hint should be set before SDL is initialized.
1664 *
1665 * \since This hint is available since SDL 3.0.0.
1666 */
1667#define SDL_HINT_JOYSTICK_IOKIT "SDL_JOYSTICK_IOKIT"
1668
1669/**
1670 * A variable controlling whether to use the classic /dev/input/js* joystick
1671 * interface or the newer /dev/input/event* joystick interface on Linux.
1672 *
1673 * The variable can be set to the following values:
1674 *
1675 * - "0": Use /dev/input/event* (default)
1676 * - "1": Use /dev/input/js*
1677 *
1678 * This hint should be set before SDL is initialized.
1679 *
1680 * \since This hint is available since SDL 3.0.0.
1681 */
1682#define SDL_HINT_JOYSTICK_LINUX_CLASSIC "SDL_JOYSTICK_LINUX_CLASSIC"
1683
1684/**
1685 * A variable controlling whether joysticks on Linux adhere to their
1686 * HID-defined deadzones or return unfiltered values.
1687 *
1688 * The variable can be set to the following values:
1689 *
1690 * - "0": Return unfiltered joystick axis values. (default)
1691 * - "1": Return axis values with deadzones taken into account.
1692 *
1693 * This hint should be set before a controller is opened.
1694 *
1695 * \since This hint is available since SDL 3.0.0.
1696 */
1697#define SDL_HINT_JOYSTICK_LINUX_DEADZONES "SDL_JOYSTICK_LINUX_DEADZONES"
1698
1699/**
1700 * A variable controlling whether joysticks on Linux will always treat 'hat'
1701 * axis inputs (ABS_HAT0X - ABS_HAT3Y) as 8-way digital hats without checking
1702 * whether they may be analog.
1703 *
1704 * The variable can be set to the following values:
1705 *
1706 * - "0": Only map hat axis inputs to digital hat outputs if the input axes
1707 * appear to actually be digital. (default)
1708 * - "1": Always handle the input axes numbered ABS_HAT0X to ABS_HAT3Y as
1709 * digital hats.
1710 *
1711 * This hint should be set before a controller is opened.
1712 *
1713 * \since This hint is available since SDL 3.0.0.
1714 */
1715#define SDL_HINT_JOYSTICK_LINUX_DIGITAL_HATS "SDL_JOYSTICK_LINUX_DIGITAL_HATS"
1716
1717/**
1718 * A variable controlling whether digital hats on Linux will apply deadzones
1719 * to their underlying input axes or use unfiltered values.
1720 *
1721 * The variable can be set to the following values:
1722 *
1723 * - "0": Return digital hat values based on unfiltered input axis values.
1724 * - "1": Return digital hat values with deadzones on the input axes taken
1725 * into account. (default)
1726 *
1727 * This hint should be set before a controller is opened.
1728 *
1729 * \since This hint is available since SDL 3.0.0.
1730 */
1731#define SDL_HINT_JOYSTICK_LINUX_HAT_DEADZONES "SDL_JOYSTICK_LINUX_HAT_DEADZONES"
1732
1733/**
1734 * A variable controlling whether GCController should be used for controller
1735 * handling.
1736 *
1737 * The variable can be set to the following values:
1738 *
1739 * - "0": GCController is not used.
1740 * - "1": GCController is used. (default)
1741 *
1742 * This hint should be set before SDL is initialized.
1743 *
1744 * \since This hint is available since SDL 3.0.0.
1745 */
1746#define SDL_HINT_JOYSTICK_MFI "SDL_JOYSTICK_MFI"
1747
1748/**
1749 * A variable controlling whether the RAWINPUT joystick drivers should be used
1750 * for better handling XInput-capable devices.
1751 *
1752 * The variable can be set to the following values:
1753 *
1754 * - "0": RAWINPUT drivers are not used.
1755 * - "1": RAWINPUT drivers are used. (default)
1756 *
1757 * This hint should be set before SDL is initialized.
1758 *
1759 * \since This hint is available since SDL 3.0.0.
1760 */
1761#define SDL_HINT_JOYSTICK_RAWINPUT "SDL_JOYSTICK_RAWINPUT"
1762
1763/**
1764 * A variable controlling whether the RAWINPUT driver should pull correlated
1765 * data from XInput.
1766 *
1767 * The variable can be set to the following values:
1768 *
1769 * - "0": RAWINPUT driver will only use data from raw input APIs.
1770 * - "1": RAWINPUT driver will also pull data from XInput and
1771 * Windows.Gaming.Input, providing better trigger axes, guide button
1772 * presses, and rumble support for Xbox controllers. (default)
1773 *
1774 * This hint should be set before a gamepad is opened.
1775 *
1776 * \since This hint is available since SDL 3.0.0.
1777 */
1778#define SDL_HINT_JOYSTICK_RAWINPUT_CORRELATE_XINPUT "SDL_JOYSTICK_RAWINPUT_CORRELATE_XINPUT"
1779
1780/**
1781 * A variable controlling whether the ROG Chakram mice should show up as
1782 * joysticks.
1783 *
1784 * The variable can be set to the following values:
1785 *
1786 * - "0": ROG Chakram mice do not show up as joysticks. (default)
1787 * - "1": ROG Chakram mice show up as joysticks.
1788 *
1789 * This hint should be set before SDL is initialized.
1790 *
1791 * \since This hint is available since SDL 3.0.0.
1792 */
1793#define SDL_HINT_JOYSTICK_ROG_CHAKRAM "SDL_JOYSTICK_ROG_CHAKRAM"
1794
1795/**
1796 * A variable controlling whether a separate thread should be used for
1797 * handling joystick detection and raw input messages on Windows.
1798 *
1799 * The variable can be set to the following values:
1800 *
1801 * - "0": A separate thread is not used. (default)
1802 * - "1": A separate thread is used for handling raw input messages.
1803 *
1804 * This hint should be set before SDL is initialized.
1805 *
1806 * \since This hint is available since SDL 3.0.0.
1807 */
1808#define SDL_HINT_JOYSTICK_THREAD "SDL_JOYSTICK_THREAD"
1809
1810/**
1811 * A variable containing a list of throttle style controllers.
1812 *
1813 * The format of the string is a comma separated list of USB VID/PID pairs in
1814 * hexadecimal form, e.g.
1815 *
1816 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
1817 *
1818 * The variable can also take the form of "@file", in which case the named
1819 * file will be loaded and interpreted as the value of the variable.
1820 *
1821 * This hint can be set anytime.
1822 *
1823 * \since This hint is available since SDL 3.0.0.
1824 */
1825#define SDL_HINT_JOYSTICK_THROTTLE_DEVICES "SDL_JOYSTICK_THROTTLE_DEVICES"
1826
1827/**
1828 * A variable containing a list of devices that are not throttle style
1829 * controllers.
1830 *
1831 * This will override SDL_HINT_JOYSTICK_THROTTLE_DEVICES and the built in
1832 * device list.
1833 *
1834 * The format of the string is a comma separated list of USB VID/PID pairs in
1835 * hexadecimal form, e.g.
1836 *
1837 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
1838 *
1839 * The variable can also take the form of "@file", in which case the named
1840 * file will be loaded and interpreted as the value of the variable.
1841 *
1842 * This hint can be set anytime.
1843 *
1844 * \since This hint is available since SDL 3.0.0.
1845 */
1846#define SDL_HINT_JOYSTICK_THROTTLE_DEVICES_EXCLUDED "SDL_JOYSTICK_THROTTLE_DEVICES_EXCLUDED"
1847
1848/**
1849 * A variable controlling whether Windows.Gaming.Input should be used for
1850 * controller handling.
1851 *
1852 * The variable can be set to the following values:
1853 *
1854 * - "0": WGI is not used.
1855 * - "1": WGI is used. (default)
1856 *
1857 * This hint should be set before SDL is initialized.
1858 *
1859 * \since This hint is available since SDL 3.0.0.
1860 */
1861#define SDL_HINT_JOYSTICK_WGI "SDL_JOYSTICK_WGI"
1862
1863/**
1864 * A variable containing a list of wheel style controllers.
1865 *
1866 * The format of the string is a comma separated list of USB VID/PID pairs in
1867 * hexadecimal form, e.g.
1868 *
1869 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
1870 *
1871 * The variable can also take the form of "@file", in which case the named
1872 * file will be loaded and interpreted as the value of the variable.
1873 *
1874 * This hint can be set anytime.
1875 *
1876 * \since This hint is available since SDL 3.0.0.
1877 */
1878#define SDL_HINT_JOYSTICK_WHEEL_DEVICES "SDL_JOYSTICK_WHEEL_DEVICES"
1879
1880/**
1881 * A variable containing a list of devices that are not wheel style
1882 * controllers.
1883 *
1884 * This will override SDL_HINT_JOYSTICK_WHEEL_DEVICES and the built in device
1885 * list.
1886 *
1887 * The format of the string is a comma separated list of USB VID/PID pairs in
1888 * hexadecimal form, e.g.
1889 *
1890 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
1891 *
1892 * The variable can also take the form of "@file", in which case the named
1893 * file will be loaded and interpreted as the value of the variable.
1894 *
1895 * This hint can be set anytime.
1896 *
1897 * \since This hint is available since SDL 3.0.0.
1898 */
1899#define SDL_HINT_JOYSTICK_WHEEL_DEVICES_EXCLUDED "SDL_JOYSTICK_WHEEL_DEVICES_EXCLUDED"
1900
1901/**
1902 * A variable containing a list of devices known to have all axes centered at
1903 * zero.
1904 *
1905 * The format of the string is a comma separated list of USB VID/PID pairs in
1906 * hexadecimal form, e.g.
1907 *
1908 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
1909 *
1910 * The variable can also take the form of "@file", in which case the named
1911 * file will be loaded and interpreted as the value of the variable.
1912 *
1913 * This hint should be set before a controller is opened.
1914 *
1915 * \since This hint is available since SDL 3.0.0.
1916 */
1917#define SDL_HINT_JOYSTICK_ZERO_CENTERED_DEVICES "SDL_JOYSTICK_ZERO_CENTERED_DEVICES"
1918
1919/**
1920 * A variable that controls keycode representation in keyboard events.
1921 *
1922 * This variable is a comma separated set of options for translating keycodes
1923 * in events:
1924 *
1925 * - "none": Keycode options are cleared, this overrides other options.
1926 * - "hide_numpad": The numpad keysyms will be translated into their
1927 * non-numpad versions based on the current NumLock state. For example,
1928 * SDLK_KP_4 would become SDLK_4 if SDL_KMOD_NUM is set in the event
1929 * modifiers, and SDLK_LEFT if it is unset.
1930 * - "french_numbers": The number row on French keyboards is inverted, so
1931 * pressing the 1 key would yield the keycode SDLK_1, or '1', instead of
1932 * SDLK_AMPERSAND, or '&'
1933 * - "latin_letters": For keyboards using non-Latin letters, such as Russian
1934 * or Thai, the letter keys generate keycodes as though it had an en_US
1935 * layout. e.g. pressing the key associated with SDL_SCANCODE_A on a Russian
1936 * keyboard would yield 'a' instead of 'Ñ„'.
1937 *
1938 * The default value for this hint is "french_numbers"
1939 *
1940 * Some platforms like Emscripten only provide modified keycodes and the
1941 * options are not used.
1942 *
1943 * These options do not affect the return value of SDL_GetKeyFromScancode() or
1944 * SDL_GetScancodeFromKey(), they just apply to the keycode included in key
1945 * events.
1946 *
1947 * This hint can be set anytime.
1948 *
1949 * \since This hint is available since SDL 3.0.0.
1950 */
1951#define SDL_HINT_KEYCODE_OPTIONS "SDL_KEYCODE_OPTIONS"
1952
1953/**
1954 * A variable that controls what KMSDRM device to use.
1955 *
1956 * SDL might open something like "/dev/dri/cardNN" to access KMSDRM
1957 * functionality, where "NN" is a device index number. SDL makes a guess at
1958 * the best index to use (usually zero), but the app or user can set this hint
1959 * to a number between 0 and 99 to force selection.
1960 *
1961 * This hint should be set before SDL is initialized.
1962 *
1963 * \since This hint is available since SDL 3.0.0.
1964 */
1965#define SDL_HINT_KMSDRM_DEVICE_INDEX "SDL_KMSDRM_DEVICE_INDEX"
1966
1967/**
1968 * A variable that controls whether SDL requires DRM master access in order to
1969 * initialize the KMSDRM video backend.
1970 *
1971 * The DRM subsystem has a concept of a "DRM master" which is a DRM client
1972 * that has the ability to set planes, set cursor, etc. When SDL is DRM
1973 * master, it can draw to the screen using the SDL rendering APIs. Without DRM
1974 * master, SDL is still able to process input and query attributes of attached
1975 * displays, but it cannot change display state or draw to the screen
1976 * directly.
1977 *
1978 * In some cases, it can be useful to have the KMSDRM backend even if it
1979 * cannot be used for rendering. An app may want to use SDL for input
1980 * processing while using another rendering API (such as an MMAL overlay on
1981 * Raspberry Pi) or using its own code to render to DRM overlays that SDL
1982 * doesn't support.
1983 *
1984 * The variable can be set to the following values:
1985 *
1986 * - "0": SDL will allow usage of the KMSDRM backend without DRM master.
1987 * - "1": SDL Will require DRM master to use the KMSDRM backend. (default)
1988 *
1989 * This hint should be set before SDL is initialized.
1990 *
1991 * \since This hint is available since SDL 3.0.0.
1992 */
1993#define SDL_HINT_KMSDRM_REQUIRE_DRM_MASTER "SDL_KMSDRM_REQUIRE_DRM_MASTER"
1994
1995/**
1996 * A variable controlling the default SDL log levels.
1997 *
1998 * This variable is a comma separated set of category=level tokens that define
1999 * the default logging levels for SDL applications.
2000 *
2001 * The category can be a numeric category, one of "app", "error", "assert",
2002 * "system", "audio", "video", "render", "input", "test", or `*` for any
2003 * unspecified category.
2004 *
2005 * The level can be a numeric level, one of "verbose", "debug", "info",
2006 * "warn", "error", "critical", or "quiet" to disable that category.
2007 *
2008 * You can omit the category if you want to set the logging level for all
2009 * categories.
2010 *
2011 * If this hint isn't set, the default log levels are equivalent to:
2012 *
2013 * `app=info,assert=warn,test=verbose,*=error`
2014 *
2015 * This hint can be set anytime.
2016 *
2017 * \since This hint is available since SDL 3.0.0.
2018 */
2019#define SDL_HINT_LOGGING "SDL_LOGGING"
2020
2021/**
2022 * A variable controlling whether to force the application to become the
2023 * foreground process when launched on macOS.
2024 *
2025 * The variable can be set to the following values:
2026 *
2027 * - "0": The application is brought to the foreground when launched.
2028 * (default)
2029 * - "1": The application may remain in the background when launched.
2030 *
2031 * This hint should be set before applicationDidFinishLaunching() is called.
2032 *
2033 * \since This hint is available since SDL 3.0.0.
2034 */
2035#define SDL_HINT_MAC_BACKGROUND_APP "SDL_MAC_BACKGROUND_APP"
2036
2037/**
2038 * A variable that determines whether Ctrl+Click should generate a right-click
2039 * event on macOS.
2040 *
2041 * The variable can be set to the following values:
2042 *
2043 * - "0": Ctrl+Click does not generate a right mouse button click event.
2044 * (default)
2045 * - "1": Ctrl+Click generated a right mouse button click event.
2046 *
2047 * This hint can be set anytime.
2048 *
2049 * \since This hint is available since SDL 3.0.0.
2050 */
2051#define SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK "SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK"
2052
2053/**
2054 * A variable controlling whether dispatching OpenGL context updates should
2055 * block the dispatching thread until the main thread finishes processing on
2056 * macOS.
2057 *
2058 * The variable can be set to the following values:
2059 *
2060 * - "0": Dispatching OpenGL context updates will block the dispatching thread
2061 * until the main thread finishes processing. (default)
2062 * - "1": Dispatching OpenGL context updates will allow the dispatching thread
2063 * to continue execution.
2064 *
2065 * Generally you want the default, but if you have OpenGL code in a background
2066 * thread on a Mac, and the main thread hangs because it's waiting for that
2067 * background thread, but that background thread is also hanging because it's
2068 * waiting for the main thread to do an update, this might fix your issue.
2069 *
2070 * This hint can be set anytime.
2071 *
2072 * \since This hint is available since SDL 3.0.0.
2073 */
2074#define SDL_HINT_MAC_OPENGL_ASYNC_DISPATCH "SDL_MAC_OPENGL_ASYNC_DISPATCH"
2075
2076/**
2077 * Request SDL_AppIterate() be called at a specific rate.
2078 *
2079 * This number is in Hz, so "60" means try to iterate 60 times per second.
2080 *
2081 * On some platforms, or if you are using SDL_main instead of SDL_AppIterate,
2082 * this hint is ignored. When the hint can be used, it is allowed to be
2083 * changed at any time.
2084 *
2085 * This defaults to 60, and specifying NULL for the hint's value will restore
2086 * the default.
2087 *
2088 * This hint can be set anytime.
2089 *
2090 * \since This hint is available since SDL 3.0.0.
2091 */
2092#define SDL_HINT_MAIN_CALLBACK_RATE "SDL_MAIN_CALLBACK_RATE"
2093
2094/**
2095 * A variable controlling whether the mouse is captured while mouse buttons
2096 * are pressed.
2097 *
2098 * The variable can be set to the following values:
2099 *
2100 * - "0": The mouse is not captured while mouse buttons are pressed.
2101 * - "1": The mouse is captured while mouse buttons are pressed.
2102 *
2103 * By default the mouse is captured while mouse buttons are pressed so if the
2104 * mouse is dragged outside the window, the application continues to receive
2105 * mouse events until the button is released.
2106 *
2107 * This hint can be set anytime.
2108 *
2109 * \since This hint is available since SDL 3.0.0.
2110 */
2111#define SDL_HINT_MOUSE_AUTO_CAPTURE "SDL_MOUSE_AUTO_CAPTURE"
2112
2113/**
2114 * A variable setting the double click radius, in pixels.
2115 *
2116 * This hint can be set anytime.
2117 *
2118 * \since This hint is available since SDL 3.0.0.
2119 */
2120#define SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS "SDL_MOUSE_DOUBLE_CLICK_RADIUS"
2121
2122/**
2123 * A variable setting the double click time, in milliseconds.
2124 *
2125 * This hint can be set anytime.
2126 *
2127 * \since This hint is available since SDL 3.0.0.
2128 */
2129#define SDL_HINT_MOUSE_DOUBLE_CLICK_TIME "SDL_MOUSE_DOUBLE_CLICK_TIME"
2130
2131/**
2132 * A variable controlling whether warping a hidden mouse cursor will activate
2133 * relative mouse mode.
2134 *
2135 * When this hint is set and the mouse cursor is hidden, SDL will emulate
2136 * mouse warps using relative mouse mode. This can provide smoother and more
2137 * reliable mouse motion for some older games, which continuously calculate
2138 * the distance travelled by the mouse pointer and warp it back to the center
2139 * of the window, rather than using relative mouse motion.
2140 *
2141 * Note that relative mouse mode may have different mouse acceleration
2142 * behavior than pointer warps.
2143 *
2144 * If your game or application needs to warp the mouse cursor while hidden for
2145 * other purposes, such as drawing a software cursor, it should disable this
2146 * hint.
2147 *
2148 * The variable can be set to the following values:
2149 *
2150 * - "0": Attempts to warp the mouse will always be made.
2151 * - "1": Some mouse warps will be emulated by forcing relative mouse mode.
2152 * (default)
2153 *
2154 * If not set, this is automatically enabled unless an application uses
2155 * relative mouse mode directly.
2156 *
2157 * This hint can be set anytime.
2158 *
2159 * \since This hint is available since SDL 3.0.0.
2160 */
2161#define SDL_HINT_MOUSE_EMULATE_WARP_WITH_RELATIVE "SDL_MOUSE_EMULATE_WARP_WITH_RELATIVE"
2162
2163/**
2164 * Allow mouse click events when clicking to focus an SDL window.
2165 *
2166 * The variable can be set to the following values:
2167 *
2168 * - "0": Ignore mouse clicks that activate a window. (default)
2169 * - "1": Generate events for mouse clicks that activate a window.
2170 *
2171 * This hint can be set anytime.
2172 *
2173 * \since This hint is available since SDL 3.0.0.
2174 */
2175#define SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH "SDL_MOUSE_FOCUS_CLICKTHROUGH"
2176
2177/**
2178 * A variable setting the speed scale for mouse motion, in floating point,
2179 * when the mouse is not in relative mode.
2180 *
2181 * This hint can be set anytime.
2182 *
2183 * \since This hint is available since SDL 3.0.0.
2184 */
2185#define SDL_HINT_MOUSE_NORMAL_SPEED_SCALE "SDL_MOUSE_NORMAL_SPEED_SCALE"
2186
2187/**
2188 * A variable controlling whether relative mouse mode constrains the mouse to
2189 * the center of the window.
2190 *
2191 * Constraining to the center of the window works better for FPS games and
2192 * when the application is running over RDP. Constraining to the whole window
2193 * works better for 2D games and increases the chance that the mouse will be
2194 * in the correct position when using high DPI mice.
2195 *
2196 * The variable can be set to the following values:
2197 *
2198 * - "0": Relative mouse mode constrains the mouse to the window.
2199 * - "1": Relative mouse mode constrains the mouse to the center of the
2200 * window. (default)
2201 *
2202 * This hint can be set anytime.
2203 *
2204 * \since This hint is available since SDL 3.0.0.
2205 */
2206#define SDL_HINT_MOUSE_RELATIVE_MODE_CENTER "SDL_MOUSE_RELATIVE_MODE_CENTER"
2207
2208/**
2209 * A variable controlling whether relative mouse mode is implemented using
2210 * mouse warping.
2211 *
2212 * The variable can be set to the following values:
2213 *
2214 * - "0": Relative mouse mode uses raw input. (default)
2215 * - "1": Relative mouse mode uses mouse warping.
2216 *
2217 * This hint can be set anytime relative mode is not currently enabled.
2218 *
2219 * \since This hint is available since SDL 3.0.0.
2220 */
2221#define SDL_HINT_MOUSE_RELATIVE_MODE_WARP "SDL_MOUSE_RELATIVE_MODE_WARP"
2222
2223/**
2224 * A variable setting the scale for mouse motion, in floating point, when the
2225 * mouse is in relative mode.
2226 *
2227 * This hint can be set anytime.
2228 *
2229 * \since This hint is available since SDL 3.0.0.
2230 */
2231#define SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE "SDL_MOUSE_RELATIVE_SPEED_SCALE"
2232
2233/**
2234 * A variable controlling whether the system mouse acceleration curve is used
2235 * for relative mouse motion.
2236 *
2237 * The variable can be set to the following values:
2238 *
2239 * - "0": Relative mouse motion will be unscaled. (default)
2240 * - "1": Relative mouse motion will be scaled using the system mouse
2241 * acceleration curve.
2242 *
2243 * If SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE is set, that will override the
2244 * system speed scale.
2245 *
2246 * This hint can be set anytime.
2247 *
2248 * \since This hint is available since SDL 3.0.0.
2249 */
2250#define SDL_HINT_MOUSE_RELATIVE_SYSTEM_SCALE "SDL_MOUSE_RELATIVE_SYSTEM_SCALE"
2251
2252/**
2253 * A variable controlling whether a motion event should be generated for mouse
2254 * warping in relative mode.
2255 *
2256 * The variable can be set to the following values:
2257 *
2258 * - "0": Warping the mouse will not generate a motion event in relative mode
2259 * - "1": Warping the mouse will generate a motion event in relative mode
2260 *
2261 * By default warping the mouse will not generate motion events in relative
2262 * mode. This avoids the application having to filter out large relative
2263 * motion due to warping.
2264 *
2265 * This hint can be set anytime.
2266 *
2267 * \since This hint is available since SDL 3.0.0.
2268 */
2269#define SDL_HINT_MOUSE_RELATIVE_WARP_MOTION "SDL_MOUSE_RELATIVE_WARP_MOTION"
2270
2271/**
2272 * A variable controlling whether the hardware cursor stays visible when
2273 * relative mode is active.
2274 *
2275 * This variable can be set to the following values: "0" - The cursor will be
2276 * hidden while relative mode is active (default) "1" - The cursor will remain
2277 * visible while relative mode is active
2278 *
2279 * Note that for systems without raw hardware inputs, relative mode is
2280 * implemented using warping, so the hardware cursor will visibly warp between
2281 * frames if this is enabled on those systems.
2282 *
2283 * This hint can be set anytime.
2284 *
2285 * \since This hint is available since SDL 3.0.0.
2286 */
2287#define SDL_HINT_MOUSE_RELATIVE_CURSOR_VISIBLE "SDL_MOUSE_RELATIVE_CURSOR_VISIBLE"
2288
2289/**
2290 * Controls how often SDL issues cursor confinement commands to the operating
2291 * system while relative mode is active, in case the desired confinement state
2292 * became out-of-sync due to interference from other running programs.
2293 *
2294 * The variable can be integers representing miliseconds between each refresh.
2295 * A value of zero means SDL will not automatically refresh the confinement.
2296 * The default value varies depending on the operating system, this variable
2297 * might not have any effects on inapplicable platforms such as those without
2298 * a cursor.
2299 *
2300 * This hint can be set anytime.
2301 *
2302 * \since This hint is available since SDL 3.0.0.
2303 */
2304#define SDL_HINT_MOUSE_RELATIVE_CLIP_INTERVAL "SDL_MOUSE_RELATIVE_CLIP_INTERVAL"
2305
2306/**
2307 * A variable controlling whether mouse events should generate synthetic touch
2308 * events.
2309 *
2310 * The variable can be set to the following values:
2311 *
2312 * - "0": Mouse events will not generate touch events. (default for desktop
2313 * platforms)
2314 * - "1": Mouse events will generate touch events. (default for mobile
2315 * platforms, such as Android and iOS)
2316 *
2317 * This hint can be set anytime.
2318 *
2319 * \since This hint is available since SDL 3.0.0.
2320 */
2321#define SDL_HINT_MOUSE_TOUCH_EVENTS "SDL_MOUSE_TOUCH_EVENTS"
2322
2323/**
2324 * Tell SDL not to catch the SIGINT or SIGTERM signals on POSIX platforms.
2325 *
2326 * The variable can be set to the following values:
2327 *
2328 * - "0": SDL will install a SIGINT and SIGTERM handler, and when it catches a
2329 * signal, convert it into an SDL_EVENT_QUIT event. (default)
2330 * - "1": SDL will not install a signal handler at all.
2331 *
2332 * This hint should be set before SDL is initialized.
2333 *
2334 * \since This hint is available since SDL 3.0.0.
2335 */
2336#define SDL_HINT_NO_SIGNAL_HANDLERS "SDL_NO_SIGNAL_HANDLERS"
2337
2338/**
2339 * A variable controlling what driver to use for OpenGL ES contexts.
2340 *
2341 * On some platforms, currently Windows and X11, OpenGL drivers may support
2342 * creating contexts with an OpenGL ES profile. By default SDL uses these
2343 * profiles, when available, otherwise it attempts to load an OpenGL ES
2344 * library, e.g. that provided by the ANGLE project. This variable controls
2345 * whether SDL follows this default behaviour or will always load an OpenGL ES
2346 * library.
2347 *
2348 * Circumstances where this is useful include - Testing an app with a
2349 * particular OpenGL ES implementation, e.g ANGLE, or emulator, e.g. those
2350 * from ARM, Imagination or Qualcomm. - Resolving OpenGL ES function addresses
2351 * at link time by linking with the OpenGL ES library instead of querying them
2352 * at run time with SDL_GL_GetProcAddress().
2353 *
2354 * Caution: for an application to work with the default behaviour across
2355 * different OpenGL drivers it must query the OpenGL ES function addresses at
2356 * run time using SDL_GL_GetProcAddress().
2357 *
2358 * This variable is ignored on most platforms because OpenGL ES is native or
2359 * not supported.
2360 *
2361 * The variable can be set to the following values:
2362 *
2363 * - "0": Use ES profile of OpenGL, if available. (default)
2364 * - "1": Load OpenGL ES library using the default library names.
2365 *
2366 * This hint should be set before SDL is initialized.
2367 *
2368 * \since This hint is available since SDL 3.0.0.
2369 */
2370#define SDL_HINT_OPENGL_ES_DRIVER "SDL_OPENGL_ES_DRIVER"
2371
2372/**
2373 * A variable controlling which orientations are allowed on iOS/Android.
2374 *
2375 * In some circumstances it is necessary to be able to explicitly control
2376 * which UI orientations are allowed.
2377 *
2378 * This variable is a space delimited list of the following values:
2379 *
2380 * - "LandscapeLeft"
2381 * - "LandscapeRight"
2382 * - "Portrait"
2383 * - "PortraitUpsideDown"
2384 *
2385 * This hint should be set before SDL is initialized.
2386 *
2387 * \since This hint is available since SDL 3.0.0.
2388 */
2389#define SDL_HINT_ORIENTATIONS "SDL_ORIENTATIONS"
2390
2391/**
2392 * A variable controlling whether pen mouse button emulation triggers only
2393 * when the pen touches the tablet surface.
2394 *
2395 * The variable can be set to the following values:
2396 *
2397 * - "0": The pen reports mouse button press/release immediately when the pen
2398 * button is pressed/released, and the pen tip touching the surface counts
2399 * as left mouse button press.
2400 * - "1": Mouse button presses are sent when the pen first touches the tablet
2401 * (analogously for releases). Not pressing a pen button simulates mouse
2402 * button 1, pressing the first pen button simulates mouse button 2 etc.; it
2403 * is not possible to report multiple buttons as pressed at the same time.
2404 * (default)
2405 *
2406 * This hint can be set anytime.
2407 *
2408 * \since This hint is available since SDL 3.0.0.
2409 */
2410#define SDL_HINT_PEN_DELAY_MOUSE_BUTTON "SDL_PEN_DELAY_MOUSE_BUTTON"
2411
2412/**
2413 * A variable controlling whether to treat pen movement as separate from mouse
2414 * movement.
2415 *
2416 * By default, pens report both SDL_MouseMotionEvent and SDL_PenMotionEvent
2417 * updates (analogously for button presses). This hint allows decoupling mouse
2418 * and pen updates.
2419 *
2420 * This variable toggles between the following behaviour:
2421 *
2422 * - "0": Pen acts as a mouse with mouse ID SDL_PEN_MOUSEID. (default) Use
2423 * case: client application is not pen aware, user wants to use pen instead
2424 * of mouse to interact.
2425 * - "1": Pen reports mouse clicks and movement events but does not update
2426 * SDL-internal mouse state (buttons pressed, current mouse location). Use
2427 * case: client application is not pen aware, user frequently alternates
2428 * between pen and "real" mouse.
2429 * - "2": Pen reports no mouse events. Use case: pen-aware client application
2430 * uses this hint to allow user to toggle between pen+mouse mode ("2") and
2431 * pen-only mode ("1" or "0").
2432 *
2433 * This hint can be set anytime.
2434 *
2435 * \since This hint is available since SDL 3.0.0.
2436 */
2437#define SDL_HINT_PEN_NOT_MOUSE "SDL_PEN_NOT_MOUSE"
2438
2439/**
2440 * A variable controlling the use of a sentinel event when polling the event
2441 * queue.
2442 *
2443 * When polling for events, SDL_PumpEvents is used to gather new events from
2444 * devices. If a device keeps producing new events between calls to
2445 * SDL_PumpEvents, a poll loop will become stuck until the new events stop.
2446 * This is most noticeable when moving a high frequency mouse.
2447 *
2448 * The variable can be set to the following values:
2449 *
2450 * - "0": Disable poll sentinels.
2451 * - "1": Enable poll sentinels. (default)
2452 *
2453 * This hint can be set anytime.
2454 *
2455 * \since This hint is available since SDL 3.0.0.
2456 */
2457#define SDL_HINT_POLL_SENTINEL "SDL_POLL_SENTINEL"
2458
2459/**
2460 * Override for SDL_GetPreferredLocales().
2461 *
2462 * If set, this will be favored over anything the OS might report for the
2463 * user's preferred locales. Changing this hint at runtime will not generate a
2464 * SDL_EVENT_LOCALE_CHANGED event (but if you can change the hint, you can
2465 * push your own event, if you want).
2466 *
2467 * The format of this hint is a comma-separated list of language and locale,
2468 * combined with an underscore, as is a common format: "en_GB". Locale is
2469 * optional: "en". So you might have a list like this: "en_GB,jp,es_PT"
2470 *
2471 * This hint can be set anytime.
2472 *
2473 * \since This hint is available since SDL 3.0.0.
2474 */
2475#define SDL_HINT_PREFERRED_LOCALES "SDL_PREFERRED_LOCALES"
2476
2477/**
2478 * A variable that decides whether to send SDL_EVENT_QUIT when closing the
2479 * last window.
2480 *
2481 * The variable can be set to the following values:
2482 *
2483 * - "0": SDL will not send an SDL_EVENT_QUIT event when the last window is
2484 * requesting to close. Note that in this case, there are still other
2485 * legitimate reasons one might get an SDL_EVENT_QUIT event: choosing "Quit"
2486 * from the macOS menu bar, sending a SIGINT (ctrl-c) on Unix, etc.
2487 * - "1": SDL will send a quit event when the last window is requesting to
2488 * close. (default)
2489 *
2490 * This hint can be set anytime.
2491 *
2492 * \since This hint is available since SDL 3.0.0.
2493 */
2494#define SDL_HINT_QUIT_ON_LAST_WINDOW_CLOSE "SDL_QUIT_ON_LAST_WINDOW_CLOSE"
2495
2496/**
2497 * A variable controlling whether the Direct3D device is initialized for
2498 * thread-safe operations.
2499 *
2500 * The variable can be set to the following values:
2501 *
2502 * - "0": Thread-safety is not enabled. (default)
2503 * - "1": Thread-safety is enabled.
2504 *
2505 * This hint should be set before creating a renderer.
2506 *
2507 * \since This hint is available since SDL 3.0.0.
2508 */
2509#define SDL_HINT_RENDER_DIRECT3D_THREADSAFE "SDL_RENDER_DIRECT3D_THREADSAFE"
2510
2511/**
2512 * A variable controlling whether to enable Direct3D 11+'s Debug Layer.
2513 *
2514 * This variable does not have any effect on the Direct3D 9 based renderer.
2515 *
2516 * The variable can be set to the following values:
2517 *
2518 * - "0": Disable Debug Layer use. (default)
2519 * - "1": Enable Debug Layer use.
2520 *
2521 * This hint should be set before creating a renderer.
2522 *
2523 * \since This hint is available since SDL 3.0.0.
2524 */
2525#define SDL_HINT_RENDER_DIRECT3D11_DEBUG "SDL_RENDER_DIRECT3D11_DEBUG"
2526
2527/**
2528 * A variable controlling whether to enable Vulkan Validation Layers.
2529 *
2530 * This variable can be set to the following values:
2531 *
2532 * - "0": Disable Validation Layer use
2533 * - "1": Enable Validation Layer use
2534 *
2535 * By default, SDL does not use Vulkan Validation Layers.
2536 *
2537 * \since This hint is available since SDL 3.0.0.
2538 */
2539#define SDL_HINT_RENDER_VULKAN_DEBUG "SDL_RENDER_VULKAN_DEBUG"
2540
2541/**
2542 * A variable specifying which render driver to use.
2543 *
2544 * If the application doesn't pick a specific renderer to use, this variable
2545 * specifies the name of the preferred renderer. If the preferred renderer
2546 * can't be initialized, the normal default renderer is used.
2547 *
2548 * This variable is case insensitive and can be set to the following values:
2549 *
2550 * - "direct3d"
2551 * - "direct3d11"
2552 * - "direct3d12"
2553 * - "opengl"
2554 * - "opengles2"
2555 * - "opengles"
2556 * - "metal"
2557 * - "vulkan"
2558 * - "software"
2559 *
2560 * The default varies by platform, but it's the first one in the list that is
2561 * available on the current platform.
2562 *
2563 * This hint should be set before creating a renderer.
2564 *
2565 * \since This hint is available since SDL 3.0.0.
2566 */
2567#define SDL_HINT_RENDER_DRIVER "SDL_RENDER_DRIVER"
2568
2569/**
2570 * A variable controlling how the 2D render API renders lines.
2571 *
2572 * The variable can be set to the following values:
2573 *
2574 * - "0": Use the default line drawing method (Bresenham's line algorithm)
2575 * - "1": Use the driver point API using Bresenham's line algorithm (correct,
2576 * draws many points)
2577 * - "2": Use the driver line API (occasionally misses line endpoints based on
2578 * hardware driver quirks
2579 * - "3": Use the driver geometry API (correct, draws thicker diagonal lines)
2580 *
2581 * This hint should be set before creating a renderer.
2582 *
2583 * \since This hint is available since SDL 3.0.0.
2584 */
2585#define SDL_HINT_RENDER_LINE_METHOD "SDL_RENDER_LINE_METHOD"
2586
2587/**
2588 * A variable controlling whether the Metal render driver select low power
2589 * device over default one.
2590 *
2591 * The variable can be set to the following values:
2592 *
2593 * - "0": Use the preferred OS device. (default)
2594 * - "1": Select a low power device.
2595 *
2596 * This hint should be set before creating a renderer.
2597 *
2598 * \since This hint is available since SDL 3.0.0.
2599 */
2600#define SDL_HINT_RENDER_METAL_PREFER_LOW_POWER_DEVICE "SDL_RENDER_METAL_PREFER_LOW_POWER_DEVICE"
2601
2602/**
2603 * A variable controlling whether updates to the SDL screen surface should be
2604 * synchronized with the vertical refresh, to avoid tearing.
2605 *
2606 * This hint overrides the application preference when creating a renderer.
2607 *
2608 * The variable can be set to the following values:
2609 *
2610 * - "0": Disable vsync. (default)
2611 * - "1": Enable vsync.
2612 *
2613 * This hint should be set before creating a renderer.
2614 *
2615 * \since This hint is available since SDL 3.0.0.
2616 */
2617#define SDL_HINT_RENDER_VSYNC "SDL_RENDER_VSYNC"
2618
2619/**
2620 * A variable to control whether the return key on the soft keyboard should
2621 * hide the soft keyboard on Android and iOS.
2622 *
2623 * The variable can be set to the following values:
2624 *
2625 * - "0": The return key will be handled as a key event. (default)
2626 * - "1": The return key will hide the keyboard.
2627 *
2628 * This hint can be set anytime.
2629 *
2630 * \since This hint is available since SDL 3.0.0.
2631 */
2632#define SDL_HINT_RETURN_KEY_HIDES_IME "SDL_RETURN_KEY_HIDES_IME"
2633
2634/**
2635 * A variable containing a list of ROG gamepad capable mice.
2636 *
2637 * The format of the string is a comma separated list of USB VID/PID pairs in
2638 * hexadecimal form, e.g.
2639 *
2640 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
2641 *
2642 * The variable can also take the form of "@file", in which case the named
2643 * file will be loaded and interpreted as the value of the variable.
2644 *
2645 * This hint should be set before SDL is initialized.
2646 *
2647 * \since This hint is available since SDL 3.0.0.
2648 *
2649 * \sa SDL_HINT_ROG_GAMEPAD_MICE_EXCLUDED
2650 */
2651#define SDL_HINT_ROG_GAMEPAD_MICE "SDL_ROG_GAMEPAD_MICE"
2652
2653/**
2654 * A variable containing a list of devices that are not ROG gamepad capable
2655 * mice.
2656 *
2657 * This will override SDL_HINT_ROG_GAMEPAD_MICE and the built in device list.
2658 *
2659 * The format of the string is a comma separated list of USB VID/PID pairs in
2660 * hexadecimal form, e.g.
2661 *
2662 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
2663 *
2664 * The variable can also take the form of "@file", in which case the named
2665 * file will be loaded and interpreted as the value of the variable.
2666 *
2667 * This hint should be set before SDL is initialized.
2668 *
2669 * \since This hint is available since SDL 3.0.0.
2670 */
2671#define SDL_HINT_ROG_GAMEPAD_MICE_EXCLUDED "SDL_ROG_GAMEPAD_MICE_EXCLUDED"
2672
2673/**
2674 * A variable controlling which Dispmanx layer to use on a Raspberry PI.
2675 *
2676 * Also known as Z-order. The variable can take a negative or positive value.
2677 * The default is 10000.
2678 *
2679 * This hint should be set before SDL is initialized.
2680 *
2681 * \since This hint is available since SDL 3.0.0.
2682 */
2683#define SDL_HINT_RPI_VIDEO_LAYER "SDL_RPI_VIDEO_LAYER"
2684
2685/**
2686 * Specify an "activity name" for screensaver inhibition.
2687 *
2688 * Some platforms, notably Linux desktops, list the applications which are
2689 * inhibiting the screensaver or other power-saving features.
2690 *
2691 * This hint lets you specify the "activity name" sent to the OS when
2692 * SDL_DisableScreenSaver() is used (or the screensaver is automatically
2693 * disabled). The contents of this hint are used when the screensaver is
2694 * disabled. You should use a string that describes what your program is doing
2695 * (and, therefore, why the screensaver is disabled). For example, "Playing a
2696 * game" or "Watching a video".
2697 *
2698 * Setting this to "" or leaving it unset will have SDL use a reasonable
2699 * default: "Playing a game" or something similar.
2700 *
2701 * This hint should be set before calling SDL_DisableScreenSaver()
2702 *
2703 * \since This hint is available since SDL 3.0.0.
2704 */
2705#define SDL_HINT_SCREENSAVER_INHIBIT_ACTIVITY_NAME "SDL_SCREENSAVER_INHIBIT_ACTIVITY_NAME"
2706
2707/**
2708 * A variable controlling whether SDL calls dbus_shutdown() on quit.
2709 *
2710 * This is useful as a debug tool to validate memory leaks, but shouldn't ever
2711 * be set in production applications, as other libraries used by the
2712 * application might use dbus under the hood and this can cause crashes if
2713 * they continue after SDL_Quit().
2714 *
2715 * The variable can be set to the following values:
2716 *
2717 * - "0": SDL will not call dbus_shutdown() on quit. (default)
2718 * - "1": SDL will call dbus_shutdown() on quit.
2719 *
2720 * This hint can be set anytime.
2721 *
2722 * \since This hint is available since SDL 3.0.0.
2723 */
2724#define SDL_HINT_SHUTDOWN_DBUS_ON_QUIT "SDL_SHUTDOWN_DBUS_ON_QUIT"
2725
2726/**
2727 * A variable that specifies a backend to use for title storage.
2728 *
2729 * By default, SDL will try all available storage backends in a reasonable
2730 * order until it finds one that can work, but this hint allows the app or
2731 * user to force a specific target, such as "pc" if, say, you are on Steam but
2732 * want to avoid SteamRemoteStorage for title data.
2733 *
2734 * This hint should be set before SDL is initialized.
2735 *
2736 * \since This hint is available since SDL 3.0.0.
2737 */
2738#define SDL_HINT_STORAGE_TITLE_DRIVER "SDL_STORAGE_TITLE_DRIVER"
2739
2740/**
2741 * A variable that specifies a backend to use for user storage.
2742 *
2743 * By default, SDL will try all available storage backends in a reasonable
2744 * order until it finds one that can work, but this hint allows the app or
2745 * user to force a specific target, such as "pc" if, say, you are on Steam but
2746 * want to avoid SteamRemoteStorage for user data.
2747 *
2748 * This hint should be set before SDL is initialized.
2749 *
2750 * \since This hint is available since SDL 3.0.0.
2751 */
2752#define SDL_HINT_STORAGE_USER_DRIVER "SDL_STORAGE_USER_DRIVER"
2753
2754/**
2755 * Specifies whether SDL_THREAD_PRIORITY_TIME_CRITICAL should be treated as
2756 * realtime.
2757 *
2758 * On some platforms, like Linux, a realtime priority thread may be subject to
2759 * restrictions that require special handling by the application. This hint
2760 * exists to let SDL know that the app is prepared to handle said
2761 * restrictions.
2762 *
2763 * On Linux, SDL will apply the following configuration to any thread that
2764 * becomes realtime:
2765 *
2766 * - The SCHED_RESET_ON_FORK bit will be set on the scheduling policy,
2767 * - An RLIMIT_RTTIME budget will be configured to the rtkit specified limit.
2768 * - Exceeding this limit will result in the kernel sending SIGKILL to the
2769 * app, refer to the man pages for more information.
2770 *
2771 * The variable can be set to the following values:
2772 *
2773 * - "0": default platform specific behaviour
2774 * - "1": Force SDL_THREAD_PRIORITY_TIME_CRITICAL to a realtime scheduling
2775 * policy
2776 *
2777 * This hint should be set before calling SDL_SetThreadPriority()
2778 *
2779 * \since This hint is available since SDL 3.0.0.
2780 */
2781#define SDL_HINT_THREAD_FORCE_REALTIME_TIME_CRITICAL "SDL_THREAD_FORCE_REALTIME_TIME_CRITICAL"
2782
2783/**
2784 * A string specifying additional information to use with
2785 * SDL_SetThreadPriority.
2786 *
2787 * By default SDL_SetThreadPriority will make appropriate system changes in
2788 * order to apply a thread priority. For example on systems using pthreads the
2789 * scheduler policy is changed automatically to a policy that works well with
2790 * a given priority. Code which has specific requirements can override SDL's
2791 * default behavior with this hint.
2792 *
2793 * pthread hint values are "current", "other", "fifo" and "rr". Currently no
2794 * other platform hint values are defined but may be in the future.
2795 *
2796 * On Linux, the kernel may send SIGKILL to realtime tasks which exceed the
2797 * distro configured execution budget for rtkit. This budget can be queried
2798 * through RLIMIT_RTTIME after calling SDL_SetThreadPriority().
2799 *
2800 * This hint should be set before calling SDL_SetThreadPriority()
2801 *
2802 * \since This hint is available since SDL 3.0.0.
2803 */
2804#define SDL_HINT_THREAD_PRIORITY_POLICY "SDL_THREAD_PRIORITY_POLICY"
2805
2806/**
2807 * A variable that controls the timer resolution, in milliseconds.
2808 *
2809 * The higher resolution the timer, the more frequently the CPU services timer
2810 * interrupts, and the more precise delays are, but this takes up power and
2811 * CPU time. This hint is only used on Windows.
2812 *
2813 * See this blog post for more information:
2814 * http://randomascii.wordpress.com/2013/07/08/windows-timer-resolution-megawatts-wasted/
2815 *
2816 * The default value is "1".
2817 *
2818 * If this variable is set to "0", the system timer resolution is not set.
2819 *
2820 * This hint can be set anytime.
2821 *
2822 * \since This hint is available since SDL 3.0.0.
2823 */
2824#define SDL_HINT_TIMER_RESOLUTION "SDL_TIMER_RESOLUTION"
2825
2826/**
2827 * A variable controlling whether touch events should generate synthetic mouse
2828 * events.
2829 *
2830 * The variable can be set to the following values:
2831 *
2832 * - "0": Touch events will not generate mouse events.
2833 * - "1": Touch events will generate mouse events. (default)
2834 *
2835 * This hint can be set anytime.
2836 *
2837 * \since This hint is available since SDL 3.0.0.
2838 */
2839#define SDL_HINT_TOUCH_MOUSE_EVENTS "SDL_TOUCH_MOUSE_EVENTS"
2840
2841/**
2842 * A variable controlling whether trackpads should be treated as touch
2843 * devices.
2844 *
2845 * On macOS (and possibly other platforms in the future), SDL will report
2846 * touches on a trackpad as mouse input, which is generally what users expect
2847 * from this device; however, these are often actually full multitouch-capable
2848 * touch devices, so it might be preferable to some apps to treat them as
2849 * such.
2850 *
2851 * The variable can be set to the following values:
2852 *
2853 * - "0": Trackpad will send mouse events. (default)
2854 * - "1": Trackpad will send touch events.
2855 *
2856 * This hint should be set before SDL is initialized.
2857 *
2858 * \since This hint is available since SDL 3.0.0.
2859 */
2860#define SDL_HINT_TRACKPAD_IS_TOUCH_ONLY "SDL_TRACKPAD_IS_TOUCH_ONLY"
2861
2862/**
2863 * A variable controlling whether the Android / tvOS remotes should be listed
2864 * as joystick devices, instead of sending keyboard events.
2865 *
2866 * The variable can be set to the following values:
2867 *
2868 * - "0": Remotes send enter/escape/arrow key events.
2869 * - "1": Remotes are available as 2 axis, 2 button joysticks. (default)
2870 *
2871 * This hint should be set before SDL is initialized.
2872 *
2873 * \since This hint is available since SDL 3.0.0.
2874 */
2875#define SDL_HINT_TV_REMOTE_AS_JOYSTICK "SDL_TV_REMOTE_AS_JOYSTICK"
2876
2877/**
2878 * A variable controlling whether the screensaver is enabled.
2879 *
2880 * The variable can be set to the following values:
2881 *
2882 * - "0": Disable screensaver. (default)
2883 * - "1": Enable screensaver.
2884 *
2885 * This hint should be set before SDL is initialized.
2886 *
2887 * \since This hint is available since SDL 3.0.0.
2888 */
2889#define SDL_HINT_VIDEO_ALLOW_SCREENSAVER "SDL_VIDEO_ALLOW_SCREENSAVER"
2890
2891/**
2892 * Tell the video driver that we only want a double buffer.
2893 *
2894 * By default, most lowlevel 2D APIs will use a triple buffer scheme that
2895 * wastes no CPU time on waiting for vsync after issuing a flip, but
2896 * introduces a frame of latency. On the other hand, using a double buffer
2897 * scheme instead is recommended for cases where low latency is an important
2898 * factor because we save a whole frame of latency.
2899 *
2900 * We do so by waiting for vsync immediately after issuing a flip, usually
2901 * just after eglSwapBuffers call in the backend's *_SwapWindow function.
2902 *
2903 * This hint is currently supported on the following drivers:
2904 *
2905 * - Raspberry Pi (raspberrypi)
2906 * - Wayland (wayland)
2907 *
2908 * This hint should be set before SDL is initialized.
2909 *
2910 * \since This hint is available since SDL 3.0.0.
2911 */
2912#define SDL_HINT_VIDEO_DOUBLE_BUFFER "SDL_VIDEO_DOUBLE_BUFFER"
2913
2914/**
2915 * A variable that specifies a video backend to use.
2916 *
2917 * By default, SDL will try all available video backends in a reasonable order
2918 * until it finds one that can work, but this hint allows the app or user to
2919 * force a specific target, such as "x11" if, say, you are on Wayland but want
2920 * to try talking to the X server instead.
2921 *
2922 * This hint should be set before SDL is initialized.
2923 *
2924 * \since This hint is available since SDL 3.0.0.
2925 */
2926#define SDL_HINT_VIDEO_DRIVER "SDL_VIDEO_DRIVER"
2927
2928/**
2929 * If eglGetPlatformDisplay fails, fall back to calling eglGetDisplay.
2930 *
2931 * The variable can be set to one of the following values:
2932 *
2933 * - "0": Do not fall back to eglGetDisplay.
2934 * - "1": Fall back to eglGetDisplay if eglGetPlatformDisplay fails. (default)
2935 *
2936 * This hint should be set before SDL is initialized.
2937 *
2938 * \since This hint is available since SDL 3.0.0.
2939 */
2940#define SDL_HINT_VIDEO_EGL_ALLOW_GETDISPLAY_FALLBACK "SDL_VIDEO_EGL_ALLOW_GETDISPLAY_FALLBACK"
2941
2942/**
2943 * A variable controlling whether the OpenGL context should be created with
2944 * EGL.
2945 *
2946 * The variable can be set to the following values:
2947 *
2948 * - "0": Use platform-specific GL context creation API (GLX, WGL, CGL, etc).
2949 * (default)
2950 * - "1": Use EGL
2951 *
2952 * This hint should be set before SDL is initialized.
2953 *
2954 * \since This hint is available since SDL 3.0.0.
2955 */
2956#define SDL_HINT_VIDEO_FORCE_EGL "SDL_VIDEO_FORCE_EGL"
2957
2958/**
2959 * A variable that specifies the policy for fullscreen Spaces on macOS.
2960 *
2961 * The variable can be set to the following values:
2962 *
2963 * - "0": Disable Spaces support (FULLSCREEN_DESKTOP won't use them and
2964 * SDL_WINDOW_RESIZABLE windows won't offer the "fullscreen" button on their
2965 * titlebars).
2966 * - "1": Enable Spaces support (FULLSCREEN_DESKTOP will use them and
2967 * SDL_WINDOW_RESIZABLE windows will offer the "fullscreen" button on their
2968 * titlebars). (default)
2969 *
2970 * This hint should be set before creating a window.
2971 *
2972 * \since This hint is available since SDL 3.0.0.
2973 */
2974#define SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES "SDL_VIDEO_MAC_FULLSCREEN_SPACES"
2975
2976/**
2977 * A variable controlling whether fullscreen windows are minimized when they
2978 * lose focus.
2979 *
2980 * The variable can be set to the following values:
2981 *
2982 * - "0": Fullscreen windows will not be minimized when they lose focus.
2983 * (default)
2984 * - "1": Fullscreen windows are minimized when they lose focus.
2985 *
2986 * This hint can be set anytime.
2987 *
2988 * \since This hint is available since SDL 3.0.0.
2989 */
2990#define SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS"
2991
2992/**
2993 * A variable controlling whether all window operations will block until
2994 * complete.
2995 *
2996 * Window systems that run asynchronously may not have the results of window
2997 * operations that resize or move the window applied immediately upon the
2998 * return of the requesting function. Setting this hint will cause such
2999 * operations to block after every call until the pending operation has
3000 * completed. Setting this to '1' is the equivalent of calling
3001 * SDL_SyncWindow() after every function call.
3002 *
3003 * Be aware that amount of time spent blocking while waiting for window
3004 * operations to complete can be quite lengthy, as animations may have to
3005 * complete, which can take upwards of multiple seconds in some cases.
3006 *
3007 * The variable can be set to the following values:
3008 *
3009 * - "0": Window operations are non-blocking. (default)
3010 * - "1": Window operations will block until completed.
3011 *
3012 * This hint can be set anytime.
3013 *
3014 * \since This hint is available since SDL 3.0.0.
3015 */
3016#define SDL_HINT_VIDEO_SYNC_WINDOW_OPERATIONS "SDL_VIDEO_SYNC_WINDOW_OPERATIONS"
3017
3018/**
3019 * A variable controlling whether the libdecor Wayland backend is allowed to
3020 * be used.
3021 *
3022 * libdecor is used over xdg-shell when xdg-decoration protocol is
3023 * unavailable.
3024 *
3025 * The variable can be set to the following values:
3026 *
3027 * - "0": libdecor use is disabled.
3028 * - "1": libdecor use is enabled. (default)
3029 *
3030 * This hint should be set before SDL is initialized.
3031 *
3032 * \since This hint is available since SDL 3.0.0.
3033 */
3034#define SDL_HINT_VIDEO_WAYLAND_ALLOW_LIBDECOR "SDL_VIDEO_WAYLAND_ALLOW_LIBDECOR"
3035
3036/**
3037 * A variable controlling whether video mode emulation is enabled under
3038 * Wayland.
3039 *
3040 * When this hint is set, a standard set of emulated CVT video modes will be
3041 * exposed for use by the application. If it is disabled, the only modes
3042 * exposed will be the logical desktop size and, in the case of a scaled
3043 * desktop, the native display resolution.
3044 *
3045 * The variable can be set to the following values:
3046 *
3047 * - "0": Video mode emulation is disabled.
3048 * - "1": Video mode emulation is enabled. (default)
3049 *
3050 * This hint should be set before SDL is initialized.
3051 *
3052 * \since This hint is available since SDL 3.0.0.
3053 */
3054#define SDL_HINT_VIDEO_WAYLAND_MODE_EMULATION "SDL_VIDEO_WAYLAND_MODE_EMULATION"
3055
3056/**
3057 * A variable controlling how modes with a non-native aspect ratio are
3058 * displayed under Wayland.
3059 *
3060 * When this hint is set, the requested scaling will be used when displaying
3061 * fullscreen video modes that don't match the display's native aspect ratio.
3062 * This is contingent on compositor viewport support.
3063 *
3064 * The variable can be set to the following values:
3065 *
3066 * - "aspect" - Video modes will be displayed scaled, in their proper aspect
3067 * ratio, with black bars.
3068 * - "stretch" - Video modes will be scaled to fill the entire display.
3069 * (default)
3070 * - "none" - Video modes will be displayed as 1:1 with no scaling.
3071 *
3072 * This hint should be set before creating a window.
3073 *
3074 * \since This hint is available since SDL 3.0.0.
3075 */
3076#define SDL_HINT_VIDEO_WAYLAND_MODE_SCALING "SDL_VIDEO_WAYLAND_MODE_SCALING"
3077
3078/**
3079 * A variable controlling whether the libdecor Wayland backend is preferred
3080 * over native decorations.
3081 *
3082 * When this hint is set, libdecor will be used to provide window decorations,
3083 * even if xdg-decoration is available. (Note that, by default, libdecor will
3084 * use xdg-decoration itself if available).
3085 *
3086 * The variable can be set to the following values:
3087 *
3088 * - "0": libdecor is enabled only if server-side decorations are unavailable.
3089 * (default)
3090 * - "1": libdecor is always enabled if available.
3091 *
3092 * This hint should be set before SDL is initialized.
3093 *
3094 * \since This hint is available since SDL 3.0.0.
3095 */
3096#define SDL_HINT_VIDEO_WAYLAND_PREFER_LIBDECOR "SDL_VIDEO_WAYLAND_PREFER_LIBDECOR"
3097
3098/**
3099 * A variable forcing non-DPI-aware Wayland windows to output at 1:1 scaling.
3100 *
3101 * This must be set before initializing the video subsystem.
3102 *
3103 * When this hint is set, Wayland windows that are not flagged as being
3104 * DPI-aware will be output with scaling designed to force 1:1 pixel mapping.
3105 *
3106 * This is intended to allow legacy applications to be displayed without
3107 * desktop scaling being applied, and has issues with certain display
3108 * configurations, as this forces the window to behave in a way that Wayland
3109 * desktops were not designed to accommodate:
3110 *
3111 * - Rounding errors can result with odd window sizes and/or desktop scales,
3112 * which can cause the window contents to appear slightly blurry.
3113 * - The window may be unusably small on scaled desktops.
3114 * - The window may jump in size when moving between displays of different
3115 * scale factors.
3116 * - Displays may appear to overlap when using a multi-monitor setup with
3117 * scaling enabled.
3118 * - Possible loss of cursor precision due to the logical size of the window
3119 * being reduced.
3120 *
3121 * New applications should be designed with proper DPI awareness handling
3122 * instead of enabling this.
3123 *
3124 * The variable can be set to the following values:
3125 *
3126 * - "0": Windows will be scaled normally.
3127 * - "1": Windows will be forced to scale to achieve 1:1 output.
3128 *
3129 * This hint should be set before creating a window.
3130 *
3131 * \since This hint is available since SDL 3.0.0.
3132 */
3133#define SDL_HINT_VIDEO_WAYLAND_SCALE_TO_DISPLAY "SDL_VIDEO_WAYLAND_SCALE_TO_DISPLAY"
3134
3135/**
3136 * A variable specifying which shader compiler to preload when using the
3137 * Chrome ANGLE binaries.
3138 *
3139 * SDL has EGL and OpenGL ES2 support on Windows via the ANGLE project. It can
3140 * use two different sets of binaries, those compiled by the user from source
3141 * or those provided by the Chrome browser. In the later case, these binaries
3142 * require that SDL loads a DLL providing the shader compiler.
3143 *
3144 * The variable can be set to the following values:
3145 *
3146 * - "d3dcompiler_46.dll" - best for Vista or later. (default)
3147 * - "d3dcompiler_43.dll" - for XP support.
3148 * - "none" - do not load any library, useful if you compiled ANGLE from
3149 * source and included the compiler in your binaries.
3150 *
3151 * This hint should be set before SDL is initialized.
3152 *
3153 * \since This hint is available since SDL 3.0.0.
3154 */
3155#define SDL_HINT_VIDEO_WIN_D3DCOMPILER "SDL_VIDEO_WIN_D3DCOMPILER"
3156
3157/**
3158 * A variable controlling whether the X11 _NET_WM_BYPASS_COMPOSITOR hint
3159 * should be used.
3160 *
3161 * The variable can be set to the following values:
3162 *
3163 * - "0": Disable _NET_WM_BYPASS_COMPOSITOR.
3164 * - "1": Enable _NET_WM_BYPASS_COMPOSITOR. (default)
3165 *
3166 * This hint should be set before creating a window.
3167 *
3168 * \since This hint is available since SDL 3.0.0.
3169 */
3170#define SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR "SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR"
3171
3172/**
3173 * A variable controlling whether the X11 _NET_WM_PING protocol should be
3174 * supported.
3175 *
3176 * By default SDL will use _NET_WM_PING, but for applications that know they
3177 * will not always be able to respond to ping requests in a timely manner they
3178 * can turn it off to avoid the window manager thinking the app is hung.
3179 *
3180 * The variable can be set to the following values:
3181 *
3182 * - "0": Disable _NET_WM_PING.
3183 * - "1": Enable _NET_WM_PING. (default)
3184 *
3185 * This hint should be set before creating a window.
3186 *
3187 * \since This hint is available since SDL 3.0.0.
3188 */
3189#define SDL_HINT_VIDEO_X11_NET_WM_PING "SDL_VIDEO_X11_NET_WM_PING"
3190
3191/**
3192 * A variable forcing the content scaling factor for X11 displays.
3193 *
3194 * The variable can be set to a floating point value in the range 1.0-10.0f
3195 *
3196 * This hint should be set before SDL is initialized.
3197 *
3198 * \since This hint is available since SDL 3.0.0.
3199 */
3200#define SDL_HINT_VIDEO_X11_SCALING_FACTOR "SDL_VIDEO_X11_SCALING_FACTOR"
3201
3202/**
3203 * A variable forcing the visual ID chosen for new X11 windows.
3204 *
3205 * This hint should be set before creating a window.
3206 *
3207 * \since This hint is available since SDL 3.0.0.
3208 */
3209#define SDL_HINT_VIDEO_X11_WINDOW_VISUALID "SDL_VIDEO_X11_WINDOW_VISUALID"
3210
3211/**
3212 * A variable controlling whether the X11 XRandR extension should be used.
3213 *
3214 * The variable can be set to the following values:
3215 *
3216 * - "0": Disable XRandR.
3217 * - "1": Enable XRandR. (default)
3218 *
3219 * This hint should be set before SDL is initialized.
3220 *
3221 * \since This hint is available since SDL 3.0.0.
3222 */
3223#define SDL_HINT_VIDEO_X11_XRANDR "SDL_VIDEO_X11_XRANDR"
3224
3225/**
3226 * A variable controlling which touchpad should generate synthetic mouse
3227 * events.
3228 *
3229 * The variable can be set to the following values:
3230 *
3231 * - "0": Only front touchpad should generate mouse events. (default)
3232 * - "1": Only back touchpad should generate mouse events.
3233 * - "2": Both touchpads should generate mouse events.
3234 *
3235 * This hint can be set anytime.
3236 *
3237 * \since This hint is available since SDL 3.0.0.
3238 */
3239#define SDL_HINT_VITA_TOUCH_MOUSE_DEVICE "SDL_VITA_TOUCH_MOUSE_DEVICE"
3240
3241/**
3242 * A variable controlling how the fact chunk affects the loading of a WAVE
3243 * file.
3244 *
3245 * The fact chunk stores information about the number of samples of a WAVE
3246 * file. The Standards Update from Microsoft notes that this value can be used
3247 * to 'determine the length of the data in seconds'. This is especially useful
3248 * for compressed formats (for which this is a mandatory chunk) if they
3249 * produce multiple sample frames per block and truncating the block is not
3250 * allowed. The fact chunk can exactly specify how many sample frames there
3251 * should be in this case.
3252 *
3253 * Unfortunately, most application seem to ignore the fact chunk and so SDL
3254 * ignores it by default as well.
3255 *
3256 * The variable can be set to the following values:
3257 *
3258 * - "truncate" - Use the number of samples to truncate the wave data if the
3259 * fact chunk is present and valid.
3260 * - "strict" - Like "truncate", but raise an error if the fact chunk is
3261 * invalid, not present for non-PCM formats, or if the data chunk doesn't
3262 * have that many samples.
3263 * - "ignorezero" - Like "truncate", but ignore fact chunk if the number of
3264 * samples is zero.
3265 * - "ignore" - Ignore fact chunk entirely. (default)
3266 *
3267 * This hint should be set before calling SDL_LoadWAV() or SDL_LoadWAV_IO()
3268 *
3269 * \since This hint is available since SDL 3.0.0.
3270 */
3271#define SDL_HINT_WAVE_FACT_CHUNK "SDL_WAVE_FACT_CHUNK"
3272
3273/**
3274 * A variable controlling how the size of the RIFF chunk affects the loading
3275 * of a WAVE file.
3276 *
3277 * The size of the RIFF chunk (which includes all the sub-chunks of the WAVE
3278 * file) is not always reliable. In case the size is wrong, it's possible to
3279 * just ignore it and step through the chunks until a fixed limit is reached.
3280 *
3281 * Note that files that have trailing data unrelated to the WAVE file or
3282 * corrupt files may slow down the loading process without a reliable
3283 * boundary. By default, SDL stops after 10000 chunks to prevent wasting time.
3284 * Use the environment variable SDL_WAVE_CHUNK_LIMIT to adjust this value.
3285 *
3286 * The variable can be set to the following values:
3287 *
3288 * - "force" - Always use the RIFF chunk size as a boundary for the chunk
3289 * search.
3290 * - "ignorezero" - Like "force", but a zero size searches up to 4 GiB.
3291 * (default)
3292 * - "ignore" - Ignore the RIFF chunk size and always search up to 4 GiB.
3293 * - "maximum" - Search for chunks until the end of file. (not recommended)
3294 *
3295 * This hint should be set before calling SDL_LoadWAV() or SDL_LoadWAV_IO()
3296 *
3297 * \since This hint is available since SDL 3.0.0.
3298 */
3299#define SDL_HINT_WAVE_RIFF_CHUNK_SIZE "SDL_WAVE_RIFF_CHUNK_SIZE"
3300
3301/**
3302 * A variable controlling how a truncated WAVE file is handled.
3303 *
3304 * A WAVE file is considered truncated if any of the chunks are incomplete or
3305 * the data chunk size is not a multiple of the block size. By default, SDL
3306 * decodes until the first incomplete block, as most applications seem to do.
3307 *
3308 * The variable can be set to the following values:
3309 *
3310 * - "verystrict" - Raise an error if the file is truncated.
3311 * - "strict" - Like "verystrict", but the size of the RIFF chunk is ignored.
3312 * - "dropframe" - Decode until the first incomplete sample frame.
3313 * - "dropblock" - Decode until the first incomplete block. (default)
3314 *
3315 * This hint should be set before calling SDL_LoadWAV() or SDL_LoadWAV_IO()
3316 *
3317 * \since This hint is available since SDL 3.0.0.
3318 */
3319#define SDL_HINT_WAVE_TRUNCATION "SDL_WAVE_TRUNCATION"
3320
3321/**
3322 * A variable controlling whether the window is activated when the
3323 * SDL_RaiseWindow function is called.
3324 *
3325 * The variable can be set to the following values:
3326 *
3327 * - "0": The window is not activated when the SDL_RaiseWindow function is
3328 * called.
3329 * - "1": The window is activated when the SDL_RaiseWindow function is called.
3330 * (default)
3331 *
3332 * This hint can be set anytime.
3333 *
3334 * \since This hint is available since SDL 3.0.0.
3335 */
3336#define SDL_HINT_WINDOW_ACTIVATE_WHEN_RAISED "SDL_WINDOW_ACTIVATE_WHEN_RAISED"
3337
3338/**
3339 * A variable controlling whether the window is activated when the
3340 * SDL_ShowWindow function is called.
3341 *
3342 * The variable can be set to the following values:
3343 *
3344 * - "0": The window is not activated when the SDL_ShowWindow function is
3345 * called.
3346 * - "1": The window is activated when the SDL_ShowWindow function is called.
3347 * (default)
3348 *
3349 * This hint can be set anytime.
3350 *
3351 * \since This hint is available since SDL 3.0.0.
3352 */
3353#define SDL_HINT_WINDOW_ACTIVATE_WHEN_SHOWN "SDL_WINDOW_ACTIVATE_WHEN_SHOWN"
3354
3355/**
3356 * If set to "0" then never set the top-most flag on an SDL Window even if the
3357 * application requests it.
3358 *
3359 * This is a debugging aid for developers and not expected to be used by end
3360 * users.
3361 *
3362 * The variable can be set to the following values:
3363 *
3364 * - "0": don't allow topmost
3365 * - "1": allow topmost (default)
3366 *
3367 * This hint can be set anytime.
3368 *
3369 * \since This hint is available since SDL 3.0.0.
3370 */
3371#define SDL_HINT_WINDOW_ALLOW_TOPMOST "SDL_WINDOW_ALLOW_TOPMOST"
3372
3373/**
3374 * A variable controlling whether the window frame and title bar are
3375 * interactive when the cursor is hidden.
3376 *
3377 * The variable can be set to the following values:
3378 *
3379 * - "0": The window frame is not interactive when the cursor is hidden (no
3380 * move, resize, etc).
3381 * - "1": The window frame is interactive when the cursor is hidden. (default)
3382 *
3383 * This hint can be set anytime.
3384 *
3385 * \since This hint is available since SDL 3.0.0.
3386 */
3387#define SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN "SDL_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN"
3388
3389/**
3390 * A variable controlling whether SDL generates window-close events for Alt+F4
3391 * on Windows.
3392 *
3393 * The variable can be set to the following values:
3394 *
3395 * - "0": SDL will only do normal key handling for Alt+F4.
3396 * - "1": SDL will generate a window-close event when it sees Alt+F4.
3397 * (default)
3398 *
3399 * This hint can be set anytime.
3400 *
3401 * \since This hint is available since SDL 3.0.0.
3402 */
3403#define SDL_HINT_WINDOWS_CLOSE_ON_ALT_F4 "SDL_WINDOWS_CLOSE_ON_ALT_F4"
3404
3405/**
3406 * A variable controlling whether menus can be opened with their keyboard
3407 * shortcut (Alt+mnemonic).
3408 *
3409 * If the mnemonics are enabled, then menus can be opened by pressing the Alt
3410 * key and the corresponding mnemonic (for example, Alt+F opens the File
3411 * menu). However, in case an invalid mnemonic is pressed, Windows makes an
3412 * audible beep to convey that nothing happened. This is true even if the
3413 * window has no menu at all!
3414 *
3415 * Because most SDL applications don't have menus, and some want to use the
3416 * Alt key for other purposes, SDL disables mnemonics (and the beeping) by
3417 * default.
3418 *
3419 * Note: This also affects keyboard events: with mnemonics enabled, when a
3420 * menu is opened from the keyboard, you will not receive a KEYUP event for
3421 * the mnemonic key, and *might* not receive one for Alt.
3422 *
3423 * The variable can be set to the following values:
3424 *
3425 * - "0": Alt+mnemonic does nothing, no beeping. (default)
3426 * - "1": Alt+mnemonic opens menus, invalid mnemonics produce a beep.
3427 *
3428 * This hint can be set anytime.
3429 *
3430 * \since This hint is available since SDL 3.0.0.
3431 */
3432#define SDL_HINT_WINDOWS_ENABLE_MENU_MNEMONICS "SDL_WINDOWS_ENABLE_MENU_MNEMONICS"
3433
3434/**
3435 * A variable controlling whether the windows message loop is processed by
3436 * SDL.
3437 *
3438 * The variable can be set to the following values:
3439 *
3440 * - "0": The window message loop is not run.
3441 * - "1": The window message loop is processed in SDL_PumpEvents(). (default)
3442 *
3443 * This hint can be set anytime.
3444 *
3445 * \since This hint is available since SDL 3.0.0.
3446 */
3447#define SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP "SDL_WINDOWS_ENABLE_MESSAGELOOP"
3448
3449/**
3450 * A variable controlling whether raw keyboard events are used on Windows.
3451 *
3452 * The variable can be set to the following values:
3453 *
3454 * - "0": The Windows message loop is used for keyboard events. (default)
3455 * - "1": Low latency raw keyboard events are used.
3456 *
3457 * This hint can be set anytime.
3458 *
3459 * \since This hint is available since SDL 3.0.0.
3460 */
3461#define SDL_HINT_WINDOWS_RAW_KEYBOARD "SDL_WINDOWS_RAW_KEYBOARD"
3462
3463/**
3464 * A variable controlling whether SDL uses Critical Sections for mutexes on
3465 * Windows.
3466 *
3467 * On Windows 7 and newer, Slim Reader/Writer Locks are available. They offer
3468 * better performance, allocate no kernel resources and use less memory. SDL
3469 * will fall back to Critical Sections on older OS versions or if forced to by
3470 * this hint.
3471 *
3472 * The variable can be set to the following values:
3473 *
3474 * - "0": Use SRW Locks when available, otherwise fall back to Critical
3475 * Sections. (default)
3476 * - "1": Force the use of Critical Sections in all cases.
3477 *
3478 * This hint should be set before SDL is initialized.
3479 *
3480 * \since This hint is available since SDL 3.0.0.
3481 */
3482#define SDL_HINT_WINDOWS_FORCE_MUTEX_CRITICAL_SECTIONS "SDL_WINDOWS_FORCE_MUTEX_CRITICAL_SECTIONS"
3483
3484/**
3485 * A variable controlling whether SDL uses Kernel Semaphores on Windows.
3486 *
3487 * Kernel Semaphores are inter-process and require a context switch on every
3488 * interaction. On Windows 8 and newer, the WaitOnAddress API is available.
3489 * Using that and atomics to implement semaphores increases performance. SDL
3490 * will fall back to Kernel Objects on older OS versions or if forced to by
3491 * this hint.
3492 *
3493 * The variable can be set to the following values:
3494 *
3495 * - "0": Use Atomics and WaitOnAddress API when available, otherwise fall
3496 * back to Kernel Objects. (default)
3497 * - "1": Force the use of Kernel Objects in all cases.
3498 *
3499 * This hint should be set before SDL is initialized.
3500 *
3501 * \since This hint is available since SDL 3.0.0.
3502 */
3503#define SDL_HINT_WINDOWS_FORCE_SEMAPHORE_KERNEL "SDL_WINDOWS_FORCE_SEMAPHORE_KERNEL"
3504
3505/**
3506 * A variable to specify custom icon resource id from RC file on Windows
3507 * platform.
3508 *
3509 * This hint should be set before SDL is initialized.
3510 *
3511 * \since This hint is available since SDL 3.0.0.
3512 */
3513#define SDL_HINT_WINDOWS_INTRESOURCE_ICON "SDL_WINDOWS_INTRESOURCE_ICON"
3514#define SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL "SDL_WINDOWS_INTRESOURCE_ICON_SMALL"
3515
3516/**
3517 * A variable controlling whether SDL uses the D3D9Ex API introduced in
3518 * Windows Vista, instead of normal D3D9.
3519 *
3520 * Direct3D 9Ex contains changes to state management that can eliminate device
3521 * loss errors during scenarios like Alt+Tab or UAC prompts. D3D9Ex may
3522 * require some changes to your application to cope with the new behavior, so
3523 * this is disabled by default.
3524 *
3525 * For more information on Direct3D 9Ex, see:
3526 *
3527 * - https://docs.microsoft.com/en-us/windows/win32/direct3darticles/graphics-apis-in-windows-vista#direct3d-9ex
3528 * - https://docs.microsoft.com/en-us/windows/win32/direct3darticles/direct3d-9ex-improvements
3529 *
3530 * The variable can be set to the following values:
3531 *
3532 * - "0": Use the original Direct3D 9 API. (default)
3533 * - "1": Use the Direct3D 9Ex API on Vista and later (and fall back if D3D9Ex
3534 * is unavailable)
3535 *
3536 * This hint should be set before SDL is initialized.
3537 *
3538 * \since This hint is available since SDL 3.0.0.
3539 */
3540#define SDL_HINT_WINDOWS_USE_D3D9EX "SDL_WINDOWS_USE_D3D9EX"
3541
3542/**
3543 * A variable controlling whether SDL will clear the window contents when the
3544 * WM_ERASEBKGND message is received.
3545 *
3546 * The variable can be set to the following values:
3547 *
3548 * - "0"/"never": Never clear the window.
3549 * - "1"/"initial": Clear the window when the first WM_ERASEBKGND event fires.
3550 * (default)
3551 * - "2"/"always": Clear the window on every WM_ERASEBKGND event.
3552 *
3553 * This hint should be set before creating a window.
3554 *
3555 * \since This hint is available since SDL 3.0.0.
3556 */
3557#define SDL_HINT_WINDOWS_ERASE_BACKGROUND_MODE "SDL_WINDOWS_ERASE_BACKGROUND_MODE"
3558
3559/**
3560 * A variable controlling whether back-button-press events on Windows Phone to
3561 * be marked as handled.
3562 *
3563 * Windows Phone devices typically feature a Back button. When pressed, the OS
3564 * will emit back-button-press events, which apps are expected to handle in an
3565 * appropriate manner. If apps do not explicitly mark these events as
3566 * 'Handled', then the OS will invoke its default behavior for unhandled
3567 * back-button-press events, which on Windows Phone 8 and 8.1 is to terminate
3568 * the app (and attempt to switch to the previous app, or to the device's home
3569 * screen).
3570 *
3571 * Setting the SDL_HINT_WINRT_HANDLE_BACK_BUTTON hint to "1" will cause SDL to
3572 * mark back-button-press events as Handled, if and when one is sent to the
3573 * app.
3574 *
3575 * Internally, Windows Phone sends back button events as parameters to special
3576 * back-button-press callback functions. Apps that need to respond to
3577 * back-button-press events are expected to register one or more callback
3578 * functions for such, shortly after being launched (during the app's
3579 * initialization phase). After the back button is pressed, the OS will invoke
3580 * these callbacks. If the app's callback(s) do not explicitly mark the event
3581 * as handled by the time they return, or if the app never registers one of
3582 * these callback, the OS will consider the event un-handled, and it will
3583 * apply its default back button behavior (terminate the app).
3584 *
3585 * SDL registers its own back-button-press callback with the Windows Phone OS.
3586 * This callback will emit a pair of SDL key-press events (SDL_EVENT_KEY_DOWN
3587 * and SDL_EVENT_KEY_UP), each with a scancode of SDL_SCANCODE_AC_BACK, after
3588 * which it will check the contents of the hint,
3589 * SDL_HINT_WINRT_HANDLE_BACK_BUTTON. If the hint's value is set to "1", the
3590 * back button event's Handled property will get set to 'true'. If the hint's
3591 * value is set to something else, or if it is unset, SDL will leave the
3592 * event's Handled property alone. (By default, the OS sets this property to
3593 * 'false', to note.)
3594 *
3595 * SDL apps can either set SDL_HINT_WINRT_HANDLE_BACK_BUTTON well before a
3596 * back button is pressed, or can set it in direct-response to a back button
3597 * being pressed.
3598 *
3599 * In order to get notified when a back button is pressed, SDL apps should
3600 * register a callback function with SDL_AddEventWatch(), and have it listen
3601 * for SDL_EVENT_KEY_DOWN events that have a scancode of SDL_SCANCODE_AC_BACK.
3602 * (Alternatively, SDL_EVENT_KEY_UP events can be listened-for. Listening for
3603 * either event type is suitable.) Any value of
3604 * SDL_HINT_WINRT_HANDLE_BACK_BUTTON set by such a callback, will be applied
3605 * to the OS' current back-button-press event.
3606 *
3607 * More details on back button behavior in Windows Phone apps can be found at
3608 * the following page, on Microsoft's developer site:
3609 * http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj247550(v=vs.105).aspx
3610 *
3611 * \since This hint is available since SDL 3.0.0.
3612 */
3613#define SDL_HINT_WINRT_HANDLE_BACK_BUTTON "SDL_WINRT_HANDLE_BACK_BUTTON"
3614
3615/**
3616 * A variable specifying the label text for a WinRT app's privacy policy link.
3617 *
3618 * Network-enabled WinRT apps must include a privacy policy. On Windows 8,
3619 * 8.1, and RT, Microsoft mandates that this policy be available via the
3620 * Windows Settings charm. SDL provides code to add a link there, with its
3621 * label text being set via the optional hint,
3622 * SDL_HINT_WINRT_PRIVACY_POLICY_LABEL.
3623 *
3624 * Please note that a privacy policy's contents are not set via this hint. A
3625 * separate hint, SDL_HINT_WINRT_PRIVACY_POLICY_URL, is used to link to the
3626 * actual text of the policy.
3627 *
3628 * The contents of this hint should be encoded as a UTF8 string.
3629 *
3630 * The default value is "Privacy Policy".
3631 *
3632 * For additional information on linking to a privacy policy, see the
3633 * documentation for SDL_HINT_WINRT_PRIVACY_POLICY_URL.
3634 *
3635 * This hint should be set before SDL is initialized.
3636 *
3637 * \since This hint is available since SDL 3.0.0.
3638 */
3639#define SDL_HINT_WINRT_PRIVACY_POLICY_LABEL "SDL_WINRT_PRIVACY_POLICY_LABEL"
3640
3641/**
3642 * A variable specifying the URL to a WinRT app's privacy policy.
3643 *
3644 * All network-enabled WinRT apps must make a privacy policy available to its
3645 * users. On Windows 8, 8.1, and RT, Microsoft mandates that this policy be
3646 * available in the Windows Settings charm, as accessed from within the app.
3647 * SDL provides code to add a URL-based link there, which can point to the
3648 * app's privacy policy.
3649 *
3650 * To setup a URL to an app's privacy policy, set
3651 * SDL_HINT_WINRT_PRIVACY_POLICY_URL before calling any SDL_Init() functions.
3652 * The contents of the hint should be a valid URL. For example,
3653 * "http://www.example.com".
3654 *
3655 * The default value is "", which will prevent SDL from adding a privacy
3656 * policy link to the Settings charm. This hint should only be set during app
3657 * init.
3658 *
3659 * The label text of an app's "Privacy Policy" link may be customized via
3660 * another hint, SDL_HINT_WINRT_PRIVACY_POLICY_LABEL.
3661 *
3662 * Please note that on Windows Phone, Microsoft does not provide standard UI
3663 * for displaying a privacy policy link, and as such,
3664 * SDL_HINT_WINRT_PRIVACY_POLICY_URL will not get used on that platform.
3665 * Network-enabled phone apps should display their privacy policy through some
3666 * other, in-app means.
3667 *
3668 * \since This hint is available since SDL 3.0.0.
3669 */
3670#define SDL_HINT_WINRT_PRIVACY_POLICY_URL "SDL_WINRT_PRIVACY_POLICY_URL"
3671
3672/**
3673 * A variable controlling whether X11 windows are marked as override-redirect.
3674 *
3675 * If set, this _might_ increase framerate at the expense of the desktop not
3676 * working as expected. Override-redirect windows aren't noticed by the window
3677 * manager at all.
3678 *
3679 * You should probably only use this for fullscreen windows, and you probably
3680 * shouldn't even use it for that. But it's here if you want to try!
3681 *
3682 * The variable can be set to the following values:
3683 *
3684 * - "0": Do not mark the window as override-redirect. (default)
3685 * - "1": Mark the window as override-redirect.
3686 *
3687 * This hint should be set before creating a window.
3688 *
3689 * \since This hint is available since SDL 3.0.0.
3690 */
3691#define SDL_HINT_X11_FORCE_OVERRIDE_REDIRECT "SDL_X11_FORCE_OVERRIDE_REDIRECT"
3692
3693/**
3694 * A variable specifying the type of an X11 window.
3695 *
3696 * During SDL_CreateWindow, SDL uses the _NET_WM_WINDOW_TYPE X11 property to
3697 * report to the window manager the type of window it wants to create. This
3698 * might be set to various things if SDL_WINDOW_TOOLTIP or
3699 * SDL_WINDOW_POPUP_MENU, etc, were specified. For "normal" windows that
3700 * haven't set a specific type, this hint can be used to specify a custom
3701 * type. For example, a dock window might set this to
3702 * "_NET_WM_WINDOW_TYPE_DOCK".
3703 *
3704 * This hint should be set before creating a window.
3705 *
3706 * \since This hint is available since SDL 3.0.0.
3707 */
3708#define SDL_HINT_X11_WINDOW_TYPE "SDL_X11_WINDOW_TYPE"
3709
3710/**
3711 * A variable controlling whether XInput should be used for controller
3712 * handling.
3713 *
3714 * The variable can be set to the following values:
3715 *
3716 * - "0": XInput is not enabled.
3717 * - "1": XInput is enabled. (default)
3718 *
3719 * This hint should be set before SDL is initialized.
3720 *
3721 * \since This hint is available since SDL 3.0.0.
3722 */
3723#define SDL_HINT_XINPUT_ENABLED "SDL_XINPUT_ENABLED"
3724
3725/**
3726 * An enumeration of hint priorities.
3727 *
3728 * \since This enum is available since SDL 3.0.0.
3729 */
3736
3737
3738/**
3739 * Set a hint with a specific priority.
3740 *
3741 * The priority controls the behavior when setting a hint that already has a
3742 * value. Hints will replace existing hints of their priority and lower.
3743 * Environment variables are considered to have override priority.
3744 *
3745 * \param name the hint to set.
3746 * \param value the value of the hint variable.
3747 * \param priority the SDL_HintPriority level for the hint.
3748 * \returns SDL_TRUE if the hint was set, SDL_FALSE otherwise.
3749 *
3750 * \since This function is available since SDL 3.0.0.
3751 *
3752 * \sa SDL_GetHint
3753 * \sa SDL_ResetHint
3754 * \sa SDL_SetHint
3755 */
3756extern SDL_DECLSPEC SDL_bool SDLCALL SDL_SetHintWithPriority(const char *name,
3757 const char *value,
3758 SDL_HintPriority priority);
3759
3760/**
3761 * Set a hint with normal priority.
3762 *
3763 * Hints will not be set if there is an existing override hint or environment
3764 * variable that takes precedence. You can use SDL_SetHintWithPriority() to
3765 * set the hint with override priority instead.
3766 *
3767 * \param name the hint to set.
3768 * \param value the value of the hint variable.
3769 * \returns SDL_TRUE if the hint was set, SDL_FALSE otherwise.
3770 *
3771 * \since This function is available since SDL 3.0.0.
3772 *
3773 * \sa SDL_GetHint
3774 * \sa SDL_ResetHint
3775 * \sa SDL_SetHintWithPriority
3776 */
3777extern SDL_DECLSPEC SDL_bool SDLCALL SDL_SetHint(const char *name,
3778 const char *value);
3779
3780/**
3781 * Reset a hint to the default value.
3782 *
3783 * This will reset a hint to the value of the environment variable, or NULL if
3784 * the environment isn't set. Callbacks will be called normally with this
3785 * change.
3786 *
3787 * \param name the hint to set.
3788 * \returns SDL_TRUE if the hint was set, SDL_FALSE otherwise.
3789 *
3790 * \since This function is available since SDL 3.0.0.
3791 *
3792 * \sa SDL_SetHint
3793 * \sa SDL_ResetHints
3794 */
3795extern SDL_DECLSPEC SDL_bool SDLCALL SDL_ResetHint(const char *name);
3796
3797/**
3798 * Reset all hints to the default values.
3799 *
3800 * This will reset all hints to the value of the associated environment
3801 * variable, or NULL if the environment isn't set. Callbacks will be called
3802 * normally with this change.
3803 *
3804 * \since This function is available since SDL 3.0.0.
3805 *
3806 * \sa SDL_ResetHint
3807 */
3808extern SDL_DECLSPEC void SDLCALL SDL_ResetHints(void);
3809
3810/**
3811 * Get the value of a hint.
3812 *
3813 * \param name the hint to query.
3814 * \returns the string value of a hint or NULL if the hint isn't set.
3815 *
3816 * \since This function is available since SDL 3.0.0.
3817 *
3818 * \sa SDL_SetHint
3819 * \sa SDL_SetHintWithPriority
3820 */
3821extern SDL_DECLSPEC const char * SDLCALL SDL_GetHint(const char *name);
3822
3823/**
3824 * Get the boolean value of a hint variable.
3825 *
3826 * \param name the name of the hint to get the boolean value from.
3827 * \param default_value the value to return if the hint does not exist.
3828 * \returns the boolean value of a hint or the provided default value if the
3829 * hint does not exist.
3830 *
3831 * \since This function is available since SDL 3.0.0.
3832 *
3833 * \sa SDL_GetHint
3834 * \sa SDL_SetHint
3835 */
3836extern SDL_DECLSPEC SDL_bool SDLCALL SDL_GetHintBoolean(const char *name, SDL_bool default_value);
3837
3838/**
3839 * Type definition of the hint callback function.
3840 *
3841 * \param userdata what was passed as `userdata` to SDL_AddHintCallback().
3842 * \param name what was passed as `name` to SDL_AddHintCallback().
3843 * \param oldValue the previous hint value.
3844 * \param newValue the new value hint is to be set to.
3845 *
3846 * \since This datatype is available since SDL 3.0.0.
3847 */
3848typedef void (SDLCALL *SDL_HintCallback)(void *userdata, const char *name, const char *oldValue, const char *newValue);
3849
3850/**
3851 * Add a function to watch a particular hint.
3852 *
3853 * \param name the hint to watch.
3854 * \param callback an SDL_HintCallback function that will be called when the
3855 * hint value changes.
3856 * \param userdata a pointer to pass to the callback function.
3857 * \returns 0 on success or a negative error code on failure; call
3858 * SDL_GetError() for more information.
3859 *
3860 * \threadsafety It is **NOT** safe to call this function from two threads at
3861 * once.
3862 *
3863 * \since This function is available since SDL 3.0.0.
3864 *
3865 * \sa SDL_DelHintCallback
3866 */
3867extern SDL_DECLSPEC int SDLCALL SDL_AddHintCallback(const char *name,
3868 SDL_HintCallback callback,
3869 void *userdata);
3870
3871/**
3872 * Remove a function watching a particular hint.
3873 *
3874 * \param name the hint being watched.
3875 * \param callback an SDL_HintCallback function that will be called when the
3876 * hint value changes.
3877 * \param userdata a pointer being passed to the callback function.
3878 *
3879 * \since This function is available since SDL 3.0.0.
3880 *
3881 * \sa SDL_AddHintCallback
3882 */
3883extern SDL_DECLSPEC void SDLCALL SDL_DelHintCallback(const char *name,
3884 SDL_HintCallback callback,
3885 void *userdata);
3886
3887/* Ends C function definitions when using C++ */
3888#ifdef __cplusplus
3889}
3890#endif
3891#include <SDL3/SDL_close_code.h>
3892
3893#endif /* SDL_hints_h_ */
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)
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)
int SDL_AddHintCallback(const char *name, SDL_HintCallback callback, void *userdata)
SDL_HintPriority
Definition SDL_hints.h:3731
@ SDL_HINT_DEFAULT
Definition SDL_hints.h:3732
@ SDL_HINT_OVERRIDE
Definition SDL_hints.h:3734
@ SDL_HINT_NORMAL
Definition SDL_hints.h:3733
const char * SDL_GetHint(const char *name)
void(* SDL_HintCallback)(void *userdata, const char *name, const char *oldValue, const char *newValue)
Definition SDL_hints.h:3848
int SDL_bool
Definition SDL_stdinc.h:213