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