SDL 3.0
SDL_hints.h
Go to the documentation of this file.
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * # CategoryHints
24 *
25 * This file contains functions to set and get configuration hints, as well as
26 * listing each of them alphabetically.
27 *
28 * The convention for naming hints is SDL_HINT_X, where "SDL_X" is the
29 * environment variable that can be used to override the default.
30 *
31 * In general these hints are just that - they may or may not be supported or
32 * applicable on any given platform, but they provide a way for an application
33 * or user to give the library a hint as to how they would like the library to
34 * work.
35 */
36
37#ifndef SDL_hints_h_
38#define SDL_hints_h_
39
40#include <SDL3/SDL_error.h>
41#include <SDL3/SDL_stdinc.h>
42
43#include <SDL3/SDL_begin_code.h>
44/* Set up for C function definitions, even when using C++ */
45#ifdef __cplusplus
46extern "C" {
47#endif
48
49/**
50 * Specify the behavior of Alt+Tab while the keyboard is grabbed.
51 *
52 * By default, SDL emulates Alt+Tab functionality while the keyboard is
53 * grabbed and your window is full-screen. This prevents the user from getting
54 * stuck in your application if you've enabled keyboard grab.
55 *
56 * The variable can be set to the following values:
57 *
58 * - "0": SDL will not handle Alt+Tab. Your application is responsible for
59 * handling Alt+Tab while the keyboard is grabbed.
60 * - "1": SDL will minimize your window when Alt+Tab is pressed (default)
61 *
62 * This hint can be set anytime.
63 *
64 * \since This hint is available since SDL 3.2.0.
65 */
66#define SDL_HINT_ALLOW_ALT_TAB_WHILE_GRABBED "SDL_ALLOW_ALT_TAB_WHILE_GRABBED"
67
68/**
69 * A variable to control whether the SDL activity is allowed to be re-created.
70 *
71 * If this hint is true, the activity can be recreated on demand by the OS,
72 * and Java static data and C++ static data remain with their current values.
73 * If this hint is false, then SDL will call exit() when you return from your
74 * main function and the application will be terminated and then started fresh
75 * each time.
76 *
77 * The variable can be set to the following values:
78 *
79 * - "0": The application starts fresh at each launch. (default)
80 * - "1": The application activity can be recreated by the OS.
81 *
82 * This hint can be set anytime.
83 *
84 * \since This hint is available since SDL 3.2.0.
85 */
86#define SDL_HINT_ANDROID_ALLOW_RECREATE_ACTIVITY "SDL_ANDROID_ALLOW_RECREATE_ACTIVITY"
87
88/**
89 * A variable to control whether the event loop will block itself when the app
90 * is paused.
91 *
92 * The variable can be set to the following values:
93 *
94 * - "0": Non blocking.
95 * - "1": Blocking. (default)
96 *
97 * This hint should be set before SDL is initialized.
98 *
99 * \since This hint is available since SDL 3.2.0.
100 */
101#define SDL_HINT_ANDROID_BLOCK_ON_PAUSE "SDL_ANDROID_BLOCK_ON_PAUSE"
102
103/**
104 * A variable to control whether low latency audio should be enabled.
105 *
106 * Some devices have poor quality output when this is enabled, but this is
107 * usually an improvement in audio latency.
108 *
109 * The variable can be set to the following values:
110 *
111 * - "0": Low latency audio is not enabled.
112 * - "1": Low latency audio is enabled. (default)
113 *
114 * This hint should be set before SDL audio is initialized.
115 *
116 * \since This hint is available since SDL 3.2.0.
117 */
118#define SDL_HINT_ANDROID_LOW_LATENCY_AUDIO "SDL_ANDROID_LOW_LATENCY_AUDIO"
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.2.0.
140 */
141#define SDL_HINT_ANDROID_TRAP_BACK_BUTTON "SDL_ANDROID_TRAP_BACK_BUTTON"
142
143/**
144 * A variable to control whether we allow persistent folder access on Android
145 * when using the SDL select folder dialog.
146 *
147 * If set to `1`, the selected folder will be accessible persistently across
148 * app launches. That allows the user to only have to select the directory
149 * once, and then the app can access it again in the future without needing to
150 * ask the user to select it again.
151 *
152 * The variable can be set to the following values:
153 *
154 * - "0": Persistent folder access is not allowed. (default)
155 * - "1": Persistent folder access is allowed.
156 *
157 * This hint should be set before the SDL folder selection dialog is shown,
158 * and can be changed between dialog invocations.
159 *
160 * \since This hint is available since SDL 3.6.0.
161 */
162#define SDL_HINT_ANDROID_ALLOW_PERSISTENT_FOLDER_ACCESS "SDL_ANDROID_ALLOW_PERSISTENT_FOLDER_ACCESS"
163
164/**
165 * A variable setting the app ID string.
166 *
167 * This string is used by desktop compositors to identify and group windows
168 * together, as well as match applications with associated desktop settings
169 * and icons.
170 *
171 * This will override SDL_PROP_APP_METADATA_IDENTIFIER_STRING, if set by the
172 * application.
173 *
174 * This hint should be set before SDL is initialized.
175 *
176 * \since This hint is available since SDL 3.2.0.
177 */
178#define SDL_HINT_APP_ID "SDL_APP_ID"
179
180/**
181 * A variable setting the application name.
182 *
183 * This hint lets you specify the application name sent to the OS when
184 * required. For example, this will often appear in volume control applets for
185 * audio streams, and in lists of applications which are inhibiting the
186 * screensaver. You should use a string that describes your program ("My Game
187 * 2: The Revenge")
188 *
189 * This will override SDL_PROP_APP_METADATA_NAME_STRING, if set by the
190 * application.
191 *
192 * This hint should be set before SDL is initialized.
193 *
194 * \since This hint is available since SDL 3.2.0.
195 */
196#define SDL_HINT_APP_NAME "SDL_APP_NAME"
197
198/**
199 * A variable controlling whether controllers used with the Apple TV generate
200 * UI events.
201 *
202 * When UI events are generated by controller input, the app will be
203 * backgrounded when the Apple TV remote's menu button is pressed, and when
204 * the pause or B buttons on gamepads are pressed.
205 *
206 * More information about properly making use of controllers for the Apple TV
207 * can be found here:
208 * https://developer.apple.com/tvos/human-interface-guidelines/remote-and-controllers/
209 *
210 * The variable can be set to the following values:
211 *
212 * - "0": Controller input does not generate UI events. (default)
213 * - "1": Controller input generates UI events.
214 *
215 * This hint can be set anytime.
216 *
217 * \since This hint is available since SDL 3.2.0.
218 */
219#define SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS "SDL_APPLE_TV_CONTROLLER_UI_EVENTS"
220
221/**
222 * A variable controlling whether the Apple TV remote's joystick axes will
223 * automatically match the rotation of the remote.
224 *
225 * The variable can be set to the following values:
226 *
227 * - "0": Remote orientation does not affect joystick axes. (default)
228 * - "1": Joystick axes are based on the orientation of the remote.
229 *
230 * This hint can be set anytime.
231 *
232 * \since This hint is available since SDL 3.2.0.
233 */
234#define SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION "SDL_APPLE_TV_REMOTE_ALLOW_ROTATION"
235
236/**
237 * Specify the default ALSA audio device name.
238 *
239 * This variable is a specific audio device to open when the "default" audio
240 * device is used.
241 *
242 * This hint will be ignored when opening the default playback device if
243 * SDL_HINT_AUDIO_ALSA_DEFAULT_PLAYBACK_DEVICE is set, or when opening the
244 * default recording device if SDL_HINT_AUDIO_ALSA_DEFAULT_RECORDING_DEVICE is
245 * set.
246 *
247 * This hint should be set before an audio device is opened.
248 *
249 * \since This hint is available since SDL 3.2.0.
250 *
251 * \sa SDL_HINT_AUDIO_ALSA_DEFAULT_PLAYBACK_DEVICE
252 * \sa SDL_HINT_AUDIO_ALSA_DEFAULT_RECORDING_DEVICE
253 */
254#define SDL_HINT_AUDIO_ALSA_DEFAULT_DEVICE "SDL_AUDIO_ALSA_DEFAULT_DEVICE"
255
256/**
257 * Specify the default ALSA audio playback device name.
258 *
259 * This variable is a specific audio device to open for playback, when the
260 * "default" audio device is used.
261 *
262 * If this hint isn't set, SDL will check SDL_HINT_AUDIO_ALSA_DEFAULT_DEVICE
263 * before choosing a reasonable default.
264 *
265 * This hint should be set before an audio device is opened.
266 *
267 * \since This hint is available since SDL 3.2.0.
268 *
269 * \sa SDL_HINT_AUDIO_ALSA_DEFAULT_RECORDING_DEVICE
270 * \sa SDL_HINT_AUDIO_ALSA_DEFAULT_DEVICE
271 */
272#define SDL_HINT_AUDIO_ALSA_DEFAULT_PLAYBACK_DEVICE "SDL_AUDIO_ALSA_DEFAULT_PLAYBACK_DEVICE"
273
274/**
275 * Specify the default ALSA audio recording device name.
276 *
277 * This variable is a specific audio device to open for recording, when the
278 * "default" audio device is used.
279 *
280 * If this hint isn't set, SDL will check SDL_HINT_AUDIO_ALSA_DEFAULT_DEVICE
281 * before choosing a reasonable default.
282 *
283 * This hint should be set before an audio device is opened.
284 *
285 * \since This hint is available since SDL 3.2.0.
286 *
287 * \sa SDL_HINT_AUDIO_ALSA_DEFAULT_PLAYBACK_DEVICE
288 * \sa SDL_HINT_AUDIO_ALSA_DEFAULT_DEVICE
289 */
290#define SDL_HINT_AUDIO_ALSA_DEFAULT_RECORDING_DEVICE "SDL_AUDIO_ALSA_DEFAULT_RECORDING_DEVICE"
291
292/**
293 * A variable controlling the audio category on iOS and macOS.
294 *
295 * The variable can be set to the following values:
296 *
297 * - "playback": Use the AVAudioSessionCategoryPlayback category. (default)
298 * - "ambient": Use the AVAudioSessionCategoryAmbient audio category, will be
299 * muted by the phone mute switch.
300 *
301 * For more information, see Apple's documentation:
302 * https://developer.apple.com/library/content/documentation/Audio/Conceptual/AudioSessionProgrammingGuide/AudioSessionCategoriesandModes/AudioSessionCategoriesandModes.html
303 *
304 * This hint should be set before an audio device is opened.
305 *
306 * \since This hint is available since SDL 3.2.0.
307 */
308#define SDL_HINT_AUDIO_CATEGORY "SDL_AUDIO_CATEGORY"
309
310/**
311 * A variable controlling the default audio channel count.
312 *
313 * If the application doesn't specify the audio channel count when opening the
314 * device, this hint can be used to specify a default channel count that will
315 * be used. This defaults to "1" for recording and "2" for playback devices.
316 *
317 * This hint should be set before an audio device is opened.
318 *
319 * \since This hint is available since SDL 3.2.0.
320 */
321#define SDL_HINT_AUDIO_CHANNELS "SDL_AUDIO_CHANNELS"
322
323/**
324 * Specify an application icon name for an audio device.
325 *
326 * Some audio backends (such as Pulseaudio and Pipewire) allow you to set an
327 * XDG icon name for your application. Among other things, this icon might
328 * show up in a system control panel that lets the user adjust the volume on
329 * specific audio streams instead of using one giant master volume slider.
330 * Note that this is unrelated to the icon used by the windowing system, which
331 * may be set with SDL_SetWindowIcon (or via desktop file on Wayland).
332 *
333 * Setting this to "" or leaving it unset will have SDL use a reasonable
334 * default, "applications-games", which is likely to be installed. See
335 * https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html
336 * and
337 * https://specifications.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html
338 * for the relevant XDG icon specs.
339 *
340 * This hint should be set before an audio device is opened.
341 *
342 * \since This hint is available since SDL 3.2.0.
343 */
344#define SDL_HINT_AUDIO_DEVICE_APP_ICON_NAME "SDL_AUDIO_DEVICE_APP_ICON_NAME"
345
346/**
347 * A variable controlling device buffer size.
348 *
349 * This hint is an integer > 0, that represents the size of the device's
350 * buffer in sample frames (stereo audio data in 16-bit format is 4 bytes per
351 * sample frame, for example).
352 *
353 * SDL3 generally decides this value on behalf of the app, but if for some
354 * reason the app needs to dictate this (because they want either lower
355 * latency or higher throughput AND ARE WILLING TO DEAL WITH what that might
356 * require of the app), they can specify it.
357 *
358 * SDL will try to accommodate this value, but there is no promise you'll get
359 * the buffer size requested. Many platforms won't honor this request at all,
360 * or might adjust it.
361 *
362 * This hint should be set before an audio device is opened.
363 *
364 * \since This hint is available since SDL 3.2.0.
365 */
366#define SDL_HINT_AUDIO_DEVICE_SAMPLE_FRAMES "SDL_AUDIO_DEVICE_SAMPLE_FRAMES"
367
368/**
369 * Specify an audio stream name for an audio device.
370 *
371 * Some audio backends (such as PulseAudio) allow you to describe your audio
372 * stream. Among other things, this description might show up in a system
373 * control panel that lets the user adjust the volume on specific audio
374 * streams instead of using one giant master volume slider.
375 *
376 * This hints lets you transmit that information to the OS. The contents of
377 * this hint are used while opening an audio device. You should use a string
378 * that describes your what your program is playing ("audio stream" is
379 * probably sufficient in many cases, but this could be useful for something
380 * like "team chat" if you have a headset playing VoIP audio separately).
381 *
382 * Setting this to "" or leaving it unset will have SDL use a reasonable
383 * default: "audio stream" or something similar.
384 *
385 * Note that while this talks about audio streams, this is an OS-level
386 * concept, so it applies to a physical audio device in this case, and not an
387 * SDL_AudioStream, nor an SDL logical audio device.
388 *
389 * This hint should be set before an audio device is opened.
390 *
391 * \since This hint is available since SDL 3.2.0.
392 */
393#define SDL_HINT_AUDIO_DEVICE_STREAM_NAME "SDL_AUDIO_DEVICE_STREAM_NAME"
394
395/**
396 * Specify an application role for an audio device.
397 *
398 * Some audio backends (such as Pipewire) allow you to describe the role of
399 * your audio stream. Among other things, this description might show up in a
400 * system control panel or software for displaying and manipulating media
401 * playback/recording graphs.
402 *
403 * This hints lets you transmit that information to the OS. The contents of
404 * this hint are used while opening an audio device. You should use a string
405 * that describes your what your program is playing (Game, Music, Movie,
406 * etc...).
407 *
408 * Setting this to "" or leaving it unset will have SDL use a reasonable
409 * default: "Game" or something similar.
410 *
411 * Note that while this talks about audio streams, this is an OS-level
412 * concept, so it applies to a physical audio device in this case, and not an
413 * SDL_AudioStream, nor an SDL logical audio device.
414 *
415 * For Windows WASAPI audio, the following roles are supported, and map to
416 * `AUDIO_STREAM_CATEGORY`:
417 *
418 * - "Other" (default)
419 * - "Communications" - Real-time communications, such as VOIP or chat
420 * - "Game" - Game audio
421 * - "GameChat" - Game chat audio, similar to "Communications" except that
422 * this will not attenuate other audio streams
423 * - "Movie" - Music or sound with dialog
424 * - "Media" - Music or sound without dialog
425 *
426 * Android's AAudio target supports this hint as of SDL 3.4.4. Android does
427 * not support the exact same options as WASAPI, but for portability, will
428 * attempt to map these same strings to the `aaudio_usage_t` constants. For
429 * example, "Movie" and "Media" will both map to `AAUDIO_USAGE_MEDIA`, etc.
430 *
431 * If your application applies its own echo cancellation, gain control, and
432 * noise reduction it should also set SDL_HINT_AUDIO_DEVICE_RAW_STREAM.
433 *
434 * This hint should be set before an audio device is opened.
435 *
436 * \since This hint is available since SDL 3.2.0.
437 */
438#define SDL_HINT_AUDIO_DEVICE_STREAM_ROLE "SDL_AUDIO_DEVICE_STREAM_ROLE"
439
440/**
441 * Specify whether this audio device should do audio processing.
442 *
443 * Some operating systems perform echo cancellation, gain control, and noise
444 * reduction as needed. If your application already handles these, you can set
445 * this hint to prevent the OS from doing additional audio processing.
446 *
447 * This corresponds to the WASAPI audio option `AUDCLNT_STREAMOPTIONS_RAW`.
448 *
449 * The variable can be set to the following values:
450 *
451 * - "0": audio processing can be done by the OS. (default)
452 * - "1": audio processing is done by the application.
453 *
454 * This hint should be set before an audio device is opened.
455 *
456 * \since This hint is available since SDL 3.4.0.
457 */
458#define SDL_HINT_AUDIO_DEVICE_RAW_STREAM "SDL_AUDIO_DEVICE_RAW_STREAM"
459
460/**
461 * Specify the input file when recording audio using the disk audio driver.
462 *
463 * This defaults to "sdlaudio-in.raw"
464 *
465 * This hint should be set before an audio device is opened.
466 *
467 * \since This hint is available since SDL 3.2.0.
468 */
469#define SDL_HINT_AUDIO_DISK_INPUT_FILE "SDL_AUDIO_DISK_INPUT_FILE"
470
471/**
472 * Specify the output file when playing audio using the disk audio driver.
473 *
474 * This defaults to "sdlaudio.raw"
475 *
476 * This hint should be set before an audio device is opened.
477 *
478 * \since This hint is available since SDL 3.2.0.
479 */
480#define SDL_HINT_AUDIO_DISK_OUTPUT_FILE "SDL_AUDIO_DISK_OUTPUT_FILE"
481
482/**
483 * A variable controlling the audio rate when using the disk audio driver.
484 *
485 * The disk audio driver normally simulates real-time for the audio rate that
486 * was specified, but you can use this variable to adjust this rate higher or
487 * lower down to 0. The default value is "1.0".
488 *
489 * This hint should be set before an audio device is opened.
490 *
491 * \since This hint is available since SDL 3.2.0.
492 */
493#define SDL_HINT_AUDIO_DISK_TIMESCALE "SDL_AUDIO_DISK_TIMESCALE"
494
495/**
496 * A variable that specifies an audio backend to use.
497 *
498 * By default, SDL will try all available audio backends in a reasonable order
499 * until it finds one that can work, but this hint allows the app or user to
500 * force a specific driver, such as "pipewire" if, say, you are on PulseAudio
501 * but want to try talking to the lower level instead.
502 *
503 * This hint should be set before SDL is initialized.
504 *
505 * \since This hint is available since SDL 3.2.0.
506 */
507#define SDL_HINT_AUDIO_DRIVER "SDL_AUDIO_DRIVER"
508
509/**
510 * Specify whether this audio stream should duck other audio.
511 *
512 * On Apple platforms, this hint controls whether other audio streams are
513 * ducked (reduced in volume) while your application is in the foreground.
514 *
515 * The variable can be set to the following values:
516 *
517 * - "0": Other audio will not be ducked. (default)
518 * - "1": Other audio will be ducked.
519 *
520 * This hint should be set before an audio device is opened.
521 *
522 * \since This hint is available since SDL 3.6.0.
523 */
524#define SDL_HINT_AUDIO_DUCK_OTHERS "SDL_AUDIO_DUCK_OTHERS"
525
526/**
527 * A variable controlling the audio rate when using the dummy audio driver.
528 *
529 * The dummy audio driver normally simulates real-time for the audio rate that
530 * was specified, but you can use this variable to adjust this rate higher or
531 * lower down to 0. The default value is "1.0".
532 *
533 * This hint should be set before an audio device is opened.
534 *
535 * \since This hint is available since SDL 3.2.0.
536 */
537#define SDL_HINT_AUDIO_DUMMY_TIMESCALE "SDL_AUDIO_DUMMY_TIMESCALE"
538
539/**
540 * A variable controlling the default audio format.
541 *
542 * If the application doesn't specify the audio format when opening the
543 * device, this hint can be used to specify a default format that will be
544 * used.
545 *
546 * The variable can be set to the following values:
547 *
548 * - "U8": Unsigned 8-bit audio
549 * - "S8": Signed 8-bit audio
550 * - "S16LE": Signed 16-bit little-endian audio
551 * - "S16BE": Signed 16-bit big-endian audio
552 * - "S16": Signed 16-bit native-endian audio (default)
553 * - "S32LE": Signed 32-bit little-endian audio
554 * - "S32BE": Signed 32-bit big-endian audio
555 * - "S32": Signed 32-bit native-endian audio
556 * - "F32LE": Floating point little-endian audio
557 * - "F32BE": Floating point big-endian audio
558 * - "F32": Floating point native-endian audio
559 *
560 * This hint should be set before an audio device is opened.
561 *
562 * \since This hint is available since SDL 3.2.0.
563 */
564#define SDL_HINT_AUDIO_FORMAT "SDL_AUDIO_FORMAT"
565
566/**
567 * A variable controlling the default audio frequency.
568 *
569 * If the application doesn't specify the audio frequency when opening the
570 * device, this hint can be used to specify a default frequency that will be
571 * used. This defaults to "44100".
572 *
573 * This hint should be set before an audio device is opened.
574 *
575 * \since This hint is available since SDL 3.2.0.
576 */
577#define SDL_HINT_AUDIO_FREQUENCY "SDL_AUDIO_FREQUENCY"
578
579/**
580 * A variable that causes SDL to not ignore audio "monitors".
581 *
582 * This is currently only used by the PulseAudio driver.
583 *
584 * By default, SDL ignores audio devices that aren't associated with physical
585 * hardware. Changing this hint to "1" will expose anything SDL sees that
586 * appears to be an audio source or sink. This will add "devices" to the list
587 * that the user probably doesn't want or need, but it can be useful in
588 * scenarios where you want to hook up SDL to some sort of virtual device,
589 * etc.
590 *
591 * The variable can be set to the following values:
592 *
593 * - "0": Audio monitor devices will be ignored. (default)
594 * - "1": Audio monitor devices will show up in the device list.
595 *
596 * This hint should be set before SDL is initialized.
597 *
598 * \since This hint is available since SDL 3.2.0.
599 */
600#define SDL_HINT_AUDIO_INCLUDE_MONITORS "SDL_AUDIO_INCLUDE_MONITORS"
601
602/**
603 * A variable controlling whether SDL updates joystick state when getting
604 * input events.
605 *
606 * The variable can be set to the following values:
607 *
608 * - "0": You'll call SDL_UpdateJoysticks() manually.
609 * - "1": SDL will automatically call SDL_UpdateJoysticks(). (default)
610 *
611 * This hint can be set anytime.
612 *
613 * \since This hint is available since SDL 3.2.0.
614 */
615#define SDL_HINT_AUTO_UPDATE_JOYSTICKS "SDL_AUTO_UPDATE_JOYSTICKS"
616
617/**
618 * A variable controlling whether SDL updates sensor state when getting input
619 * events.
620 *
621 * The variable can be set to the following values:
622 *
623 * - "0": You'll call SDL_UpdateSensors() manually.
624 * - "1": SDL will automatically call SDL_UpdateSensors(). (default)
625 *
626 * This hint can be set anytime.
627 *
628 * \since This hint is available since SDL 3.2.0.
629 */
630#define SDL_HINT_AUTO_UPDATE_SENSORS "SDL_AUTO_UPDATE_SENSORS"
631
632/**
633 * Prevent SDL from using version 4 of the bitmap header when saving BMPs.
634 *
635 * The bitmap header version 4 is required for proper alpha channel support
636 * and SDL will use it when required. Should this not be desired, this hint
637 * can force the use of the 40 byte header version which is supported
638 * everywhere.
639 *
640 * The variable can be set to the following values:
641 *
642 * - "0": Surfaces with a colorkey or an alpha channel are saved to a 32-bit
643 * BMP file with an alpha mask. SDL will use the bitmap header version 4 and
644 * set the alpha mask accordingly. (default)
645 * - "1": Surfaces with a colorkey or an alpha channel are saved to a 32-bit
646 * BMP file without an alpha mask. The alpha channel data will be in the
647 * file, but applications are going to ignore it.
648 *
649 * This hint can be set anytime.
650 *
651 * \since This hint is available since SDL 3.2.0.
652 */
653#define SDL_HINT_BMP_SAVE_LEGACY_FORMAT "SDL_BMP_SAVE_LEGACY_FORMAT"
654
655/**
656 * A variable that decides what camera backend to use.
657 *
658 * By default, SDL will try all available camera backends in a reasonable
659 * order until it finds one that can work, but this hint allows the app or
660 * user to force a specific target, such as "directshow" if, say, you are on
661 * Windows Media Foundations but want to try DirectShow instead.
662 *
663 * The default value is unset, in which case SDL will try to figure out the
664 * best camera backend on your behalf. This hint needs to be set before
665 * SDL_Init() is called to be useful.
666 *
667 * \since This hint is available since SDL 3.2.0.
668 */
669#define SDL_HINT_CAMERA_DRIVER "SDL_CAMERA_DRIVER"
670
671/**
672 * A variable that limits what CPU features are available.
673 *
674 * By default, SDL marks all features the current CPU supports as available.
675 * This hint allows the enabled features to be limited to a subset.
676 *
677 * When the hint is unset, or empty, SDL will enable all detected CPU
678 * features.
679 *
680 * The variable can be set to a comma separated list containing the following
681 * items:
682 *
683 * - "all"
684 * - "altivec"
685 * - "sse"
686 * - "sse2"
687 * - "sse3"
688 * - "sse41"
689 * - "sse42"
690 * - "avx"
691 * - "avx2"
692 * - "avx512f"
693 * - "arm-simd"
694 * - "neon"
695 * - "sve2"
696 * - "lsx"
697 * - "lasx"
698 *
699 * The items can be prefixed by '+'/'-' to add/remove features.
700 *
701 * \since This hint is available since SDL 3.2.0.
702 */
703#define SDL_HINT_CPU_FEATURE_MASK "SDL_CPU_FEATURE_MASK"
704
705/**
706 * A variable controlling whether DirectInput should be used for controllers.
707 *
708 * The variable can be set to the following values:
709 *
710 * - "0": Disable DirectInput detection.
711 * - "1": Enable DirectInput detection. (default)
712 *
713 * This hint should be set before SDL is initialized.
714 *
715 * \since This hint is available since SDL 3.2.0.
716 */
717#define SDL_HINT_JOYSTICK_DIRECTINPUT "SDL_JOYSTICK_DIRECTINPUT"
718
719/**
720 * A variable that specifies a dialog backend to use.
721 *
722 * By default, SDL will try all available dialog backends in a reasonable
723 * order until it finds one that can work, but this hint allows the app or
724 * user to force a specific target.
725 *
726 * If the specified target does not exist or is not available, the
727 * dialog-related function calls will fail.
728 *
729 * This hint currently only applies to platforms using the generic "Unix"
730 * dialog implementation, but may be extended to more platforms in the future.
731 * Note that some Unix and Unix-like platforms have their own implementation,
732 * such as macOS and Haiku.
733 *
734 * The variable can be set to the following values:
735 *
736 * - NULL: Select automatically (default, all platforms)
737 * - "portal": Use XDG Portals through DBus (Unix only)
738 * - "zenity": Use the Zenity program (Unix only)
739 *
740 * More options may be added in the future.
741 *
742 * This hint can be set anytime.
743 *
744 * \since This hint is available since SDL 3.2.0.
745 */
746#define SDL_HINT_FILE_DIALOG_DRIVER "SDL_FILE_DIALOG_DRIVER"
747
748/**
749 * Override for SDL_GetDisplayUsableBounds().
750 *
751 * If set, this hint will override the expected results for
752 * SDL_GetDisplayUsableBounds() for display index 0. Generally you don't want
753 * to do this, but this allows an embedded system to request that some of the
754 * screen be reserved for other uses when paired with a well-behaved
755 * application.
756 *
757 * The contents of this hint must be 4 comma-separated integers, the first is
758 * the bounds x, then y, width and height, in that order.
759 *
760 * This hint can be set anytime.
761 *
762 * \since This hint is available since SDL 3.2.0.
763 */
764#define SDL_HINT_DISPLAY_USABLE_BOUNDS "SDL_DISPLAY_USABLE_BOUNDS"
765
766/**
767 * A variable that enables a fast framebuffer path on DOS.
768 *
769 * When set to "1", SDL_UpdateWindowSurface() copies the system-RAM surface
770 * directly to VRAM and skips software cursor compositing and vsync.
771 *
772 * The variable can be set to the following values:
773 *
774 * - "0": Use the normal path with cursor compositing and vsync. (default)
775 * - "1": Use the fast direct-to-VRAM path when available.
776 *
777 * This hint must be set before the first call to SDL_GetWindowSurface().
778 *
779 * \since This hint is available since SDL 3.6.0.
780 */
781#define SDL_HINT_DOS_ALLOW_DIRECT_FRAMEBUFFER "SDL_DOS_ALLOW_DIRECT_FRAMEBUFFER"
782
783/**
784 * Set the level of checking for invalid parameters passed to SDL functions.
785 *
786 * The variable can be set to the following values:
787 *
788 * - "1": Enable fast parameter error checking, e.g. quick NULL checks, etc.
789 * - "2": Enable full parameter error checking, e.g. validating objects are
790 * the correct type, etc. (default)
791 *
792 * This hint can be set anytime.
793 *
794 * \since This hint is available since SDL 3.4.0.
795 */
796#define SDL_HINT_INVALID_PARAM_CHECKS "SDL_INVALID_PARAM_CHECKS"
797
798/**
799 * Disable giving back control to the browser automatically when running with
800 * asyncify.
801 *
802 * With -s ASYNCIFY, SDL calls emscripten_sleep during operations such as
803 * refreshing the screen or polling events.
804 *
805 * This hint only applies to the emscripten platform.
806 *
807 * The variable can be set to the following values:
808 *
809 * - "0": Disable emscripten_sleep calls (if you give back browser control
810 * manually or use asyncify for other purposes).
811 * - "1": Enable emscripten_sleep calls. (default)
812 *
813 * This hint can be set anytime.
814 *
815 * \since This hint is available since SDL 3.2.0.
816 */
817#define SDL_HINT_EMSCRIPTEN_ASYNCIFY "SDL_EMSCRIPTEN_ASYNCIFY"
818
819/**
820 * Specify the CSS selector used for the "default" window/canvas.
821 *
822 * This hint only applies to the emscripten platform.
823 *
824 * This hint should be set before creating a window.
825 *
826 * \since This hint is available since SDL 3.2.0.
827 */
828#define SDL_HINT_EMSCRIPTEN_CANVAS_SELECTOR "SDL_EMSCRIPTEN_CANVAS_SELECTOR"
829
830/**
831 * Override the binding element for keyboard inputs for Emscripten builds.
832 *
833 * This hint only applies to the emscripten platform.
834 *
835 * The variable can be one of:
836 *
837 * - "#window": the javascript window object
838 * - "#document": the javascript document object
839 * - "#screen": the javascript window.screen object
840 * - "#canvas": the WebGL canvas element
841 * - "#none": Don't bind anything at all
842 * - any other string without a leading # sign applies to the element on the
843 * page with that ID.
844 *
845 * This hint should be set before creating a window.
846 *
847 * \since This hint is available since SDL 3.2.0.
848 */
849#define SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT "SDL_EMSCRIPTEN_KEYBOARD_ELEMENT"
850
851/**
852 * A variable that controls whether the on-screen keyboard should be shown
853 * when text input is active.
854 *
855 * The variable can be set to the following values:
856 *
857 * - "auto": The on-screen keyboard will be shown if there is no physical
858 * keyboard attached. (default)
859 * - "0": Do not show the on-screen keyboard.
860 * - "1": Show the on-screen keyboard, if available.
861 *
862 * This hint must be set before SDL_StartTextInput() is called
863 *
864 * \since This hint is available since SDL 3.2.0.
865 */
866#define SDL_HINT_ENABLE_SCREEN_KEYBOARD "SDL_ENABLE_SCREEN_KEYBOARD"
867
868/**
869 * A variable containing a list of evdev devices to use if udev is not
870 * available.
871 *
872 * The list of devices is in the form:
873 *
874 * deviceclass:path[,deviceclass:path[,...]]
875 *
876 * where device class is an integer representing the SDL_UDEV_deviceclass and
877 * path is the full path to the event device.
878 *
879 * This hint should be set before SDL is initialized.
880 *
881 * \since This hint is available since SDL 3.2.0.
882 */
883#define SDL_HINT_EVDEV_DEVICES "SDL_EVDEV_DEVICES"
884
885/**
886 * A variable controlling verbosity of the logging of SDL events pushed onto
887 * the internal queue.
888 *
889 * The variable can be set to the following values, from least to most
890 * verbose:
891 *
892 * - "0": Don't log any events. (default)
893 * - "1": Log most events (other than the really spammy ones).
894 * - "2": Include mouse and finger motion events.
895 *
896 * This is generally meant to be used to debug SDL itself, but can be useful
897 * for application developers that need better visibility into what is going
898 * on in the event queue. Logged events are sent through SDL_Log(), which
899 * means by default they appear on stdout on most platforms or maybe
900 * OutputDebugString() on Windows, and can be funneled by the app with
901 * SDL_SetLogOutputFunction(), etc.
902 *
903 * This hint can be set anytime.
904 *
905 * \since This hint is available since SDL 3.2.0.
906 */
907#define SDL_HINT_EVENT_LOGGING "SDL_EVENT_LOGGING"
908
909/**
910 * A variable controlling whether raising the window should be done more
911 * forcefully.
912 *
913 * The variable can be set to the following values:
914 *
915 * - "0": Honor the OS policy for raising windows. (default)
916 * - "1": Force the window to be raised, overriding any OS policy.
917 *
918 * At present, this is only an issue under MS Windows, which makes it nearly
919 * impossible to programmatically move a window to the foreground, for
920 * "security" reasons. See http://stackoverflow.com/a/34414846 for a
921 * discussion.
922 *
923 * This hint can be set anytime.
924 *
925 * \since This hint is available since SDL 3.2.0.
926 */
927#define SDL_HINT_FORCE_RAISEWINDOW "SDL_FORCE_RAISEWINDOW"
928
929/**
930 * A variable controlling how 3D acceleration is used to accelerate the SDL
931 * screen surface.
932 *
933 * SDL can try to accelerate the SDL screen surface by using streaming
934 * textures with a 3D rendering engine. This variable controls whether and how
935 * this is done.
936 *
937 * The variable can be set to the following values:
938 *
939 * - "0": Disable 3D acceleration
940 * - "1": Enable 3D acceleration, using the default renderer. (default)
941 * - "X": Enable 3D acceleration, using X where X is one of the valid
942 * rendering drivers. (e.g. "direct3d", "opengl", etc.)
943 *
944 * This hint should be set before calling SDL_GetWindowSurface()
945 *
946 * \since This hint is available since SDL 3.2.0.
947 */
948#define SDL_HINT_FRAMEBUFFER_ACCELERATION "SDL_FRAMEBUFFER_ACCELERATION"
949
950/**
951 * A variable that lets you manually hint extra gamecontroller db entries.
952 *
953 * The variable should be newline delimited rows of gamecontroller config
954 * data, see SDL_gamepad.h
955 *
956 * You can update mappings after SDL is initialized with
957 * SDL_GetGamepadMappingForGUID() and SDL_AddGamepadMapping()
958 *
959 * This hint should be set before SDL is initialized.
960 *
961 * \since This hint is available since SDL 3.2.0.
962 */
963#define SDL_HINT_GAMECONTROLLERCONFIG "SDL_GAMECONTROLLERCONFIG"
964
965/**
966 * A variable that lets you provide a file with extra gamecontroller db
967 * entries.
968 *
969 * The file should contain lines of gamecontroller config data, see
970 * SDL_gamepad.h
971 *
972 * You can update mappings after SDL is initialized with
973 * SDL_GetGamepadMappingForGUID() and SDL_AddGamepadMapping()
974 *
975 * This hint should be set before SDL is initialized.
976 *
977 * \since This hint is available since SDL 3.2.0.
978 */
979#define SDL_HINT_GAMECONTROLLERCONFIG_FILE "SDL_GAMECONTROLLERCONFIG_FILE"
980
981/**
982 * A variable that overrides the automatic controller type detection.
983 *
984 * The variable should be comma separated entries, in the form: VID/PID=type
985 *
986 * The VID and PID should be hexadecimal with exactly 4 digits, e.g. 0x00fd
987 *
988 * This hint affects what low level protocol is used with the HIDAPI driver.
989 *
990 * The variable can be set to the following values:
991 *
992 * - "Xbox360"
993 * - "XboxOne"
994 * - "PS3"
995 * - "PS4"
996 * - "PS5"
997 * - "SwitchPro"
998 *
999 * This hint should be set before SDL is initialized.
1000 *
1001 * \since This hint is available since SDL 3.2.0.
1002 */
1003#define SDL_HINT_GAMECONTROLLERTYPE "SDL_GAMECONTROLLERTYPE"
1004
1005/**
1006 * A variable containing a list of devices to skip when scanning for game
1007 * controllers.
1008 *
1009 * The format of the string is a comma separated list of USB VID/PID pairs in
1010 * hexadecimal form, e.g.
1011 *
1012 * 0xAAAA/0xBBBB,0xCCCC/0xDDDD
1013 *
1014 * The variable can also take the form of "@file", in which case the named
1015 * file will be loaded and interpreted as the value of the variable.
1016 *
1017 * This hint can be set anytime.
1018 *
1019 * \since This hint is available since SDL 3.2.0.
1020 */
1021#define SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES "SDL_GAMECONTROLLER_IGNORE_DEVICES"
1022
1023/**
1024 * If set, all devices will be skipped when scanning for game controllers
1025 * except for the ones listed in this variable.
1026 *
1027 * The format of the string is a comma separated list of USB VID/PID pairs in
1028 * hexadecimal form, e.g.
1029 *
1030 * 0xAAAA/0xBBBB,0xCCCC/0xDDDD
1031 *
1032 * The variable can also take the form of "@file", in which case the named
1033 * file will be loaded and interpreted as the value of the variable.
1034 *
1035 * This hint can be set anytime.
1036 *
1037 * \since This hint is available since SDL 3.2.0.
1038 */
1039#define SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT "SDL_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT"
1040
1041/**
1042 * A variable that controls whether the device's built-in accelerometer and
1043 * gyro should be used as sensors for gamepads.
1044 *
1045 * The variable can be set to the following values:
1046 *
1047 * - "0": Sensor fusion is disabled
1048 * - "1": Sensor fusion is enabled for all controllers that lack sensors
1049 *
1050 * Or the variable can be a comma separated list of USB VID/PID pairs in
1051 * hexadecimal form, e.g.
1052 *
1053 * 0xAAAA/0xBBBB,0xCCCC/0xDDDD
1054 *
1055 * The variable can also take the form of "@file", in which case the named
1056 * file will be loaded and interpreted as the value of the variable.
1057 *
1058 * This hint should be set before a gamepad is opened.
1059 *
1060 * \since This hint is available since SDL 3.2.0.
1061 */
1062#define SDL_HINT_GAMECONTROLLER_SENSOR_FUSION "SDL_GAMECONTROLLER_SENSOR_FUSION"
1063
1064/**
1065 * This variable sets the default text of the TextInput window on GDK
1066 * platforms.
1067 *
1068 * This hint is available only if SDL_GDK_TEXTINPUT defined.
1069 *
1070 * This hint should be set before calling SDL_StartTextInput()
1071 *
1072 * \since This hint is available since SDL 3.2.0.
1073 */
1074#define SDL_HINT_GDK_TEXTINPUT_DEFAULT_TEXT "SDL_GDK_TEXTINPUT_DEFAULT_TEXT"
1075
1076/**
1077 * This variable sets the description of the TextInput window on GDK
1078 * platforms.
1079 *
1080 * This hint is available only if SDL_GDK_TEXTINPUT defined.
1081 *
1082 * This hint should be set before calling SDL_StartTextInput()
1083 *
1084 * \since This hint is available since SDL 3.2.0.
1085 */
1086#define SDL_HINT_GDK_TEXTINPUT_DESCRIPTION "SDL_GDK_TEXTINPUT_DESCRIPTION"
1087
1088/**
1089 * This variable sets the maximum input length of the TextInput window on GDK
1090 * platforms.
1091 *
1092 * The value must be a stringified integer, for example "10" to allow for up
1093 * to 10 characters of text input.
1094 *
1095 * This hint is available only if SDL_GDK_TEXTINPUT defined.
1096 *
1097 * This hint should be set before calling SDL_StartTextInput()
1098 *
1099 * \since This hint is available since SDL 3.2.0.
1100 */
1101#define SDL_HINT_GDK_TEXTINPUT_MAX_LENGTH "SDL_GDK_TEXTINPUT_MAX_LENGTH"
1102
1103/**
1104 * This variable sets the input scope of the TextInput window on GDK
1105 * platforms.
1106 *
1107 * Set this hint to change the XGameUiTextEntryInputScope value that will be
1108 * passed to the window creation function. The value must be a stringified
1109 * integer, for example "0" for XGameUiTextEntryInputScope::Default.
1110 *
1111 * This hint is available only if SDL_GDK_TEXTINPUT defined.
1112 *
1113 * This hint should be set before calling SDL_StartTextInput()
1114 *
1115 * \since This hint is available since SDL 3.2.0.
1116 */
1117#define SDL_HINT_GDK_TEXTINPUT_SCOPE "SDL_GDK_TEXTINPUT_SCOPE"
1118
1119/**
1120 * This variable sets the title of the TextInput window on GDK platforms.
1121 *
1122 * This hint is available only if SDL_GDK_TEXTINPUT defined.
1123 *
1124 * This hint should be set before calling SDL_StartTextInput()
1125 *
1126 * \since This hint is available since SDL 3.2.0.
1127 */
1128#define SDL_HINT_GDK_TEXTINPUT_TITLE "SDL_GDK_TEXTINPUT_TITLE"
1129
1130/**
1131 * A variable to control whether HIDAPI uses libusb for device access.
1132 *
1133 * By default libusb will only be used for a few devices that require direct
1134 * USB access, and this can be controlled with
1135 * SDL_HINT_HIDAPI_LIBUSB_WHITELIST.
1136 *
1137 * The variable can be set to the following values:
1138 *
1139 * - "0": HIDAPI will not use libusb for device access.
1140 * - "1": HIDAPI will use libusb for device access if available. (default)
1141 *
1142 * This hint should be set before SDL is initialized.
1143 *
1144 * \since This hint is available since SDL 3.2.0.
1145 */
1146#define SDL_HINT_HIDAPI_LIBUSB "SDL_HIDAPI_LIBUSB"
1147
1148
1149/**
1150 * A variable to control whether HIDAPI uses libusb for GameCube adapters.
1151 *
1152 * The variable can be set to the following values:
1153 *
1154 * - "0": HIDAPI will not use libusb for GameCube adapters.
1155 * - "1": HIDAPI will use libusb for GameCube adapters if available. (default)
1156 *
1157 * This hint should be set before SDL is initialized.
1158 *
1159 * \since This hint is available since SDL 3.4.0.
1160 */
1161#define SDL_HINT_HIDAPI_LIBUSB_GAMECUBE "SDL_HIDAPI_LIBUSB_GAMECUBE"
1162
1163/**
1164 * A variable to control whether HIDAPI uses libusb only for whitelisted
1165 * devices.
1166 *
1167 * By default libusb will only be used for a few devices that require direct
1168 * USB access.
1169 *
1170 * The variable can be set to the following values:
1171 *
1172 * - "0": HIDAPI will use libusb for all device access.
1173 * - "1": HIDAPI will use libusb only for whitelisted devices. (default)
1174 *
1175 * This hint should be set before SDL is initialized.
1176 *
1177 * \since This hint is available since SDL 3.2.0.
1178 */
1179#define SDL_HINT_HIDAPI_LIBUSB_WHITELIST "SDL_HIDAPI_LIBUSB_WHITELIST"
1180
1181/**
1182 * A variable to control whether HIDAPI uses udev for device detection.
1183 *
1184 * The variable can be set to the following values:
1185 *
1186 * - "0": HIDAPI will poll for device changes.
1187 * - "1": HIDAPI will use udev for device detection. (default)
1188 *
1189 * This hint should be set before SDL is initialized.
1190 *
1191 * \since This hint is available since SDL 3.2.0.
1192 */
1193#define SDL_HINT_HIDAPI_UDEV "SDL_HIDAPI_UDEV"
1194
1195/**
1196 * A variable that specifies a GPU backend to use.
1197 *
1198 * By default, SDL will try all available GPU backends in a reasonable order
1199 * until it finds one that can work, but this hint allows the app or user to
1200 * force a specific target, such as "direct3d12" if, say, your hardware
1201 * supports Vulkan but you want to try using D3D12 instead.
1202 *
1203 * This hint should be set before any GPU functions are called.
1204 *
1205 * \since This hint is available since SDL 3.2.0.
1206 */
1207#define SDL_HINT_GPU_DRIVER "SDL_GPU_DRIVER"
1208
1209/**
1210 * A variable that specifies the library name to use when loading the OpenXR
1211 * loader.
1212 *
1213 * By default, SDL will try the system default name, but on some platforms
1214 * like Windows, debug builds of the OpenXR loader have a different name, and
1215 * are not always directly compatible with release applications. Setting this
1216 * hint allows you to compensate for this difference in your app when
1217 * applicable.
1218 *
1219 * This hint should be set before the OpenXR loader is loaded. For example,
1220 * creating an OpenXR GPU device will load the OpenXR loader.
1221 */
1222#define SDL_HINT_OPENXR_LIBRARY "SDL_OPENXR_LIBRARY"
1223
1224/**
1225 * A variable to control whether SDL_hid_enumerate() enumerates all HID
1226 * devices or only controllers.
1227 *
1228 * The variable can be set to the following values:
1229 *
1230 * - "0": SDL_hid_enumerate() will enumerate all HID devices.
1231 * - "1": SDL_hid_enumerate() will only enumerate controllers. (default)
1232 *
1233 * By default SDL will only enumerate controllers, to reduce risk of hanging
1234 * or crashing on devices with bad drivers and avoiding macOS keyboard capture
1235 * permission prompts.
1236 *
1237 * This hint can be set anytime.
1238 *
1239 * \since This hint is available since SDL 3.2.0.
1240 */
1241#define SDL_HINT_HIDAPI_ENUMERATE_ONLY_CONTROLLERS "SDL_HIDAPI_ENUMERATE_ONLY_CONTROLLERS"
1242
1243/**
1244 * A variable containing a list of devices to ignore in SDL_hid_enumerate().
1245 *
1246 * The format of the string is a comma separated list of USB VID/PID pairs in
1247 * hexadecimal form, e.g.
1248 *
1249 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
1250 *
1251 * For example, to ignore the Shanwan DS3 controller and any Valve controller,
1252 * you might use the string "0x2563/0x0523,0x28de/0x0000"
1253 *
1254 * This hint can be set anytime.
1255 *
1256 * \since This hint is available since SDL 3.2.0.
1257 */
1258#define SDL_HINT_HIDAPI_IGNORE_DEVICES "SDL_HIDAPI_IGNORE_DEVICES"
1259
1260/**
1261 * A variable describing what IME UI elements the application can display.
1262 *
1263 * By default IME UI is handled using native components by the OS where
1264 * possible, however this can interfere with or not be visible when exclusive
1265 * fullscreen mode is used.
1266 *
1267 * The variable can be set to a comma separated list containing the following
1268 * items:
1269 *
1270 * - "none" or "0": The application can't render any IME elements, and native
1271 * UI should be used. (default)
1272 * - "composition": The application handles SDL_EVENT_TEXT_EDITING events and
1273 * can render the composition text.
1274 * - "candidates": The application handles SDL_EVENT_TEXT_EDITING_CANDIDATES
1275 * and can render the candidate list.
1276 *
1277 * This hint should be set before SDL is initialized.
1278 *
1279 * \since This hint is available since SDL 3.2.0.
1280 */
1281#define SDL_HINT_IME_IMPLEMENTED_UI "SDL_IME_IMPLEMENTED_UI"
1282
1283/**
1284 * A variable controlling whether the home indicator bar on iPhone X and later
1285 * should be hidden.
1286 *
1287 * The variable can be set to the following values:
1288 *
1289 * - "0": The indicator bar is not hidden. (default for windowed applications)
1290 * - "1": The indicator bar is hidden and is shown when the screen is touched
1291 * (useful for movie playback applications).
1292 * - "2": The indicator bar is dim and the first swipe makes it visible and
1293 * the second swipe performs the "home" action. (default for fullscreen
1294 * applications)
1295 *
1296 * This hint can be set anytime.
1297 *
1298 * \since This hint is available since SDL 3.2.0.
1299 */
1300#define SDL_HINT_IOS_HIDE_HOME_INDICATOR "SDL_IOS_HIDE_HOME_INDICATOR"
1301
1302/**
1303 * A variable that lets you enable joystick (and gamecontroller) events even
1304 * when your app is in the background.
1305 *
1306 * The variable can be set to the following values:
1307 *
1308 * - "0": Disable joystick & gamecontroller input events when the application
1309 * is in the background. (default)
1310 * - "1": Enable joystick & gamecontroller input events when the application
1311 * is in the background.
1312 *
1313 * This hint can be set anytime.
1314 *
1315 * \since This hint is available since SDL 3.2.0.
1316 */
1317#define SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS "SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS"
1318
1319/**
1320 * A variable containing a list of arcade stick style controllers.
1321 *
1322 * The format of the string is a comma separated list of USB VID/PID pairs in
1323 * hexadecimal form, e.g.
1324 *
1325 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
1326 *
1327 * The variable can also take the form of "@file", in which case the named
1328 * file will be loaded and interpreted as the value of the variable.
1329 *
1330 * This hint can be set anytime.
1331 *
1332 * \since This hint is available since SDL 3.2.0.
1333 */
1334#define SDL_HINT_JOYSTICK_ARCADESTICK_DEVICES "SDL_JOYSTICK_ARCADESTICK_DEVICES"
1335
1336/**
1337 * A variable containing a list of devices that are not arcade stick style
1338 * controllers.
1339 *
1340 * This will override SDL_HINT_JOYSTICK_ARCADESTICK_DEVICES and the built in
1341 * device list.
1342 *
1343 * The format of the string is a comma separated list of USB VID/PID pairs in
1344 * hexadecimal form, e.g.
1345 *
1346 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
1347 *
1348 * The variable can also take the form of "@file", in which case the named
1349 * file will be loaded and interpreted as the value of the variable.
1350 *
1351 * This hint can be set anytime.
1352 *
1353 * \since This hint is available since SDL 3.2.0.
1354 */
1355#define SDL_HINT_JOYSTICK_ARCADESTICK_DEVICES_EXCLUDED "SDL_JOYSTICK_ARCADESTICK_DEVICES_EXCLUDED"
1356
1357/**
1358 * A variable containing a list of devices that should not be considered
1359 * joysticks.
1360 *
1361 * The format of the string is a comma separated list of USB VID/PID pairs in
1362 * hexadecimal form, e.g.
1363 *
1364 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
1365 *
1366 * The variable can also take the form of "@file", in which case the named
1367 * file will be loaded and interpreted as the value of the variable.
1368 *
1369 * This hint can be set anytime.
1370 *
1371 * \since This hint is available since SDL 3.2.0.
1372 */
1373#define SDL_HINT_JOYSTICK_BLACKLIST_DEVICES "SDL_JOYSTICK_BLACKLIST_DEVICES"
1374
1375/**
1376 * A variable containing a list of devices that should be considered
1377 * joysticks.
1378 *
1379 * This will override SDL_HINT_JOYSTICK_BLACKLIST_DEVICES and the built in
1380 * device list.
1381 *
1382 * The format of the string is a comma separated list of USB VID/PID pairs in
1383 * hexadecimal form, e.g.
1384 *
1385 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
1386 *
1387 * The variable can also take the form of "@file", in which case the named
1388 * file will be loaded and interpreted as the value of the variable.
1389 *
1390 * This hint can be set anytime.
1391 *
1392 * \since This hint is available since SDL 3.2.0.
1393 */
1394#define SDL_HINT_JOYSTICK_BLACKLIST_DEVICES_EXCLUDED "SDL_JOYSTICK_BLACKLIST_DEVICES_EXCLUDED"
1395
1396/**
1397 * A variable containing a comma separated list of devices to open as
1398 * joysticks.
1399 *
1400 * This variable is currently only used by the Linux joystick driver.
1401 *
1402 * \since This hint is available since SDL 3.2.0.
1403 */
1404#define SDL_HINT_JOYSTICK_DEVICE "SDL_JOYSTICK_DEVICE"
1405
1406/**
1407 * A variable containing a list of drum style controllers.
1408 *
1409 * The format of the string is a comma separated list of USB VID/PID pairs in
1410 * hexadecimal form, e.g.
1411 *
1412 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
1413 *
1414 * The variable can also take the form of "@file", in which case the named
1415 * file will be loaded and interpreted as the value of the variable.
1416 *
1417 * This hint can be set anytime.
1418 *
1419 * \since This hint is available since SDL 3.4.4.
1420 */
1421#define SDL_HINT_JOYSTICK_DRUM_DEVICES "SDL_JOYSTICK_DRUM_DEVICES"
1422
1423/**
1424 * A variable controlling whether enhanced reports should be used for
1425 * controllers when using the HIDAPI driver.
1426 *
1427 * Enhanced reports allow rumble and effects on Bluetooth PlayStation
1428 * controllers and gyro on Nintendo Switch controllers, but break Windows
1429 * DirectInput for other applications that don't use SDL.
1430 *
1431 * Once enhanced reports are enabled, they can't be disabled on PlayStation
1432 * controllers without power cycling the controller.
1433 *
1434 * The variable can be set to the following values:
1435 *
1436 * - "0": enhanced reports are not enabled.
1437 * - "1": enhanced reports are enabled. (default)
1438 * - "auto": enhanced features are advertised to the application, but SDL
1439 * doesn't change the controller report mode unless the application uses
1440 * them.
1441 *
1442 * This hint can be enabled anytime.
1443 *
1444 * \since This hint is available since SDL 3.2.0.
1445 */
1446#define SDL_HINT_JOYSTICK_ENHANCED_REPORTS "SDL_JOYSTICK_ENHANCED_REPORTS"
1447
1448/**
1449 * A variable containing a list of flightstick style controllers.
1450 *
1451 * The format of the string is a comma separated list of USB VID/PID pairs in
1452 * hexadecimal form, e.g.
1453 *
1454 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
1455 *
1456 * The variable can also take the form of @file, in which case the named file
1457 * will be loaded and interpreted as the value of the variable.
1458 *
1459 * This hint can be set anytime.
1460 *
1461 * \since This hint is available since SDL 3.2.0.
1462 */
1463#define SDL_HINT_JOYSTICK_FLIGHTSTICK_DEVICES "SDL_JOYSTICK_FLIGHTSTICK_DEVICES"
1464
1465/**
1466 * A variable containing a list of devices that are not flightstick style
1467 * controllers.
1468 *
1469 * This will override SDL_HINT_JOYSTICK_FLIGHTSTICK_DEVICES and the built in
1470 * device list.
1471 *
1472 * The format of the string is a comma separated list of USB VID/PID pairs in
1473 * hexadecimal form, e.g.
1474 *
1475 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
1476 *
1477 * The variable can also take the form of "@file", in which case the named
1478 * file will be loaded and interpreted as the value of the variable.
1479 *
1480 * This hint can be set anytime.
1481 *
1482 * \since This hint is available since SDL 3.2.0.
1483 */
1484#define SDL_HINT_JOYSTICK_FLIGHTSTICK_DEVICES_EXCLUDED "SDL_JOYSTICK_FLIGHTSTICK_DEVICES_EXCLUDED"
1485
1486/**
1487 * A variable controlling whether GameInput should be used for controller
1488 * handling on Windows.
1489 *
1490 * The variable can be set to the following values:
1491 *
1492 * - "0": GameInput is not used.
1493 * - "1": GameInput is used.
1494 *
1495 * The default is "1" on GDK platforms, and "0" otherwise.
1496 *
1497 * This hint should be set before SDL is initialized.
1498 *
1499 * \since This hint is available since SDL 3.2.0.
1500 */
1501#define SDL_HINT_JOYSTICK_GAMEINPUT "SDL_JOYSTICK_GAMEINPUT"
1502
1503/**
1504 * A variable controlling whether GameInput should be used for handling GIP
1505 * devices that require raw report processing, but aren't supported by HIDRAW,
1506 * such as Xbox One Guitars.
1507 *
1508 * Note that this is only supported with GameInput 3 or newer.
1509 *
1510 * The variable can be set to the following values:
1511 *
1512 * - "0": GameInput is not used to handle raw GIP devices.
1513 * - "1": GameInput is used.
1514 *
1515 * The default is "1" when using GameInput 3 or newer, and is "0" otherwise.
1516 *
1517 * This hint should be set before SDL is initialized.
1518 *
1519 * \since This hint is available since SDL 3.4.4.
1520 */
1521#define SDL_HINT_JOYSTICK_GAMEINPUT_RAW "SDL_JOYSTICK_GAMEINPUT_RAW"
1522
1523/**
1524 * A variable containing a list of devices known to have a GameCube form
1525 * factor.
1526 *
1527 * The format of the string is a comma separated list of USB VID/PID pairs in
1528 * hexadecimal form, e.g.
1529 *
1530 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
1531 *
1532 * The variable can also take the form of "@file", in which case the named
1533 * file will be loaded and interpreted as the value of the variable.
1534 *
1535 * This hint can be set anytime.
1536 *
1537 * \since This hint is available since SDL 3.2.0.
1538 */
1539#define SDL_HINT_JOYSTICK_GAMECUBE_DEVICES "SDL_JOYSTICK_GAMECUBE_DEVICES"
1540
1541/**
1542 * A variable containing a list of devices known not to have a GameCube form
1543 * factor.
1544 *
1545 * This will override SDL_HINT_JOYSTICK_GAMECUBE_DEVICES and the built in
1546 * device list.
1547 *
1548 * The format of the string is a comma separated list of USB VID/PID pairs in
1549 * hexadecimal form, e.g.
1550 *
1551 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
1552 *
1553 * The variable can also take the form of "@file", in which case the named
1554 * file will be loaded and interpreted as the value of the variable.
1555 *
1556 * This hint can be set anytime.
1557 *
1558 * \since This hint is available since SDL 3.2.0.
1559 */
1560#define SDL_HINT_JOYSTICK_GAMECUBE_DEVICES_EXCLUDED "SDL_JOYSTICK_GAMECUBE_DEVICES_EXCLUDED"
1561
1562/**
1563 * A variable containing a list of guitar style controllers.
1564 *
1565 * The format of the string is a comma separated list of USB VID/PID pairs in
1566 * hexadecimal form, e.g.
1567 *
1568 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
1569 *
1570 * The variable can also take the form of "@file", in which case the named
1571 * file will be loaded and interpreted as the value of the variable.
1572 *
1573 * This hint can be set anytime.
1574 *
1575 * \since This hint is available since SDL 3.4.4.
1576 */
1577#define SDL_HINT_JOYSTICK_GUITAR_DEVICES "SDL_JOYSTICK_GUITAR_DEVICES"
1578
1579/**
1580 * A variable controlling whether the HIDAPI joystick drivers should be used.
1581 *
1582 * The variable can be set to the following values:
1583 *
1584 * - "0": HIDAPI drivers are not used.
1585 * - "1": HIDAPI drivers are used. (default)
1586 *
1587 * This variable is the default for all drivers, but can be overridden by the
1588 * hints for specific drivers below.
1589 *
1590 * This hint should be set before initializing joysticks and gamepads.
1591 *
1592 * \since This hint is available since SDL 3.2.0.
1593 */
1594#define SDL_HINT_JOYSTICK_HIDAPI "SDL_JOYSTICK_HIDAPI"
1595
1596/**
1597 * A variable controlling whether Nintendo Switch Joy-Con controllers will be
1598 * combined into a single Pro-like controller when using the HIDAPI driver.
1599 *
1600 * The variable can be set to the following values:
1601 *
1602 * - "0": Left and right Joy-Con controllers will not be combined and each
1603 * will be a mini-gamepad.
1604 * - "1": Left and right Joy-Con controllers will be combined into a single
1605 * controller. (default)
1606 *
1607 * This hint should be set before initializing joysticks and gamepads.
1608 *
1609 * \since This hint is available since SDL 3.2.0.
1610 */
1611#define SDL_HINT_JOYSTICK_HIDAPI_COMBINE_JOY_CONS "SDL_JOYSTICK_HIDAPI_COMBINE_JOY_CONS"
1612
1613/**
1614 * A variable controlling whether the HIDAPI driver for Nintendo GameCube
1615 * controllers should be used.
1616 *
1617 * The variable can be set to the following values:
1618 *
1619 * - "0": HIDAPI driver is not used.
1620 * - "1": HIDAPI driver is used.
1621 *
1622 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
1623 *
1624 * This hint should be set before initializing joysticks and gamepads.
1625 *
1626 * \since This hint is available since SDL 3.2.0.
1627 */
1628#define SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE "SDL_JOYSTICK_HIDAPI_GAMECUBE"
1629
1630/**
1631 * A variable controlling whether rumble is used to implement the GameCube
1632 * controller's 3 rumble modes, Stop(0), Rumble(1), and StopHard(2).
1633 *
1634 * This is useful for applications that need full compatibility for things
1635 * like ADSR envelopes. - Stop is implemented by setting low_frequency_rumble
1636 * to 0 and high_frequency_rumble >0 - Rumble is both at any arbitrary value -
1637 * StopHard is implemented by setting both low_frequency_rumble and
1638 * high_frequency_rumble to 0
1639 *
1640 * The variable can be set to the following values:
1641 *
1642 * - "0": Normal rumble behavior is behavior is used. (default)
1643 * - "1": Proper GameCube controller rumble behavior is used.
1644 *
1645 * This hint can be set anytime.
1646 *
1647 * \since This hint is available since SDL 3.2.0.
1648 */
1649#define SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE_RUMBLE_BRAKE "SDL_JOYSTICK_HIDAPI_GAMECUBE_RUMBLE_BRAKE"
1650
1651/**
1652 * A variable controlling whether the HIDAPI driver for Nintendo Switch
1653 * Joy-Cons should be used.
1654 *
1655 * The variable can be set to the following values:
1656 *
1657 * - "0": HIDAPI driver is not used.
1658 * - "1": HIDAPI driver is used.
1659 *
1660 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
1661 *
1662 * This hint should be set before initializing joysticks and gamepads.
1663 *
1664 * \since This hint is available since SDL 3.2.0.
1665 */
1666#define SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS "SDL_JOYSTICK_HIDAPI_JOY_CONS"
1667
1668/**
1669 * A variable controlling whether the Home button LED should be turned on when
1670 * a Nintendo Switch Joy-Con controller is opened.
1671 *
1672 * The variable can be set to the following values:
1673 *
1674 * - "0": home button LED is turned off
1675 * - "1": home button LED is turned on
1676 *
1677 * By default the Home button LED state is not changed. This hint can also be
1678 * set to a floating point value between 0.0 and 1.0 which controls the
1679 * brightness of the Home button LED.
1680 *
1681 * This hint can be set anytime.
1682 *
1683 * \since This hint is available since SDL 3.2.0.
1684 */
1685#define SDL_HINT_JOYSTICK_HIDAPI_JOYCON_HOME_LED "SDL_JOYSTICK_HIDAPI_JOYCON_HOME_LED"
1686
1687/**
1688 * A variable controlling whether the HIDAPI driver for Amazon Luna
1689 * controllers connected via Bluetooth should be used.
1690 *
1691 * The variable can be set to the following values:
1692 *
1693 * - "0": HIDAPI driver is not used.
1694 * - "1": HIDAPI driver is used.
1695 *
1696 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
1697 *
1698 * This hint should be set before initializing joysticks and gamepads.
1699 *
1700 * \since This hint is available since SDL 3.2.0.
1701 */
1702#define SDL_HINT_JOYSTICK_HIDAPI_LUNA "SDL_JOYSTICK_HIDAPI_LUNA"
1703
1704/**
1705 * A variable controlling whether the HIDAPI driver for Nintendo Online
1706 * classic controllers should be used.
1707 *
1708 * The variable can be set to the following values:
1709 *
1710 * - "0": HIDAPI driver is not used.
1711 * - "1": HIDAPI driver is used.
1712 *
1713 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
1714 *
1715 * This hint should be set before initializing joysticks and gamepads.
1716 *
1717 * \since This hint is available since SDL 3.2.0.
1718 */
1719#define SDL_HINT_JOYSTICK_HIDAPI_NINTENDO_CLASSIC "SDL_JOYSTICK_HIDAPI_NINTENDO_CLASSIC"
1720
1721/**
1722 * A variable controlling whether the HIDAPI driver for PS3 controllers should
1723 * be used.
1724 *
1725 * The variable can be set to the following values:
1726 *
1727 * - "0": HIDAPI driver is not used.
1728 * - "1": HIDAPI driver is used.
1729 *
1730 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI on macOS, and "0" on
1731 * other platforms.
1732 *
1733 * For official Sony driver (sixaxis.sys) use
1734 * SDL_HINT_JOYSTICK_HIDAPI_PS3_SIXAXIS_DRIVER. See
1735 * https://github.com/ViGEm/DsHidMini for an alternative driver on Windows.
1736 *
1737 * This hint should be set before initializing joysticks and gamepads.
1738 *
1739 * \since This hint is available since SDL 3.2.0.
1740 */
1741#define SDL_HINT_JOYSTICK_HIDAPI_PS3 "SDL_JOYSTICK_HIDAPI_PS3"
1742
1743/**
1744 * A variable controlling whether the Sony driver (sixaxis.sys) for PS3
1745 * controllers (Sixaxis/DualShock 3) should be used.
1746 *
1747 * The variable can be set to the following values:
1748 *
1749 * - "0": Sony driver (sixaxis.sys) is not used.
1750 * - "1": Sony driver (sixaxis.sys) is used.
1751 *
1752 * The default value is 0.
1753 *
1754 * This hint should be set before initializing joysticks and gamepads.
1755 *
1756 * \since This hint is available since SDL 3.2.0.
1757 */
1758#define SDL_HINT_JOYSTICK_HIDAPI_PS3_SIXAXIS_DRIVER "SDL_JOYSTICK_HIDAPI_PS3_SIXAXIS_DRIVER"
1759
1760/**
1761 * A variable controlling whether the HIDAPI driver for PS4 controllers should
1762 * be used.
1763 *
1764 * The variable can be set to the following values:
1765 *
1766 * - "0": HIDAPI driver is not used.
1767 * - "1": HIDAPI driver is used.
1768 *
1769 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
1770 *
1771 * This hint should be set before initializing joysticks and gamepads.
1772 *
1773 * \since This hint is available since SDL 3.2.0.
1774 */
1775#define SDL_HINT_JOYSTICK_HIDAPI_PS4 "SDL_JOYSTICK_HIDAPI_PS4"
1776
1777/**
1778 * A variable controlling the update rate of the PS4 controller over Bluetooth
1779 * when using the HIDAPI driver.
1780 *
1781 * This defaults to 4 ms, to match the behavior over USB, and to be more
1782 * friendly to other Bluetooth devices and older Bluetooth hardware on the
1783 * computer. It can be set to "1" (1000Hz), "2" (500Hz) and "4" (250Hz)
1784 *
1785 * This hint can be set anytime, but only takes effect when extended input
1786 * reports are enabled.
1787 *
1788 * \since This hint is available since SDL 3.2.0.
1789 */
1790#define SDL_HINT_JOYSTICK_HIDAPI_PS4_REPORT_INTERVAL "SDL_JOYSTICK_HIDAPI_PS4_REPORT_INTERVAL"
1791
1792/**
1793 * A variable controlling whether the HIDAPI driver for PS5 controllers should
1794 * be used.
1795 *
1796 * The variable can be set to the following values:
1797 *
1798 * - "0": HIDAPI driver is not used.
1799 * - "1": HIDAPI driver is used.
1800 *
1801 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
1802 *
1803 * This hint should be set before initializing joysticks and gamepads.
1804 *
1805 * \since This hint is available since SDL 3.2.0.
1806 */
1807#define SDL_HINT_JOYSTICK_HIDAPI_PS5 "SDL_JOYSTICK_HIDAPI_PS5"
1808
1809/**
1810 * A variable controlling whether the player LEDs should be lit to indicate
1811 * which player is associated with a PS5 controller.
1812 *
1813 * The variable can be set to the following values:
1814 *
1815 * - "0": player LEDs are not enabled.
1816 * - "1": player LEDs are enabled. (default)
1817 *
1818 * \since This hint is available since SDL 3.2.0.
1819 */
1820#define SDL_HINT_JOYSTICK_HIDAPI_PS5_PLAYER_LED "SDL_JOYSTICK_HIDAPI_PS5_PLAYER_LED"
1821
1822/**
1823 * A variable controlling whether the HIDAPI driver for NVIDIA SHIELD
1824 * controllers should be used.
1825 *
1826 * The variable can be set to the following values:
1827 *
1828 * - "0": HIDAPI driver is not used.
1829 * - "1": HIDAPI driver is used.
1830 *
1831 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
1832 *
1833 * This hint should be set before initializing joysticks and gamepads.
1834 *
1835 * \since This hint is available since SDL 3.2.0.
1836 */
1837#define SDL_HINT_JOYSTICK_HIDAPI_SHIELD "SDL_JOYSTICK_HIDAPI_SHIELD"
1838
1839/**
1840 * A variable controlling whether the HIDAPI driver for Google Stadia
1841 * controllers should be used.
1842 *
1843 * The variable can be set to the following values:
1844 *
1845 * - "0": HIDAPI driver is not used.
1846 * - "1": HIDAPI driver is used.
1847 *
1848 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
1849 *
1850 * \since This hint is available since SDL 3.2.0.
1851 */
1852#define SDL_HINT_JOYSTICK_HIDAPI_STADIA "SDL_JOYSTICK_HIDAPI_STADIA"
1853
1854/**
1855 * A variable controlling whether the HIDAPI driver for Bluetooth Steam
1856 * Controllers should be used.
1857 *
1858 * The variable can be set to the following values:
1859 *
1860 * - "0": HIDAPI driver is not used. (default)
1861 * - "1": HIDAPI driver is used for Steam Controllers, which requires
1862 * Bluetooth access and may prompt the user for permission on iOS and
1863 * Android.
1864 *
1865 * This hint should be set before initializing joysticks and gamepads.
1866 *
1867 * \since This hint is available since SDL 3.2.0.
1868 */
1869#define SDL_HINT_JOYSTICK_HIDAPI_STEAM "SDL_JOYSTICK_HIDAPI_STEAM"
1870
1871/**
1872 * A variable controlling whether the Steam button LED should be turned on
1873 * when a Steam controller is opened.
1874 *
1875 * The variable can be set to the following values:
1876 *
1877 * - "0": Steam button LED is turned off.
1878 * - "1": Steam button LED is turned on.
1879 *
1880 * By default the Steam button LED state is not changed. This hint can also be
1881 * set to a floating point value between 0.0 and 1.0 which controls the
1882 * brightness of the Steam button LED.
1883 *
1884 * This hint can be set anytime.
1885 *
1886 * \since This hint is available since SDL 3.2.0.
1887 */
1888#define SDL_HINT_JOYSTICK_HIDAPI_STEAM_HOME_LED "SDL_JOYSTICK_HIDAPI_STEAM_HOME_LED"
1889
1890/**
1891 * A variable controlling whether the HIDAPI driver for the Steam Deck builtin
1892 * controller should be used.
1893 *
1894 * The variable can be set to the following values:
1895 *
1896 * - "0": HIDAPI driver is not used.
1897 * - "1": HIDAPI driver is used.
1898 *
1899 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
1900 *
1901 * This hint should be set before initializing joysticks and gamepads.
1902 *
1903 * \since This hint is available since SDL 3.2.0.
1904 */
1905#define SDL_HINT_JOYSTICK_HIDAPI_STEAMDECK "SDL_JOYSTICK_HIDAPI_STEAMDECK"
1906
1907/**
1908 * A variable controlling whether the HIDAPI driver for HORI licensed Steam
1909 * controllers should be used.
1910 *
1911 * The variable can be set to the following values:
1912 *
1913 * - "0": HIDAPI driver is not used.
1914 * - "1": HIDAPI driver is used.
1915 *
1916 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
1917 *
1918 * This hint should be set before initializing joysticks and gamepads.
1919 *
1920 * \since This hint is available since SDL 3.2.0.
1921 */
1922#define SDL_HINT_JOYSTICK_HIDAPI_STEAM_HORI "SDL_JOYSTICK_HIDAPI_STEAM_HORI"
1923
1924/**
1925 * A variable controlling whether the HIDAPI driver for some Logitech wheels
1926 * should be used.
1927 *
1928 * The variable can be set to the following values:
1929 *
1930 * - "0": HIDAPI driver is not used.
1931 * - "1": HIDAPI driver is used.
1932 *
1933 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
1934 *
1935 * This hint should be set before initializing joysticks and gamepads.
1936 *
1937 * \since This hint is available since SDL 3.4.0.
1938 */
1939#define SDL_HINT_JOYSTICK_HIDAPI_LG4FF "SDL_JOYSTICK_HIDAPI_LG4FF"
1940
1941/**
1942 * A variable controlling whether the HIDAPI driver for 8BitDo controllers
1943 * should be used.
1944 *
1945 * The variable can be set to the following values:
1946 *
1947 * - "0": HIDAPI driver is not used.
1948 * - "1": HIDAPI driver is used.
1949 *
1950 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
1951 *
1952 * This hint should be set before initializing joysticks and gamepads.
1953 *
1954 * \since This hint is available since SDL 3.4.0.
1955 */
1956#define SDL_HINT_JOYSTICK_HIDAPI_8BITDO "SDL_JOYSTICK_HIDAPI_8BITDO"
1957
1958/**
1959 * A variable controlling whether the HIDAPI driver for SInput controllers
1960 * should be used.
1961 *
1962 * More info - https://github.com/HandHeldLegend/SInput-HID
1963 *
1964 * The variable can be set to the following values:
1965 *
1966 * - "0": HIDAPI driver is not used.
1967 * - "1": HIDAPI driver is used.
1968 *
1969 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
1970 *
1971 * This hint should be set before initializing joysticks and gamepads.
1972 *
1973 * \since This hint is available since SDL 3.4.0.
1974 */
1975#define SDL_HINT_JOYSTICK_HIDAPI_SINPUT "SDL_JOYSTICK_HIDAPI_SINPUT"
1976
1977/**
1978 * A variable controlling whether the HIDAPI driver for ZUIKI controllers
1979 * should be used.
1980 *
1981 * The variable can be set to the following values:
1982 *
1983 * - "0": HIDAPI driver is not used.
1984 * - "1": HIDAPI driver is used.
1985 *
1986 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
1987 *
1988 * This hint should be set before initializing joysticks and gamepads.
1989 *
1990 * \since This hint is available since SDL 3.4.0.
1991 */
1992#define SDL_HINT_JOYSTICK_HIDAPI_ZUIKI "SDL_JOYSTICK_HIDAPI_ZUIKI"
1993
1994/**
1995 * A variable controlling whether the HIDAPI driver for Flydigi controllers
1996 * should be used.
1997 *
1998 * The variable can be set to the following values:
1999 *
2000 * - "0": HIDAPI driver is not used.
2001 * - "1": HIDAPI driver is used.
2002 *
2003 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
2004 *
2005 * This hint should be set before initializing joysticks and gamepads.
2006 *
2007 * \since This hint is available since SDL 3.4.0.
2008 */
2009#define SDL_HINT_JOYSTICK_HIDAPI_FLYDIGI "SDL_JOYSTICK_HIDAPI_FLYDIGI"
2010
2011/**
2012 * A variable controlling whether the HIDAPI driver for GameSir controllers
2013 * should be used.
2014 *
2015 * The variable can be set to the following values:
2016 *
2017 * - "0": HIDAPI driver is not used.
2018 * - "1": HIDAPI driver is used.
2019 *
2020 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
2021 *
2022 * This hint should be set before initializing joysticks and gamepads.
2023 *
2024 * \since This hint is available since SDL 3.5.0.
2025 */
2026#define SDL_HINT_JOYSTICK_HIDAPI_GAMESIR "SDL_JOYSTICK_HIDAPI_GAMESIR"
2027
2028/**
2029 * A variable controlling whether the HIDAPI driver for Nintendo Switch
2030 * controllers should be used.
2031 *
2032 * The variable can be set to the following values:
2033 *
2034 * - "0": HIDAPI driver is not used.
2035 * - "1": HIDAPI driver is used.
2036 *
2037 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
2038 *
2039 * This hint should be set before initializing joysticks and gamepads.
2040 *
2041 * \since This hint is available since SDL 3.2.0.
2042 */
2043#define SDL_HINT_JOYSTICK_HIDAPI_SWITCH "SDL_JOYSTICK_HIDAPI_SWITCH"
2044
2045/**
2046 * A variable controlling whether the Home button LED should be turned on when
2047 * a Nintendo Switch Pro controller is opened.
2048 *
2049 * The variable can be set to the following values:
2050 *
2051 * - "0": Home button LED is turned off.
2052 * - "1": Home button LED is turned on.
2053 *
2054 * By default the Home button LED state is not changed. This hint can also be
2055 * set to a floating point value between 0.0 and 1.0 which controls the
2056 * brightness of the Home button LED.
2057 *
2058 * This hint can be set anytime.
2059 *
2060 * \since This hint is available since SDL 3.2.0.
2061 */
2062#define SDL_HINT_JOYSTICK_HIDAPI_SWITCH_HOME_LED "SDL_JOYSTICK_HIDAPI_SWITCH_HOME_LED"
2063
2064/**
2065 * A variable controlling whether the player LEDs should be lit to indicate
2066 * which player is associated with a Nintendo Switch controller.
2067 *
2068 * The variable can be set to the following values:
2069 *
2070 * - "0": Player LEDs are not enabled.
2071 * - "1": Player LEDs are enabled. (default)
2072 *
2073 * This hint can be set anytime.
2074 *
2075 * \since This hint is available since SDL 3.2.0.
2076 */
2077#define SDL_HINT_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED "SDL_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED"
2078
2079/**
2080 * A variable controlling whether the HIDAPI driver for Nintendo Switch 2
2081 * controllers should be used.
2082 *
2083 * The variable can be set to the following values:
2084 *
2085 * - "0": HIDAPI driver is not used.
2086 * - "1": HIDAPI driver is used.
2087 *
2088 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
2089 *
2090 * This hint should be set before initializing joysticks and gamepads.
2091 *
2092 * \since This hint is available since SDL 3.4.0.
2093 */
2094#define SDL_HINT_JOYSTICK_HIDAPI_SWITCH2 "SDL_JOYSTICK_HIDAPI_SWITCH2"
2095
2096/**
2097 * A variable controlling whether Nintendo Switch Joy-Con controllers will be
2098 * in vertical mode when using the HIDAPI driver.
2099 *
2100 * The variable can be set to the following values:
2101 *
2102 * - "0": Left and right Joy-Con controllers will not be in vertical mode.
2103 * (default)
2104 * - "1": Left and right Joy-Con controllers will be in vertical mode.
2105 *
2106 * This hint should be set before opening a Joy-Con controller.
2107 *
2108 * \since This hint is available since SDL 3.2.0.
2109 */
2110#define SDL_HINT_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS "SDL_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS"
2111
2112/**
2113 * A variable controlling whether the HIDAPI driver for Nintendo Wii and Wii U
2114 * controllers should be used.
2115 *
2116 * The variable can be set to the following values:
2117 *
2118 * - "0": HIDAPI driver is not used.
2119 * - "1": HIDAPI driver is used.
2120 *
2121 * This driver doesn't work with the dolphinbar, so the default is false for
2122 * now.
2123 *
2124 * This hint should be set before initializing joysticks and gamepads.
2125 *
2126 * \since This hint is available since SDL 3.2.0.
2127 */
2128#define SDL_HINT_JOYSTICK_HIDAPI_WII "SDL_JOYSTICK_HIDAPI_WII"
2129
2130/**
2131 * A variable controlling whether the player LEDs should be lit to indicate
2132 * which player is associated with a Wii controller.
2133 *
2134 * The variable can be set to the following values:
2135 *
2136 * - "0": Player LEDs are not enabled.
2137 * - "1": Player LEDs are enabled. (default)
2138 *
2139 * This hint can be set anytime.
2140 *
2141 * \since This hint is available since SDL 3.2.0.
2142 */
2143#define SDL_HINT_JOYSTICK_HIDAPI_WII_PLAYER_LED "SDL_JOYSTICK_HIDAPI_WII_PLAYER_LED"
2144
2145/**
2146 * A variable controlling whether the HIDAPI driver for XBox controllers
2147 * should be used.
2148 *
2149 * The variable can be set to the following values:
2150 *
2151 * - "0": HIDAPI driver is not used.
2152 * - "1": HIDAPI driver is used.
2153 *
2154 * The default is "0" on Windows, otherwise the value of
2155 * SDL_HINT_JOYSTICK_HIDAPI
2156 *
2157 * This hint should be set before initializing joysticks and gamepads.
2158 *
2159 * \since This hint is available since SDL 3.2.0.
2160 */
2161#define SDL_HINT_JOYSTICK_HIDAPI_XBOX "SDL_JOYSTICK_HIDAPI_XBOX"
2162
2163/**
2164 * A variable controlling whether the HIDAPI driver for XBox 360 controllers
2165 * should be used.
2166 *
2167 * The variable can be set to the following values:
2168 *
2169 * - "0": HIDAPI driver is not used.
2170 * - "1": HIDAPI driver is used.
2171 *
2172 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI_XBOX
2173 *
2174 * This hint should be set before initializing joysticks and gamepads.
2175 *
2176 * \since This hint is available since SDL 3.2.0.
2177 */
2178#define SDL_HINT_JOYSTICK_HIDAPI_XBOX_360 "SDL_JOYSTICK_HIDAPI_XBOX_360"
2179
2180/**
2181 * A variable controlling whether the player LEDs should be lit to indicate
2182 * which player is associated with an Xbox 360 controller.
2183 *
2184 * The variable can be set to the following values:
2185 *
2186 * - "0": Player LEDs are not enabled.
2187 * - "1": Player LEDs are enabled. (default)
2188 *
2189 * This hint can be set anytime.
2190 *
2191 * \since This hint is available since SDL 3.2.0.
2192 */
2193#define SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED "SDL_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED"
2194
2195/**
2196 * A variable controlling whether the HIDAPI driver for XBox 360 wireless
2197 * controllers should be used.
2198 *
2199 * The variable can be set to the following values:
2200 *
2201 * - "0": HIDAPI driver is not used.
2202 * - "1": HIDAPI driver is used.
2203 *
2204 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI_XBOX_360
2205 *
2206 * This hint should be set before initializing joysticks and gamepads.
2207 *
2208 * \since This hint is available since SDL 3.2.0.
2209 */
2210#define SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_WIRELESS "SDL_JOYSTICK_HIDAPI_XBOX_360_WIRELESS"
2211
2212/**
2213 * A variable controlling whether the HIDAPI driver for XBox One controllers
2214 * should be used.
2215 *
2216 * The variable can be set to the following values:
2217 *
2218 * - "0": HIDAPI driver is not used.
2219 * - "1": HIDAPI driver is used.
2220 *
2221 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI_XBOX.
2222 *
2223 * This hint should be set before initializing joysticks and gamepads.
2224 *
2225 * \since This hint is available since SDL 3.2.0.
2226 */
2227#define SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE "SDL_JOYSTICK_HIDAPI_XBOX_ONE"
2228
2229/**
2230 * A variable controlling whether the Home button LED should be turned on when
2231 * an Xbox One controller is opened.
2232 *
2233 * The variable can be set to the following values:
2234 *
2235 * - "0": Home button LED is turned off.
2236 * - "1": Home button LED is turned on.
2237 *
2238 * By default the Home button LED state is not changed. This hint can also be
2239 * set to a floating point value between 0.0 and 1.0 which controls the
2240 * brightness of the Home button LED. The default brightness is 0.4.
2241 *
2242 * This hint can be set anytime.
2243 *
2244 * \since This hint is available since SDL 3.2.0.
2245 */
2246#define SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED "SDL_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED"
2247
2248/**
2249 * A variable controlling whether the new HIDAPI driver for wired Xbox One
2250 * (GIP) controllers should be used.
2251 *
2252 * The variable can be set to the following values:
2253 *
2254 * - "0": HIDAPI driver is not used.
2255 * - "1": HIDAPI driver is used.
2256 *
2257 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE.
2258 *
2259 * This hint should be set before initializing joysticks and gamepads.
2260 *
2261 * \since This hint is available since SDL 3.4.0.
2262 */
2263#define SDL_HINT_JOYSTICK_HIDAPI_GIP "SDL_JOYSTICK_HIDAPI_GIP"
2264
2265/**
2266 * A variable controlling whether the new HIDAPI driver for wired Xbox One
2267 * (GIP) controllers should reset the controller if it can't get the metadata
2268 * from the controller.
2269 *
2270 * The variable can be set to the following values:
2271 *
2272 * - "0": Assume this is a generic controller.
2273 * - "1": Reset the controller to get metadata.
2274 *
2275 * By default the controller is not reset.
2276 *
2277 * This hint should be set before initializing joysticks and gamepads.
2278 *
2279 * \since This hint is available since SDL 3.4.0.
2280 */
2281#define SDL_HINT_JOYSTICK_HIDAPI_GIP_RESET_FOR_METADATA "SDL_JOYSTICK_HIDAPI_GIP_RESET_FOR_METADATA"
2282
2283/**
2284 * A variable controlling whether IOKit should be used for controller
2285 * handling.
2286 *
2287 * The variable can be set to the following values:
2288 *
2289 * - "0": IOKit is not used.
2290 * - "1": IOKit is used. (default)
2291 *
2292 * This hint should be set before SDL is initialized.
2293 *
2294 * \since This hint is available since SDL 3.2.0.
2295 */
2296#define SDL_HINT_JOYSTICK_IOKIT "SDL_JOYSTICK_IOKIT"
2297
2298/**
2299 * A variable controlling whether to use the classic /dev/input/js* joystick
2300 * interface or the newer /dev/input/event* joystick interface on Linux.
2301 *
2302 * The variable can be set to the following values:
2303 *
2304 * - "0": Use /dev/input/event* (default)
2305 * - "1": Use /dev/input/js*
2306 *
2307 * This hint should be set before SDL is initialized.
2308 *
2309 * \since This hint is available since SDL 3.2.0.
2310 */
2311#define SDL_HINT_JOYSTICK_LINUX_CLASSIC "SDL_JOYSTICK_LINUX_CLASSIC"
2312
2313/**
2314 * A variable controlling whether joysticks on Linux adhere to their
2315 * HID-defined deadzones or return unfiltered values.
2316 *
2317 * The variable can be set to the following values:
2318 *
2319 * - "0": Return unfiltered joystick axis values. (default)
2320 * - "1": Return axis values with deadzones taken into account.
2321 *
2322 * This hint should be set before a controller is opened.
2323 *
2324 * \since This hint is available since SDL 3.2.0.
2325 */
2326#define SDL_HINT_JOYSTICK_LINUX_DEADZONES "SDL_JOYSTICK_LINUX_DEADZONES"
2327
2328/**
2329 * A variable controlling whether joysticks on Linux will always treat 'hat'
2330 * axis inputs (ABS_HAT0X - ABS_HAT3Y) as 8-way digital hats without checking
2331 * whether they may be analog.
2332 *
2333 * The variable can be set to the following values:
2334 *
2335 * - "0": Only map hat axis inputs to digital hat outputs if the input axes
2336 * appear to actually be digital. (default)
2337 * - "1": Always handle the input axes numbered ABS_HAT0X to ABS_HAT3Y as
2338 * digital hats.
2339 *
2340 * This hint should be set before a controller is opened.
2341 *
2342 * \since This hint is available since SDL 3.2.0.
2343 */
2344#define SDL_HINT_JOYSTICK_LINUX_DIGITAL_HATS "SDL_JOYSTICK_LINUX_DIGITAL_HATS"
2345
2346/**
2347 * A variable controlling whether digital hats on Linux will apply deadzones
2348 * to their underlying input axes or use unfiltered values.
2349 *
2350 * The variable can be set to the following values:
2351 *
2352 * - "0": Return digital hat values based on unfiltered input axis values.
2353 * - "1": Return digital hat values with deadzones on the input axes taken
2354 * into account. (default)
2355 *
2356 * This hint should be set before a controller is opened.
2357 *
2358 * \since This hint is available since SDL 3.2.0.
2359 */
2360#define SDL_HINT_JOYSTICK_LINUX_HAT_DEADZONES "SDL_JOYSTICK_LINUX_HAT_DEADZONES"
2361
2362/**
2363 * A variable controlling whether GCController should be used for controller
2364 * handling.
2365 *
2366 * The variable can be set to the following values:
2367 *
2368 * - "0": GCController is not used.
2369 * - "1": GCController is used. (default)
2370 *
2371 * This hint should be set before SDL is initialized.
2372 *
2373 * \since This hint is available since SDL 3.2.0.
2374 */
2375#define SDL_HINT_JOYSTICK_MFI "SDL_JOYSTICK_MFI"
2376
2377/**
2378 * A variable controlling whether the RAWINPUT joystick drivers should be used
2379 * for better handling XInput-capable devices.
2380 *
2381 * The variable can be set to the following values:
2382 *
2383 * - "0": RAWINPUT drivers are not used. (default)
2384 * - "1": RAWINPUT drivers are used.
2385 *
2386 * This hint should be set before SDL is initialized.
2387 *
2388 * \since This hint is available since SDL 3.2.0.
2389 */
2390#define SDL_HINT_JOYSTICK_RAWINPUT "SDL_JOYSTICK_RAWINPUT"
2391
2392/**
2393 * A variable controlling whether the RAWINPUT driver should pull correlated
2394 * data from XInput.
2395 *
2396 * The variable can be set to the following values:
2397 *
2398 * - "0": RAWINPUT driver will only use data from raw input APIs.
2399 * - "1": RAWINPUT driver will also pull data from XInput and
2400 * Windows.Gaming.Input, providing better trigger axes, guide button
2401 * presses, and rumble support for Xbox controllers. (default)
2402 *
2403 * This hint should be set before a gamepad is opened.
2404 *
2405 * \since This hint is available since SDL 3.2.0.
2406 */
2407#define SDL_HINT_JOYSTICK_RAWINPUT_CORRELATE_XINPUT "SDL_JOYSTICK_RAWINPUT_CORRELATE_XINPUT"
2408
2409/**
2410 * A variable controlling whether the ROG Chakram mice should show up as
2411 * joysticks.
2412 *
2413 * The variable can be set to the following values:
2414 *
2415 * - "0": ROG Chakram mice do not show up as joysticks. (default)
2416 * - "1": ROG Chakram mice show up as joysticks.
2417 *
2418 * This hint should be set before SDL is initialized.
2419 *
2420 * \since This hint is available since SDL 3.2.0.
2421 */
2422#define SDL_HINT_JOYSTICK_ROG_CHAKRAM "SDL_JOYSTICK_ROG_CHAKRAM"
2423
2424/**
2425 * A variable controlling whether a separate thread should be used for
2426 * handling joystick detection and raw input messages on Windows.
2427 *
2428 * The variable can be set to the following values:
2429 *
2430 * - "0": A separate thread is not used.
2431 * - "1": A separate thread is used for handling raw input messages. (default)
2432 *
2433 * This hint should be set before SDL is initialized.
2434 *
2435 * \since This hint is available since SDL 3.2.0.
2436 */
2437#define SDL_HINT_JOYSTICK_THREAD "SDL_JOYSTICK_THREAD"
2438
2439/**
2440 * A variable containing a list of throttle style controllers.
2441 *
2442 * The format of the string is a comma separated list of USB VID/PID pairs in
2443 * hexadecimal form, e.g.
2444 *
2445 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
2446 *
2447 * The variable can also take the form of "@file", in which case the named
2448 * file will be loaded and interpreted as the value of the variable.
2449 *
2450 * This hint can be set anytime.
2451 *
2452 * \since This hint is available since SDL 3.2.0.
2453 */
2454#define SDL_HINT_JOYSTICK_THROTTLE_DEVICES "SDL_JOYSTICK_THROTTLE_DEVICES"
2455
2456/**
2457 * A variable containing a list of devices that are not throttle style
2458 * controllers.
2459 *
2460 * This will override SDL_HINT_JOYSTICK_THROTTLE_DEVICES and the built in
2461 * device list.
2462 *
2463 * The format of the string is a comma separated list of USB VID/PID pairs in
2464 * hexadecimal form, e.g.
2465 *
2466 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
2467 *
2468 * The variable can also take the form of "@file", in which case the named
2469 * file will be loaded and interpreted as the value of the variable.
2470 *
2471 * This hint can be set anytime.
2472 *
2473 * \since This hint is available since SDL 3.2.0.
2474 */
2475#define SDL_HINT_JOYSTICK_THROTTLE_DEVICES_EXCLUDED "SDL_JOYSTICK_THROTTLE_DEVICES_EXCLUDED"
2476
2477/**
2478 * A variable controlling whether Windows.Gaming.Input should be used for
2479 * controller handling.
2480 *
2481 * The variable can be set to the following values:
2482 *
2483 * - "0": WGI is not used. (default)
2484 * - "1": WGI is used.
2485 *
2486 * This hint should be set before SDL is initialized.
2487 *
2488 * \since This hint is available since SDL 3.2.0.
2489 */
2490#define SDL_HINT_JOYSTICK_WGI "SDL_JOYSTICK_WGI"
2491
2492/**
2493 * A variable containing a list of wheel style controllers.
2494 *
2495 * The format of the string is a comma separated list of USB VID/PID pairs in
2496 * hexadecimal form, e.g.
2497 *
2498 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
2499 *
2500 * The variable can also take the form of "@file", in which case the named
2501 * file will be loaded and interpreted as the value of the variable.
2502 *
2503 * This hint can be set anytime.
2504 *
2505 * \since This hint is available since SDL 3.2.0.
2506 */
2507#define SDL_HINT_JOYSTICK_WHEEL_DEVICES "SDL_JOYSTICK_WHEEL_DEVICES"
2508
2509/**
2510 * A variable containing a list of devices that are not wheel style
2511 * controllers.
2512 *
2513 * This will override SDL_HINT_JOYSTICK_WHEEL_DEVICES and the built in device
2514 * list.
2515 *
2516 * The format of the string is a comma separated list of USB VID/PID pairs in
2517 * hexadecimal form, e.g.
2518 *
2519 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
2520 *
2521 * The variable can also take the form of "@file", in which case the named
2522 * file will be loaded and interpreted as the value of the variable.
2523 *
2524 * This hint can be set anytime.
2525 *
2526 * \since This hint is available since SDL 3.2.0.
2527 */
2528#define SDL_HINT_JOYSTICK_WHEEL_DEVICES_EXCLUDED "SDL_JOYSTICK_WHEEL_DEVICES_EXCLUDED"
2529
2530/**
2531 * A variable containing a list of devices known to have all axes centered at
2532 * zero.
2533 *
2534 * The format of the string is a comma separated list of USB VID/PID pairs in
2535 * hexadecimal form, e.g.
2536 *
2537 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
2538 *
2539 * The variable can also take the form of "@file", in which case the named
2540 * file will be loaded and interpreted as the value of the variable.
2541 *
2542 * This hint should be set before a controller is opened.
2543 *
2544 * \since This hint is available since SDL 3.2.0.
2545 */
2546#define SDL_HINT_JOYSTICK_ZERO_CENTERED_DEVICES "SDL_JOYSTICK_ZERO_CENTERED_DEVICES"
2547
2548/**
2549 * A variable containing a list of devices and their desired number of haptic
2550 * (force feedback) enabled axis.
2551 *
2552 * The format of the string is a comma separated list of USB VID/PID pairs in
2553 * hexadecimal form plus the number of desired axes, e.g.
2554 *
2555 * `0xAAAA/0xBBBB/1,0xCCCC/0xDDDD/3`
2556 *
2557 * This hint supports a "wildcard" device that will set the number of haptic
2558 * axes on all initialized haptic devices which were not defined explicitly in
2559 * this hint.
2560 *
2561 * `0xFFFF/0xFFFF/1`
2562 *
2563 * This hint should be set before a controller is opened. The number of haptic
2564 * axes won't exceed the number of real axes found on the device.
2565 *
2566 * \since This hint is available since SDL 3.2.5.
2567 */
2568#define SDL_HINT_JOYSTICK_HAPTIC_AXES "SDL_JOYSTICK_HAPTIC_AXES"
2569
2570/**
2571 * A variable that controls keycode representation in keyboard events.
2572 *
2573 * This variable is a comma separated set of options for translating keycodes
2574 * in events:
2575 *
2576 * - "none": Keycode options are cleared, this overrides other options.
2577 * - "hide_numpad": The numpad keysyms will be translated into their
2578 * non-numpad versions based on the current NumLock state. For example,
2579 * SDLK_KP_4 would become SDLK_4 if SDL_KMOD_NUM is set in the event
2580 * modifiers, and SDLK_LEFT if it is unset.
2581 * - "french_numbers": The number row on French keyboards is inverted, so
2582 * pressing the 1 key would yield the keycode SDLK_1, or '1', instead of
2583 * SDLK_AMPERSAND, or '&'
2584 * - "latin_letters": For keyboards using non-Latin letters, such as Russian
2585 * or Thai, the letter keys generate keycodes as though it had an English
2586 * QWERTY layout. e.g. pressing the key associated with SDL_SCANCODE_A on a
2587 * Russian keyboard would yield 'a' instead of a Cyrillic letter.
2588 *
2589 * The default value for this hint is "french_numbers,latin_letters"
2590 *
2591 * Some platforms like Emscripten only provide modified keycodes and the
2592 * options are not used.
2593 *
2594 * These options do not affect the return value of SDL_GetKeyFromScancode() or
2595 * SDL_GetScancodeFromKey(), they just apply to the keycode included in key
2596 * events.
2597 *
2598 * This hint can be set anytime.
2599 *
2600 * \since This hint is available since SDL 3.2.0.
2601 */
2602#define SDL_HINT_KEYCODE_OPTIONS "SDL_KEYCODE_OPTIONS"
2603
2604/**
2605 * A variable that controls what KMSDRM device to use.
2606 *
2607 * SDL might open something like "/dev/dri/cardNN" to access KMSDRM
2608 * functionality, where "NN" is a device index number. SDL makes a guess at
2609 * the best index to use (usually zero), but the app or user can set this hint
2610 * to a number between 0 and 99 to force selection.
2611 *
2612 * This hint should be set before SDL is initialized.
2613 *
2614 * \since This hint is available since SDL 3.2.0.
2615 */
2616#define SDL_HINT_KMSDRM_DEVICE_INDEX "SDL_KMSDRM_DEVICE_INDEX"
2617
2618/**
2619 * A variable that controls whether SDL requires DRM master access in order to
2620 * initialize the KMSDRM video backend.
2621 *
2622 * The DRM subsystem has a concept of a "DRM master" which is a DRM client
2623 * that has the ability to set planes, set cursor, etc. When SDL is DRM
2624 * master, it can draw to the screen using the SDL rendering APIs. Without DRM
2625 * master, SDL is still able to process input and query attributes of attached
2626 * displays, but it cannot change display state or draw to the screen
2627 * directly.
2628 *
2629 * In some cases, it can be useful to have the KMSDRM backend even if it
2630 * cannot be used for rendering. An app may want to use SDL for input
2631 * processing while using another rendering API (such as an MMAL overlay on
2632 * Raspberry Pi) or using its own code to render to DRM overlays that SDL
2633 * doesn't support.
2634 *
2635 * The variable can be set to the following values:
2636 *
2637 * - "0": SDL will allow usage of the KMSDRM backend without DRM master.
2638 * - "1": SDL Will require DRM master to use the KMSDRM backend. (default)
2639 *
2640 * This hint should be set before SDL is initialized.
2641 *
2642 * \since This hint is available since SDL 3.2.0.
2643 */
2644#define SDL_HINT_KMSDRM_REQUIRE_DRM_MASTER "SDL_KMSDRM_REQUIRE_DRM_MASTER"
2645
2646/**
2647 * A variable that controls whether KMSDRM will use "atomic" functionality.
2648 *
2649 * The KMSDRM backend can use atomic commits, if both DRM_CLIENT_CAP_ATOMIC
2650 * and DRM_CLIENT_CAP_UNIVERSAL_PLANES is supported by the system. As of SDL
2651 * 3.4.0, it will favor this functionality, but in case this doesn't work well
2652 * on a given system or other surprises, this hint can be used to disable it.
2653 *
2654 * This hint can not enable the functionality if it isn't available.
2655 *
2656 * The variable can be set to the following values:
2657 *
2658 * - "0": SDL will not use the KMSDRM "atomic" functionality.
2659 * - "1": SDL will allow usage of the KMSDRM "atomic" functionality. (default)
2660 *
2661 * This hint should be set before SDL is initialized.
2662 *
2663 * \since This hint is available since SDL 3.4.0.
2664 */
2665#define SDL_HINT_KMSDRM_ATOMIC "SDL_KMSDRM_ATOMIC"
2666
2667/**
2668 * A variable controlling the default SDL log levels.
2669 *
2670 * This variable is a comma separated set of category=level tokens that define
2671 * the default logging levels for SDL applications.
2672 *
2673 * The category can be a numeric category, one of "app", "error", "assert",
2674 * "system", "audio", "video", "render", "input", "test", or `*` for any
2675 * unspecified category.
2676 *
2677 * The level can be a numeric level, one of "verbose", "debug", "info",
2678 * "warn", "error", "critical", or "quiet" to disable that category.
2679 *
2680 * You can omit the category if you want to set the logging level for all
2681 * categories.
2682 *
2683 * If this hint isn't set, the default log levels are equivalent to:
2684 *
2685 * `app=info,assert=warn,test=verbose,*=error`
2686 *
2687 * If the `DEBUG_INVOCATION` environment variable is set to "1", the default
2688 * log levels are equivalent to:
2689 *
2690 * `assert=warn,test=verbose,*=debug`
2691 *
2692 * This hint can be set anytime.
2693 *
2694 * \since This hint is available since SDL 3.2.0.
2695 */
2696#define SDL_HINT_LOGGING "SDL_LOGGING"
2697
2698/**
2699 * A variable controlling whether to force the application to become the
2700 * foreground process when launched on macOS.
2701 *
2702 * The variable can be set to the following values:
2703 *
2704 * - "0": The application is brought to the foreground when launched.
2705 * (default)
2706 * - "1": The application may remain in the background when launched.
2707 *
2708 * This hint needs to be set before SDL_Init().
2709 *
2710 * \since This hint is available since SDL 3.2.0.
2711 */
2712#define SDL_HINT_MAC_BACKGROUND_APP "SDL_MAC_BACKGROUND_APP"
2713
2714/**
2715 * A variable that determines whether Ctrl+Click should generate a right-click
2716 * event on macOS.
2717 *
2718 * The variable can be set to the following values:
2719 *
2720 * - "0": Ctrl+Click does not generate a right mouse button click event.
2721 * (default)
2722 * - "1": Ctrl+Click generated a right mouse button click event.
2723 *
2724 * This hint can be set anytime.
2725 *
2726 * \since This hint is available since SDL 3.2.0.
2727 */
2728#define SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK "SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK"
2729
2730/**
2731 * A variable controlling whether dispatching OpenGL context updates should
2732 * block the dispatching thread until the main thread finishes processing on
2733 * macOS.
2734 *
2735 * The variable can be set to the following values:
2736 *
2737 * - "0": Dispatching OpenGL context updates will block the dispatching thread
2738 * until the main thread finishes processing. (default)
2739 * - "1": Dispatching OpenGL context updates will allow the dispatching thread
2740 * to continue execution.
2741 *
2742 * Generally you want the default, but if you have OpenGL code in a background
2743 * thread on a Mac, and the main thread hangs because it's waiting for that
2744 * background thread, but that background thread is also hanging because it's
2745 * waiting for the main thread to do an update, this might fix your issue.
2746 *
2747 * This hint can be set anytime.
2748 *
2749 * \since This hint is available since SDL 3.2.0.
2750 */
2751#define SDL_HINT_MAC_OPENGL_ASYNC_DISPATCH "SDL_MAC_OPENGL_ASYNC_DISPATCH"
2752
2753/**
2754 * A variable controlling whether the Option key on macOS should be remapped
2755 * to act as the Alt key.
2756 *
2757 * The variable can be set to the following values:
2758 *
2759 * - "none": The Option key is not remapped to Alt. (default)
2760 * - "only_left": Only the left Option key is remapped to Alt.
2761 * - "only_right": Only the right Option key is remapped to Alt.
2762 * - "both": Both Option keys are remapped to Alt.
2763 *
2764 * This will prevent the triggering of key compositions that rely on the
2765 * Option key, but will still send the Alt modifier for keyboard events. In
2766 * the case that both Alt and Option are pressed, the Option key will be
2767 * ignored. This is particularly useful for applications like terminal
2768 * emulators and graphical user interfaces (GUIs) that rely on Alt key
2769 * functionality for shortcuts or navigation. This does not apply to
2770 * SDL_GetKeyFromScancode and only has an effect if IME is enabled.
2771 *
2772 * This hint can be set anytime.
2773 *
2774 * \since This hint is available since SDL 3.2.0.
2775 */
2776#define SDL_HINT_MAC_OPTION_AS_ALT "SDL_MAC_OPTION_AS_ALT"
2777
2778/**
2779 * A variable controlling whether SDL_EVENT_MOUSE_WHEEL event values will have
2780 * momentum on macOS.
2781 *
2782 * The variable can be set to the following values:
2783 *
2784 * - "0": The mouse wheel events will have no momentum. (default)
2785 * - "1": The mouse wheel events will have momentum.
2786 *
2787 * This hint needs to be set before SDL_Init().
2788 *
2789 * \since This hint is available since SDL 3.2.0.
2790 */
2791#define SDL_HINT_MAC_SCROLL_MOMENTUM "SDL_MAC_SCROLL_MOMENTUM"
2792
2793/**
2794 * A variable controlling whether holding down a key will repeat the pressed
2795 * key or open the accents menu on macOS.
2796 *
2797 * The variable can be set to the following values:
2798 *
2799 * - "0": Holding a key will repeat the pressed key.
2800 * - "1": Holding a key will open the accents menu for that key. (default)
2801 *
2802 * This hint needs to be set before SDL_Init().
2803 *
2804 * \since This hint is available since SDL 3.4.0.
2805 */
2806#define SDL_HINT_MAC_PRESS_AND_HOLD "SDL_MAC_PRESS_AND_HOLD"
2807
2808/**
2809 * Request SDL_AppIterate() be called at a specific rate.
2810 *
2811 * If this is set to a number, it represents Hz, so "60" means try to iterate
2812 * 60 times per second. "0" means to iterate as fast as possible. Negative
2813 * values are illegal, but reserved, in case they are useful in a future
2814 * revision of SDL.
2815 *
2816 * There are other strings that have special meaning. If set to "waitevent",
2817 * SDL_AppIterate will not be called until new event(s) have arrived (and been
2818 * processed by SDL_AppEvent). This can be useful for apps that are completely
2819 * idle except in response to input.
2820 *
2821 * On some platforms, or if you are using SDL_main instead of SDL_AppIterate,
2822 * this hint is ignored. When the hint can be used, it is allowed to be
2823 * changed at any time.
2824 *
2825 * This defaults to 0, and specifying NULL for the hint's value will restore
2826 * the default.
2827 *
2828 * This doesn't have to be an integer value. For example, "59.94" won't be
2829 * rounded to an integer rate; the digits after the decimal are actually
2830 * respected.
2831 *
2832 * This hint can be set anytime.
2833 *
2834 * \since This hint is available since SDL 3.2.0.
2835 */
2836#define SDL_HINT_MAIN_CALLBACK_RATE "SDL_MAIN_CALLBACK_RATE"
2837
2838/**
2839 * A variable controlling whether the mouse is captured while mouse buttons
2840 * are pressed.
2841 *
2842 * The variable can be set to the following values:
2843 *
2844 * - "0": The mouse is not captured while mouse buttons are pressed.
2845 * - "1": The mouse is captured while mouse buttons are pressed.
2846 *
2847 * By default the mouse is captured while mouse buttons are pressed so if the
2848 * mouse is dragged outside the window, the application continues to receive
2849 * mouse events until the button is released.
2850 *
2851 * This hint can be set anytime.
2852 *
2853 * \since This hint is available since SDL 3.2.0.
2854 */
2855#define SDL_HINT_MOUSE_AUTO_CAPTURE "SDL_MOUSE_AUTO_CAPTURE"
2856
2857/**
2858 * A variable setting the double click radius, in pixels.
2859 *
2860 * This hint can be set anytime.
2861 *
2862 * \since This hint is available since SDL 3.2.0.
2863 */
2864#define SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS "SDL_MOUSE_DOUBLE_CLICK_RADIUS"
2865
2866/**
2867 * A variable setting the double click time, in milliseconds.
2868 *
2869 * This hint can be set anytime.
2870 *
2871 * \since This hint is available since SDL 3.2.0.
2872 */
2873#define SDL_HINT_MOUSE_DOUBLE_CLICK_TIME "SDL_MOUSE_DOUBLE_CLICK_TIME"
2874
2875/**
2876 * A variable setting which system cursor to use as the default cursor.
2877 *
2878 * This should be an integer corresponding to the SDL_SystemCursor enum. The
2879 * default value is zero (SDL_SYSTEM_CURSOR_DEFAULT).
2880 *
2881 * This hint needs to be set before SDL_Init().
2882 *
2883 * \since This hint is available since SDL 3.2.0.
2884 */
2885#define SDL_HINT_MOUSE_DEFAULT_SYSTEM_CURSOR "SDL_MOUSE_DEFAULT_SYSTEM_CURSOR"
2886
2887/**
2888 * A variable setting whether we should scale cursors by the current display
2889 * scale.
2890 *
2891 * The variable can be set to the following values:
2892 *
2893 * - "0": Cursors will not change size based on the display content scale.
2894 * (default)
2895 * - "1": Cursors will automatically match the display content scale (e.g. a
2896 * 2x sized cursor will be used when the window is on a monitor with 200%
2897 * scale). This is currently implemented on Windows.
2898 *
2899 * This hint needs to be set before creating cursors.
2900 *
2901 * \since This hint is available since SDL 3.4.0.
2902 */
2903#define SDL_HINT_MOUSE_DPI_SCALE_CURSORS "SDL_MOUSE_DPI_SCALE_CURSORS"
2904
2905/**
2906 * A variable controlling whether warping a hidden mouse cursor will activate
2907 * relative mouse mode.
2908 *
2909 * When this hint is set, the mouse cursor is hidden, and multiple warps to
2910 * the window center occur within a short time period, SDL will emulate mouse
2911 * warps using relative mouse mode. This can provide smoother and more
2912 * reliable mouse motion for some older games, which continuously calculate
2913 * the distance traveled by the mouse pointer and warp it back to the center
2914 * of the window, rather than using relative mouse motion.
2915 *
2916 * Note that relative mouse mode may have different mouse acceleration
2917 * behavior than pointer warps.
2918 *
2919 * If your application needs to repeatedly warp the hidden mouse cursor at a
2920 * high-frequency for other purposes, it should disable this hint.
2921 *
2922 * The variable can be set to the following values:
2923 *
2924 * - "0": Attempts to warp the mouse will always be made.
2925 * - "1": Some mouse warps will be emulated by forcing relative mouse mode.
2926 * (default)
2927 *
2928 * If not set, this is automatically enabled unless an application uses
2929 * relative mouse mode directly.
2930 *
2931 * This hint can be set anytime.
2932 *
2933 * \since This hint is available since SDL 3.2.0.
2934 */
2935#define SDL_HINT_MOUSE_EMULATE_WARP_WITH_RELATIVE "SDL_MOUSE_EMULATE_WARP_WITH_RELATIVE"
2936
2937/**
2938 * Allow mouse click events when clicking to focus an SDL window.
2939 *
2940 * The variable can be set to the following values:
2941 *
2942 * - "0": Ignore mouse clicks that activate a window. (default)
2943 * - "1": Generate events for mouse clicks that activate a window.
2944 *
2945 * This hint can be set anytime.
2946 *
2947 * \since This hint is available since SDL 3.2.0.
2948 */
2949#define SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH "SDL_MOUSE_FOCUS_CLICKTHROUGH"
2950
2951/**
2952 * A variable setting the speed scale for mouse motion, in floating point,
2953 * when the mouse is not in relative mode.
2954 *
2955 * This hint can be set anytime.
2956 *
2957 * \since This hint is available since SDL 3.2.0.
2958 */
2959#define SDL_HINT_MOUSE_NORMAL_SPEED_SCALE "SDL_MOUSE_NORMAL_SPEED_SCALE"
2960
2961/**
2962 * A variable controlling whether relative mouse mode constrains the mouse to
2963 * the center of the window.
2964 *
2965 * Constraining to the center of the window works better for FPS games and
2966 * when the application is running over RDP. Constraining to the whole window
2967 * works better for 2D games and increases the chance that the mouse will be
2968 * in the correct position when using high DPI mice.
2969 *
2970 * The variable can be set to the following values:
2971 *
2972 * - "0": Relative mouse mode constrains the mouse to the window.
2973 * - "1": Relative mouse mode constrains the mouse to the center of the
2974 * window. (default)
2975 *
2976 * This hint can be set anytime.
2977 *
2978 * \since This hint is available since SDL 3.2.0.
2979 */
2980#define SDL_HINT_MOUSE_RELATIVE_MODE_CENTER "SDL_MOUSE_RELATIVE_MODE_CENTER"
2981
2982/**
2983 * A variable setting the scale for mouse motion, in floating point, when the
2984 * mouse is in relative mode.
2985 *
2986 * This hint can be set anytime.
2987 *
2988 * \since This hint is available since SDL 3.2.0.
2989 */
2990#define SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE "SDL_MOUSE_RELATIVE_SPEED_SCALE"
2991
2992/**
2993 * A variable controlling whether the system mouse acceleration curve is used
2994 * for relative mouse motion.
2995 *
2996 * The variable can be set to the following values:
2997 *
2998 * - "0": Relative mouse motion will be unscaled. (default)
2999 * - "1": Relative mouse motion will be scaled using the system mouse
3000 * acceleration curve.
3001 *
3002 * If SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE is set, that will be applied after
3003 * system speed scale.
3004 *
3005 * This hint can be set anytime.
3006 *
3007 * \since This hint is available since SDL 3.2.0.
3008 */
3009#define SDL_HINT_MOUSE_RELATIVE_SYSTEM_SCALE "SDL_MOUSE_RELATIVE_SYSTEM_SCALE"
3010
3011/**
3012 * A variable controlling whether a motion event should be generated for mouse
3013 * warping in relative mode.
3014 *
3015 * The variable can be set to the following values:
3016 *
3017 * - "0": Warping the mouse will not generate a motion event in relative mode
3018 * - "1": Warping the mouse will generate a motion event in relative mode
3019 *
3020 * By default warping the mouse will not generate motion events in relative
3021 * mode. This avoids the application having to filter out large relative
3022 * motion due to warping.
3023 *
3024 * This hint can be set anytime.
3025 *
3026 * \since This hint is available since SDL 3.2.0.
3027 */
3028#define SDL_HINT_MOUSE_RELATIVE_WARP_MOTION "SDL_MOUSE_RELATIVE_WARP_MOTION"
3029
3030/**
3031 * A variable controlling whether the hardware cursor stays visible when
3032 * relative mode is active.
3033 *
3034 * This variable can be set to the following values:
3035 *
3036 * - "0": The cursor will be hidden while relative mode is active (default)
3037 * - "1": The cursor will remain visible while relative mode is active
3038 *
3039 * Note that for systems without raw hardware inputs, relative mode is
3040 * implemented using warping, so the hardware cursor will visibly warp between
3041 * frames if this is enabled on those systems.
3042 *
3043 * This hint can be set anytime.
3044 *
3045 * \since This hint is available since SDL 3.2.0.
3046 */
3047#define SDL_HINT_MOUSE_RELATIVE_CURSOR_VISIBLE "SDL_MOUSE_RELATIVE_CURSOR_VISIBLE"
3048
3049/**
3050 * A variable controlling whether mouse events should generate synthetic touch
3051 * events.
3052 *
3053 * The variable can be set to the following values:
3054 *
3055 * - "0": Mouse events will not generate touch events. (default for desktop
3056 * platforms)
3057 * - "1": Mouse events will generate touch events. (default for mobile
3058 * platforms, such as Android and iOS)
3059 *
3060 * This hint can be set anytime.
3061 *
3062 * \since This hint is available since SDL 3.2.0.
3063 */
3064#define SDL_HINT_MOUSE_TOUCH_EVENTS "SDL_MOUSE_TOUCH_EVENTS"
3065
3066/**
3067 * A variable controlling whether the keyboard should be muted on the console.
3068 *
3069 * Normally the keyboard is muted while SDL applications are running so that
3070 * keyboard input doesn't show up as key strokes on the console. This hint
3071 * allows you to turn that off for debugging purposes.
3072 *
3073 * The variable can be set to the following values:
3074 *
3075 * - "0": Allow keystrokes to go through to the console.
3076 * - "1": Mute keyboard input so it doesn't show up on the console. (default)
3077 *
3078 * This hint should be set before SDL is initialized.
3079 *
3080 * \since This hint is available since SDL 3.2.0.
3081 */
3082#define SDL_HINT_MUTE_CONSOLE_KEYBOARD "SDL_MUTE_CONSOLE_KEYBOARD"
3083
3084/**
3085 * Tell SDL not to catch the SIGINT or SIGTERM signals on POSIX platforms.
3086 *
3087 * The variable can be set to the following values:
3088 *
3089 * - "0": SDL will install a SIGINT and SIGTERM handler, and when it catches a
3090 * signal, convert it into an SDL_EVENT_QUIT event. (default)
3091 * - "1": SDL will not install a signal handler at all.
3092 *
3093 * This hint should be set before SDL is initialized.
3094 *
3095 * \since This hint is available since SDL 3.2.0.
3096 */
3097#define SDL_HINT_NO_SIGNAL_HANDLERS "SDL_NO_SIGNAL_HANDLERS"
3098
3099/**
3100 * Specify the OpenGL library to load.
3101 *
3102 * This hint should be set before creating an OpenGL window or creating an
3103 * OpenGL context. If this hint isn't set, SDL will choose a reasonable
3104 * default.
3105 *
3106 * \since This hint is available since SDL 3.2.0.
3107 */
3108#define SDL_HINT_OPENGL_LIBRARY "SDL_OPENGL_LIBRARY"
3109
3110/**
3111 * Specify the EGL library to load.
3112 *
3113 * This hint should be set before creating an OpenGL window or creating an
3114 * OpenGL context. This hint is only considered if SDL is using EGL to manage
3115 * OpenGL contexts. If this hint isn't set, SDL will choose a reasonable
3116 * default.
3117 *
3118 * \since This hint is available since SDL 3.2.0.
3119 */
3120#define SDL_HINT_EGL_LIBRARY "SDL_EGL_LIBRARY"
3121
3122/**
3123 * A variable controlling what driver to use for OpenGL ES contexts.
3124 *
3125 * On some platforms, currently Windows and X11, OpenGL drivers may support
3126 * creating contexts with an OpenGL ES profile. By default SDL uses these
3127 * profiles, when available, otherwise it attempts to load an OpenGL ES
3128 * library, e.g. that provided by the ANGLE project. This variable controls
3129 * whether SDL follows this default behaviour or will always load an OpenGL ES
3130 * library.
3131 *
3132 * Circumstances where this is useful include:
3133 *
3134 * - Testing an app with a particular OpenGL ES implementation, e.g ANGLE, or
3135 * emulator, e.g. those from ARM, Imagination or Qualcomm.
3136 * - Resolving OpenGL ES function addresses at link time by linking with the
3137 * OpenGL ES library instead of querying them at run time with
3138 * SDL_GL_GetProcAddress().
3139 *
3140 * Caution: for an application to work with the default behaviour across
3141 * different OpenGL drivers it must query the OpenGL ES function addresses at
3142 * run time using SDL_GL_GetProcAddress().
3143 *
3144 * This variable is ignored on most platforms because OpenGL ES is native or
3145 * not supported.
3146 *
3147 * The variable can be set to the following values:
3148 *
3149 * - "0": Use ES profile of OpenGL, if available. (default)
3150 * - "1": Load OpenGL ES library using the default library names.
3151 *
3152 * This hint should be set before SDL is initialized.
3153 *
3154 * \since This hint is available since SDL 3.2.0.
3155 */
3156#define SDL_HINT_OPENGL_ES_DRIVER "SDL_OPENGL_ES_DRIVER"
3157
3158/**
3159 * A variable controlling whether to force an sRGB-capable OpenGL context.
3160 *
3161 * At OpenGL context creation time, some platforms can request an sRGB-capable
3162 * context. However, sometimes any form of the request can cause surprising
3163 * results on some drivers, platforms, and hardware. Usually the surprise is
3164 * in the form of rendering that is either a little darker or a little
3165 * brighter than intended.
3166 *
3167 * This hint allows the user to override the app's sRGB requests and either
3168 * force a specific value, or avoid requesting anything at all, depending on
3169 * what makes things work correctly for their system.
3170 *
3171 * This is meant as a fail-safe; apps should probably not explicitly set this,
3172 * and most users should not, either.
3173 *
3174 * Note that some platforms cannot make this request at all, and on all
3175 * platforms this request can be denied by the operating system.
3176 *
3177 * In addition to attempting to obtain the type of sRGB-capable OpenGL context
3178 * requested by this hint, SDL will try to force the state of
3179 * GL_FRAMEBUFFER_SRGB on the new context, if appropriate.
3180 *
3181 * The variable can be set to the following values:
3182 *
3183 * - "0": Force a request for an OpenGL context that is _not_ sRGB-capable.
3184 * - "1": Force a request for an OpenGL context that _is_ sRGB-capable.
3185 * - "skip": Don't make any request for an sRGB-capable context (don't specify
3186 * the attribute at all during context creation time).
3187 * - any other string is undefined behavior.
3188 *
3189 * If unset, or set to an empty string, SDL will make a request using the
3190 * value the app specified with the SDL_GL_FRAMEBUFFER_SRGB_CAPABLE attribute.
3191 *
3192 * This hint should be set before an OpenGL context is created.
3193 *
3194 * \since This hint is available since SDL 3.4.2.
3195 */
3196#define SDL_HINT_OPENGL_FORCE_SRGB_FRAMEBUFFER "SDL_OPENGL_FORCE_SRGB_FRAMEBUFFER"
3197
3198/**
3199 * Mechanism to specify openvr_api library location
3200 *
3201 * By default, when using the OpenVR driver, it will search for the API
3202 * library in the current folder. But, if you wish to use a system API you can
3203 * specify that by using this hint. This should be the full or relative path
3204 * to a .dll on Windows or .so on Linux.
3205 *
3206 * \since This hint is available since SDL 3.2.0.
3207 */
3208#define SDL_HINT_OPENVR_LIBRARY "SDL_OPENVR_LIBRARY"
3209
3210/**
3211 * A variable controlling which orientations are allowed on iOS/Android.
3212 *
3213 * In some circumstances it is necessary to be able to explicitly control
3214 * which UI orientations are allowed.
3215 *
3216 * This variable is a space delimited list of the following values:
3217 *
3218 * - "LandscapeLeft"
3219 * - "LandscapeRight"
3220 * - "Portrait"
3221 * - "PortraitUpsideDown"
3222 *
3223 * This hint should be set before SDL is initialized.
3224 *
3225 * \since This hint is available since SDL 3.2.0.
3226 */
3227#define SDL_HINT_ORIENTATIONS "SDL_ORIENTATIONS"
3228
3229/**
3230 * A variable controlling the use of a sentinel event when polling the event
3231 * queue.
3232 *
3233 * When polling for events, SDL_PumpEvents is used to gather new events from
3234 * devices. If a device keeps producing new events between calls to
3235 * SDL_PumpEvents, a poll loop will become stuck until the new events stop.
3236 * This is most noticeable when moving a high frequency mouse.
3237 *
3238 * The variable can be set to the following values:
3239 *
3240 * - "0": Disable poll sentinels.
3241 * - "1": Enable poll sentinels. (default)
3242 *
3243 * This hint can be set anytime.
3244 *
3245 * \since This hint is available since SDL 3.2.0.
3246 */
3247#define SDL_HINT_POLL_SENTINEL "SDL_POLL_SENTINEL"
3248
3249/**
3250 * Override for SDL_GetPreferredLocales().
3251 *
3252 * If set, this will be favored over anything the OS might report for the
3253 * user's preferred locales. Changing this hint at runtime will not generate a
3254 * SDL_EVENT_LOCALE_CHANGED event (but if you can change the hint, you can
3255 * push your own event, if you want).
3256 *
3257 * The format of this hint is a comma-separated list of language and locale,
3258 * combined with an underscore, as is a common format: "en_GB". Locale is
3259 * optional: "en". So you might have a list like this: "en_GB,jp,es_PT"
3260 *
3261 * This hint can be set anytime.
3262 *
3263 * \since This hint is available since SDL 3.2.0.
3264 */
3265#define SDL_HINT_PREFERRED_LOCALES "SDL_PREFERRED_LOCALES"
3266
3267/**
3268 * A variable that decides whether to send SDL_EVENT_QUIT when closing the
3269 * last window.
3270 *
3271 * The variable can be set to the following values:
3272 *
3273 * - "0": SDL will not send an SDL_EVENT_QUIT event when the last window is
3274 * requesting to close. Note that in this case, there are still other
3275 * legitimate reasons one might get an SDL_EVENT_QUIT event: choosing "Quit"
3276 * from the macOS menu bar, sending a SIGINT (ctrl-c) on Unix, etc.
3277 * - "1": SDL will send a quit event when the last window is requesting to
3278 * close. (default)
3279 *
3280 * If there is at least one active system tray icon, SDL_EVENT_QUIT will
3281 * instead be sent when both the last window will be closed and the last tray
3282 * icon will be destroyed.
3283 *
3284 * This hint can be set anytime.
3285 *
3286 * \since This hint is available since SDL 3.2.0.
3287 */
3288#define SDL_HINT_QUIT_ON_LAST_WINDOW_CLOSE "SDL_QUIT_ON_LAST_WINDOW_CLOSE"
3289
3290/**
3291 * A variable controlling whether the Direct3D device is initialized for
3292 * thread-safe operations.
3293 *
3294 * The variable can be set to the following values:
3295 *
3296 * - "0": Thread-safety is not enabled. (default)
3297 * - "1": Thread-safety is enabled.
3298 *
3299 * This hint should be set before creating a renderer.
3300 *
3301 * \since This hint is available since SDL 3.2.0.
3302 */
3303#define SDL_HINT_RENDER_DIRECT3D_THREADSAFE "SDL_RENDER_DIRECT3D_THREADSAFE"
3304
3305/**
3306 * A variable controlling whether to enable Direct3D 11+'s Debug Layer.
3307 *
3308 * This variable does not have any effect on the Direct3D 9 based renderer.
3309 *
3310 * The variable can be set to the following values:
3311 *
3312 * - "0": Disable Debug Layer use. (default)
3313 * - "1": Enable Debug Layer use.
3314 *
3315 * This hint should be set before creating a renderer.
3316 *
3317 * \since This hint is available since SDL 3.2.0.
3318 */
3319#define SDL_HINT_RENDER_DIRECT3D11_DEBUG "SDL_RENDER_DIRECT3D11_DEBUG"
3320
3321/**
3322 * A variable controlling whether to use the Direct3D 11 WARP software
3323 * rasterizer.
3324 *
3325 * For more information, see:
3326 * https://learn.microsoft.com/en-us/windows/win32/direct3darticles/directx-warp
3327 *
3328 * The variable can be set to the following values:
3329 *
3330 * - "0": Disable WARP rasterizer. (default)
3331 * - "1": Enable WARP rasterizer.
3332 *
3333 * This hint should be set before creating a renderer.
3334 *
3335 * \since This hint is available since SDL 3.4.0.
3336 */
3337#define SDL_HINT_RENDER_DIRECT3D11_WARP "SDL_RENDER_DIRECT3D11_WARP"
3338
3339/**
3340 * A variable controlling whether to enable Vulkan Validation Layers.
3341 *
3342 * This variable can be set to the following values:
3343 *
3344 * - "0": Disable Validation Layer use
3345 * - "1": Enable Validation Layer use
3346 *
3347 * By default, SDL does not use Vulkan Validation Layers.
3348 *
3349 * \since This hint is available since SDL 3.2.0.
3350 */
3351#define SDL_HINT_RENDER_VULKAN_DEBUG "SDL_RENDER_VULKAN_DEBUG"
3352
3353/**
3354 * A variable controlling whether to create the GPU device in debug mode.
3355 *
3356 * This variable can be set to the following values:
3357 *
3358 * - "0": Disable debug mode use (default)
3359 * - "1": Enable debug mode use
3360 *
3361 * This hint should be set before creating a renderer.
3362 *
3363 * \since This hint is available since SDL 3.2.0.
3364 */
3365#define SDL_HINT_RENDER_GPU_DEBUG "SDL_RENDER_GPU_DEBUG"
3366
3367/**
3368 * A variable controlling whether to prefer a low-power GPU on multi-GPU
3369 * systems.
3370 *
3371 * This variable can be set to the following values:
3372 *
3373 * - "0": Prefer high-performance GPU (default)
3374 * - "1": Prefer low-power GPU
3375 *
3376 * This hint should be set before creating a renderer.
3377 *
3378 * \since This hint is available since SDL 3.2.0.
3379 */
3380#define SDL_HINT_RENDER_GPU_LOW_POWER "SDL_RENDER_GPU_LOW_POWER"
3381
3382/**
3383 * A variable specifying which render driver to use.
3384 *
3385 * If the application doesn't pick a specific renderer to use, this variable
3386 * specifies the name of the preferred renderer. If the preferred renderer
3387 * can't be initialized, creating a renderer will fail.
3388 *
3389 * This variable is case insensitive and can be set to the following values:
3390 *
3391 * - "direct3d"
3392 * - "direct3d11"
3393 * - "direct3d12"
3394 * - "opengl"
3395 * - "opengles2"
3396 * - "opengles"
3397 * - "metal"
3398 * - "vulkan"
3399 * - "gpu"
3400 * - "software"
3401 *
3402 * This hint accepts a comma-separated list of driver names, and each will be
3403 * tried in the order listed when creating a renderer until one succeeds or
3404 * all of them fail.
3405 *
3406 * The default varies by platform, but it's the first one in the list that is
3407 * available on the current platform.
3408 *
3409 * This hint should be set before creating a renderer.
3410 *
3411 * \since This hint is available since SDL 3.2.0.
3412 */
3413#define SDL_HINT_RENDER_DRIVER "SDL_RENDER_DRIVER"
3414
3415/**
3416 * A variable controlling how the 2D render API renders lines.
3417 *
3418 * The variable can be set to the following values:
3419 *
3420 * - "0": Use the default line drawing method (Bresenham's line algorithm)
3421 * - "1": Use the driver point API using Bresenham's line algorithm (correct,
3422 * draws many points)
3423 * - "2": Use the driver line API (occasionally misses line endpoints based on
3424 * hardware driver quirks
3425 * - "3": Use the driver geometry API (correct, draws thicker diagonal lines)
3426 *
3427 * This hint should be set before creating a renderer.
3428 *
3429 * \since This hint is available since SDL 3.2.0.
3430 */
3431#define SDL_HINT_RENDER_LINE_METHOD "SDL_RENDER_LINE_METHOD"
3432
3433/**
3434 * A variable controlling whether the Metal render driver select low power
3435 * device over default one.
3436 *
3437 * The variable can be set to the following values:
3438 *
3439 * - "0": Use the preferred OS device. (default)
3440 * - "1": Select a low power device.
3441 *
3442 * This hint should be set before creating a renderer.
3443 *
3444 * \since This hint is available since SDL 3.2.0.
3445 */
3446#define SDL_HINT_RENDER_METAL_PREFER_LOW_POWER_DEVICE "SDL_RENDER_METAL_PREFER_LOW_POWER_DEVICE"
3447
3448/**
3449 * A variable controlling whether updates to the SDL screen surface should be
3450 * synchronized with the vertical refresh, to avoid tearing.
3451 *
3452 * This hint overrides the application preference when creating a renderer.
3453 *
3454 * The variable can be set to the following values:
3455 *
3456 * - "0": Disable vsync. (default)
3457 * - "1": Enable vsync.
3458 *
3459 * This hint should be set before creating a renderer.
3460 *
3461 * \since This hint is available since SDL 3.2.0.
3462 */
3463#define SDL_HINT_RENDER_VSYNC "SDL_RENDER_VSYNC"
3464
3465/**
3466 * A variable to control whether the return key on the soft keyboard should
3467 * hide the soft keyboard on Android and iOS.
3468 *
3469 * This hint sets the default value of SDL_PROP_TEXTINPUT_MULTILINE_BOOLEAN.
3470 *
3471 * The variable can be set to the following values:
3472 *
3473 * - "0": The return key will be handled as a key event. (default)
3474 * - "1": The return key will hide the keyboard.
3475 *
3476 * This hint can be set anytime.
3477 *
3478 * \since This hint is available since SDL 3.2.0.
3479 */
3480#define SDL_HINT_RETURN_KEY_HIDES_IME "SDL_RETURN_KEY_HIDES_IME"
3481
3482/**
3483 * A variable containing a list of ROG gamepad capable mice.
3484 *
3485 * The format of the string is a comma separated list of USB VID/PID pairs in
3486 * hexadecimal form, e.g.
3487 *
3488 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
3489 *
3490 * The variable can also take the form of "@file", in which case the named
3491 * file will be loaded and interpreted as the value of the variable.
3492 *
3493 * This hint should be set before SDL is initialized.
3494 *
3495 * \since This hint is available since SDL 3.2.0.
3496 *
3497 * \sa SDL_HINT_ROG_GAMEPAD_MICE_EXCLUDED
3498 */
3499#define SDL_HINT_ROG_GAMEPAD_MICE "SDL_ROG_GAMEPAD_MICE"
3500
3501/**
3502 * A variable containing a list of devices that are not ROG gamepad capable
3503 * mice.
3504 *
3505 * This will override SDL_HINT_ROG_GAMEPAD_MICE and the built in device list.
3506 *
3507 * The format of the string is a comma separated list of USB VID/PID pairs in
3508 * hexadecimal form, e.g.
3509 *
3510 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
3511 *
3512 * The variable can also take the form of "@file", in which case the named
3513 * file will be loaded and interpreted as the value of the variable.
3514 *
3515 * This hint should be set before SDL is initialized.
3516 *
3517 * \since This hint is available since SDL 3.2.0.
3518 */
3519#define SDL_HINT_ROG_GAMEPAD_MICE_EXCLUDED "SDL_ROG_GAMEPAD_MICE_EXCLUDED"
3520
3521/**
3522 * A variable controlling the width of the PS2's framebuffer in pixels.
3523 *
3524 * By default, the variable is "640".
3525 *
3526 * \since This hint is available since SDL 3.4.0.
3527 */
3528#define SDL_HINT_PS2_GS_WIDTH "SDL_PS2_GS_WIDTH"
3529
3530/**
3531 * A variable controlling the height of the PS2's framebuffer in pixels.
3532 *
3533 * By default, the variable is "448".
3534 *
3535 * \since This hint is available since SDL 3.4.0.
3536 */
3537#define SDL_HINT_PS2_GS_HEIGHT "SDL_PS2_GS_HEIGHT"
3538
3539/**
3540 * A variable controlling whether the signal is interlaced or progressive.
3541 *
3542 * The variable can be set to the following values:
3543 *
3544 * - "0": Image is interlaced. (default)
3545 * - "1": Image is progressive.
3546 *
3547 * \since This hint is available since SDL 3.4.0.
3548 */
3549#define SDL_HINT_PS2_GS_PROGRESSIVE "SDL_PS2_GS_PROGRESSIVE"
3550
3551/**
3552 * A variable controlling the video mode of the console.
3553 *
3554 * The variable can be set to the following values:
3555 *
3556 * - "": Console-native. (default)
3557 * - "NTSC": 60hz region.
3558 * - "PAL": 50hz region.
3559 *
3560 * \since This hint is available since SDL 3.4.0.
3561 */
3562#define SDL_HINT_PS2_GS_MODE "SDL_PS2_GS_MODE"
3563
3564/**
3565 * A variable controlling which Dispmanx layer to use on a Raspberry PI.
3566 *
3567 * Also known as Z-order. The variable can take a negative or positive value.
3568 * The default is 10000.
3569 *
3570 * This hint should be set before SDL is initialized.
3571 *
3572 * \since This hint is available since SDL 3.2.0.
3573 */
3574#define SDL_HINT_RPI_VIDEO_LAYER "SDL_RPI_VIDEO_LAYER"
3575
3576/**
3577 * Specify an "activity name" for screensaver inhibition.
3578 *
3579 * Some platforms, notably Linux desktops, list the applications which are
3580 * inhibiting the screensaver or other power-saving features.
3581 *
3582 * This hint lets you specify the "activity name" sent to the OS when
3583 * SDL_DisableScreenSaver() is used (or the screensaver is automatically
3584 * disabled). The contents of this hint are used when the screensaver is
3585 * disabled. You should use a string that describes what your program is doing
3586 * (and, therefore, why the screensaver is disabled). For example, "Playing a
3587 * game" or "Watching a video".
3588 *
3589 * Setting this to "" or leaving it unset will have SDL use a reasonable
3590 * default: "Playing a game" or something similar.
3591 *
3592 * This hint should be set before calling SDL_DisableScreenSaver()
3593 *
3594 * \since This hint is available since SDL 3.2.0.
3595 */
3596#define SDL_HINT_SCREENSAVER_INHIBIT_ACTIVITY_NAME "SDL_SCREENSAVER_INHIBIT_ACTIVITY_NAME"
3597
3598/**
3599 * A variable controlling whether SDL calls dbus_shutdown() on quit.
3600 *
3601 * This is useful as a debug tool to validate memory leaks, but shouldn't ever
3602 * be set in production applications, as other libraries used by the
3603 * application might use dbus under the hood and this can cause crashes if
3604 * they continue after SDL_Quit().
3605 *
3606 * The variable can be set to the following values:
3607 *
3608 * - "0": SDL will not call dbus_shutdown() on quit. (default)
3609 * - "1": SDL will call dbus_shutdown() on quit.
3610 *
3611 * This hint can be set anytime.
3612 *
3613 * \since This hint is available since SDL 3.2.0.
3614 */
3615#define SDL_HINT_SHUTDOWN_DBUS_ON_QUIT "SDL_SHUTDOWN_DBUS_ON_QUIT"
3616
3617/**
3618 * A variable that specifies a backend to use for title storage.
3619 *
3620 * By default, SDL will try all available storage backends in a reasonable
3621 * order until it finds one that can work, but this hint allows the app or
3622 * user to force a specific target, such as "pc" if, say, you are on Steam but
3623 * want to avoid SteamRemoteStorage for title data.
3624 *
3625 * This hint should be set before SDL is initialized.
3626 *
3627 * \since This hint is available since SDL 3.2.0.
3628 */
3629#define SDL_HINT_STORAGE_TITLE_DRIVER "SDL_STORAGE_TITLE_DRIVER"
3630
3631/**
3632 * A variable that specifies a backend to use for user storage.
3633 *
3634 * By default, SDL will try all available storage backends in a reasonable
3635 * order until it finds one that can work, but this hint allows the app or
3636 * user to force a specific target, such as "pc" if, say, you are on Steam but
3637 * want to avoid SteamRemoteStorage for user data.
3638 *
3639 * This hint should be set before SDL is initialized.
3640 *
3641 * \since This hint is available since SDL 3.2.0.
3642 */
3643#define SDL_HINT_STORAGE_USER_DRIVER "SDL_STORAGE_USER_DRIVER"
3644
3645/**
3646 * Specifies whether SDL_THREAD_PRIORITY_TIME_CRITICAL should be treated as
3647 * realtime.
3648 *
3649 * On some platforms, like Linux, a realtime priority thread may be subject to
3650 * restrictions that require special handling by the application. This hint
3651 * exists to let SDL know that the app is prepared to handle said
3652 * restrictions.
3653 *
3654 * On Linux, SDL will apply the following configuration to any thread that
3655 * becomes realtime:
3656 *
3657 * - The SCHED_RESET_ON_FORK bit will be set on the scheduling policy,
3658 * - An RLIMIT_RTTIME budget will be configured to the rtkit specified limit.
3659 * - Exceeding this limit will result in the kernel sending SIGKILL to the
3660 * app, refer to the man pages for more information.
3661 *
3662 * The variable can be set to the following values:
3663 *
3664 * - "0": default platform specific behaviour
3665 * - "1": Force SDL_THREAD_PRIORITY_TIME_CRITICAL to a realtime scheduling
3666 * policy
3667 *
3668 * This hint should be set before calling SDL_SetCurrentThreadPriority()
3669 *
3670 * \since This hint is available since SDL 3.2.0.
3671 */
3672#define SDL_HINT_THREAD_FORCE_REALTIME_TIME_CRITICAL "SDL_THREAD_FORCE_REALTIME_TIME_CRITICAL"
3673
3674/**
3675 * A string specifying additional information to use with
3676 * SDL_SetCurrentThreadPriority.
3677 *
3678 * By default SDL_SetCurrentThreadPriority will make appropriate system
3679 * changes in order to apply a thread priority. For example on systems using
3680 * pthreads the scheduler policy is changed automatically to a policy that
3681 * works well with a given priority. Code which has specific requirements can
3682 * override SDL's default behavior with this hint.
3683 *
3684 * pthread hint values are "current", "other", "fifo" and "rr". Currently no
3685 * other platform hint values are defined but may be in the future.
3686 *
3687 * On Linux, the kernel may send SIGKILL to realtime tasks which exceed the
3688 * distro configured execution budget for rtkit. This budget can be queried
3689 * through RLIMIT_RTTIME after calling SDL_SetCurrentThreadPriority().
3690 *
3691 * This hint should be set before calling SDL_SetCurrentThreadPriority()
3692 *
3693 * \since This hint is available since SDL 3.2.0.
3694 */
3695#define SDL_HINT_THREAD_PRIORITY_POLICY "SDL_THREAD_PRIORITY_POLICY"
3696
3697/**
3698 * A variable that controls the timer resolution, in milliseconds.
3699 *
3700 * The higher resolution the timer, the more frequently the CPU services timer
3701 * interrupts, and the more precise delays are, but this takes up power and
3702 * CPU time. This hint is only used on Windows.
3703 *
3704 * See this blog post for more information:
3705 * http://randomascii.wordpress.com/2013/07/08/windows-timer-resolution-megawatts-wasted/
3706 *
3707 * The default value is "1".
3708 *
3709 * If this variable is set to "0", the system timer resolution is not set.
3710 *
3711 * This hint can be set anytime.
3712 *
3713 * \since This hint is available since SDL 3.2.0.
3714 */
3715#define SDL_HINT_TIMER_RESOLUTION "SDL_TIMER_RESOLUTION"
3716
3717/**
3718 * A variable controlling whether touch events should generate synthetic mouse
3719 * events.
3720 *
3721 * The variable can be set to the following values:
3722 *
3723 * - "0": Touch events will not generate mouse events.
3724 * - "1": Touch events will generate mouse events. (default)
3725 *
3726 * This hint can be set anytime.
3727 *
3728 * \since This hint is available since SDL 3.2.0.
3729 */
3730#define SDL_HINT_TOUCH_MOUSE_EVENTS "SDL_TOUCH_MOUSE_EVENTS"
3731
3732/**
3733 * A variable controlling whether trackpads should be treated as touch
3734 * devices.
3735 *
3736 * On macOS (and possibly other platforms in the future), SDL will report
3737 * touches on a trackpad as mouse input, which is generally what users expect
3738 * from this device; however, these are often actually full multitouch-capable
3739 * touch devices, so it might be preferable to some apps to treat them as
3740 * such.
3741 *
3742 * The variable can be set to the following values:
3743 *
3744 * - "0": Trackpad will send mouse events. (default)
3745 * - "1": Trackpad will send touch events.
3746 *
3747 * This hint should be set before SDL is initialized.
3748 *
3749 * \since This hint is available since SDL 3.2.0.
3750 */
3751#define SDL_HINT_TRACKPAD_IS_TOUCH_ONLY "SDL_TRACKPAD_IS_TOUCH_ONLY"
3752
3753/**
3754 * A variable controlling whether the Android / tvOS remotes should be listed
3755 * as joystick devices, instead of sending keyboard events.
3756 *
3757 * The variable can be set to the following values:
3758 *
3759 * - "0": Remotes send enter/escape/arrow key events.
3760 * - "1": Remotes are available as 2 axis, 2 button joysticks. (default)
3761 *
3762 * This hint should be set before SDL is initialized.
3763 *
3764 * \since This hint is available since SDL 3.2.0.
3765 */
3766#define SDL_HINT_TV_REMOTE_AS_JOYSTICK "SDL_TV_REMOTE_AS_JOYSTICK"
3767
3768/**
3769 * A variable controlling whether the screensaver is enabled.
3770 *
3771 * The variable can be set to the following values:
3772 *
3773 * - "0": Disable screensaver. (default)
3774 * - "1": Enable screensaver.
3775 *
3776 * This hint should be set before SDL is initialized.
3777 *
3778 * \since This hint is available since SDL 3.2.0.
3779 */
3780#define SDL_HINT_VIDEO_ALLOW_SCREENSAVER "SDL_VIDEO_ALLOW_SCREENSAVER"
3781
3782/**
3783 * A comma separated list containing the names of the displays that SDL should
3784 * sort to the front of the display list.
3785 *
3786 * When this hint is set, displays with matching name strings will be
3787 * prioritized in the list of displays, as exposed by calling
3788 * SDL_GetDisplays(), with the first listed becoming the primary display. The
3789 * naming convention can vary depending on the environment, but it is usually
3790 * a connector name (e.g. 'DP-1', 'DP-2', 'HDMI-A-1', etc...).
3791 *
3792 * On Wayland desktops, the connector names associated with displays can be
3793 * found in the `name` property of the info output from `wayland-info -i
3794 * wl_output`. On X11 desktops, the `xrandr` utility can be used to retrieve
3795 * the connector names associated with displays.
3796 *
3797 * This hint is currently supported on the following drivers:
3798 *
3799 * - KMSDRM (kmsdrm)
3800 * - Wayland (wayland)
3801 * - X11 (x11)
3802 *
3803 * This hint should be set before SDL is initialized.
3804 *
3805 * \since This hint is available since SDL 3.2.0.
3806 */
3807#define SDL_HINT_VIDEO_DISPLAY_PRIORITY "SDL_VIDEO_DISPLAY_PRIORITY"
3808
3809/**
3810 * Tell the video driver that we only want a double buffer.
3811 *
3812 * By default, most lowlevel 2D APIs will use a triple buffer scheme that
3813 * wastes no CPU time on waiting for vsync after issuing a flip, but
3814 * introduces a frame of latency. On the other hand, using a double buffer
3815 * scheme instead is recommended for cases where low latency is an important
3816 * factor because we save a whole frame of latency.
3817 *
3818 * We do so by waiting for vsync immediately after issuing a flip, usually
3819 * just after eglSwapBuffers call in the backend's *_SwapWindow function.
3820 *
3821 * This hint is currently supported on the following drivers:
3822 *
3823 * - Raspberry Pi (raspberrypi)
3824 * - Wayland (wayland)
3825 *
3826 * This hint should be set before SDL is initialized.
3827 *
3828 * \since This hint is available since SDL 3.2.0.
3829 */
3830#define SDL_HINT_VIDEO_DOUBLE_BUFFER "SDL_VIDEO_DOUBLE_BUFFER"
3831
3832/**
3833 * A variable that specifies a video backend to use.
3834 *
3835 * By default, SDL will try all available video backends in a reasonable order
3836 * until it finds one that can work, but this hint allows the app or user to
3837 * force a specific target, such as "x11" if, say, you are on Wayland but want
3838 * to try talking to the X server instead.
3839 *
3840 * This hint accepts a comma-separated list of driver names, and each will be
3841 * tried in the order listed during init, until one succeeds or all of them
3842 * fail.
3843 *
3844 * This hint should be set before SDL is initialized.
3845 *
3846 * \since This hint is available since SDL 3.2.0.
3847 */
3848#define SDL_HINT_VIDEO_DRIVER "SDL_VIDEO_DRIVER"
3849
3850/**
3851 * A variable controlling whether the dummy video driver saves output frames.
3852 *
3853 * - "0": Video frames are not saved to disk. (default)
3854 * - "1": Video frames are saved to files in the format "SDL_windowX-Y.bmp",
3855 * where X is the window ID, and Y is the frame number.
3856 *
3857 * This hint can be set anytime.
3858 *
3859 * \since This hint is available since SDL 3.2.0.
3860 */
3861#define SDL_HINT_VIDEO_DUMMY_SAVE_FRAMES "SDL_VIDEO_DUMMY_SAVE_FRAMES"
3862
3863/**
3864 * If eglGetPlatformDisplay fails, fall back to calling eglGetDisplay.
3865 *
3866 * The variable can be set to one of the following values:
3867 *
3868 * - "0": Do not fall back to eglGetDisplay.
3869 * - "1": Fall back to eglGetDisplay if eglGetPlatformDisplay fails. (default)
3870 *
3871 * This hint should be set before SDL is initialized.
3872 *
3873 * \since This hint is available since SDL 3.2.0.
3874 */
3875#define SDL_HINT_VIDEO_EGL_ALLOW_GETDISPLAY_FALLBACK "SDL_VIDEO_EGL_ALLOW_GETDISPLAY_FALLBACK"
3876
3877/**
3878 * A variable controlling whether the OpenGL context should be created with
3879 * EGL.
3880 *
3881 * The variable can be set to the following values:
3882 *
3883 * - "0": Use platform-specific GL context creation API (GLX, WGL, CGL, etc).
3884 * (default)
3885 * - "1": Use EGL
3886 *
3887 * This hint should be set before SDL is initialized.
3888 *
3889 * \since This hint is available since SDL 3.2.0.
3890 */
3891#define SDL_HINT_VIDEO_FORCE_EGL "SDL_VIDEO_FORCE_EGL"
3892
3893/**
3894 * A variable that specifies the policy for fullscreen Spaces on macOS.
3895 *
3896 * The variable can be set to the following values:
3897 *
3898 * - "0": Disable Spaces support (FULLSCREEN_DESKTOP won't use them and
3899 * SDL_WINDOW_RESIZABLE windows won't offer the "fullscreen" button on their
3900 * titlebars).
3901 * - "1": Enable Spaces support (FULLSCREEN_DESKTOP will use them and
3902 * SDL_WINDOW_RESIZABLE windows will offer the "fullscreen" button on their
3903 * titlebars). (default)
3904 *
3905 * This hint should be set before creating a window.
3906 *
3907 * \since This hint is available since SDL 3.2.0.
3908 */
3909#define SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES "SDL_VIDEO_MAC_FULLSCREEN_SPACES"
3910
3911/**
3912 * A variable that specifies the menu visibility when a window is fullscreen
3913 * in Spaces on macOS.
3914 *
3915 * The variable can be set to the following values:
3916 *
3917 * - "0": The menu will be hidden when the window is in a fullscreen space,
3918 * and not accessible by moving the mouse to the top of the screen.
3919 * - "1": The menu will be accessible when the window is in a fullscreen
3920 * space.
3921 * - "auto": The menu will be hidden if fullscreen mode was toggled on
3922 * programmatically via `SDL_SetWindowFullscreen()`, and accessible if
3923 * fullscreen was entered via the "fullscreen" button on the window title
3924 * bar. (default)
3925 *
3926 * This hint can be set anytime.
3927 *
3928 * \since This hint is available since SDL 3.2.0.
3929 */
3930#define SDL_HINT_VIDEO_MAC_FULLSCREEN_MENU_VISIBILITY "SDL_VIDEO_MAC_FULLSCREEN_MENU_VISIBILITY"
3931
3932/**
3933 * A variable indicating whether the metal layer drawable size should be
3934 * updated for the SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED event on macOS.
3935 *
3936 * The variable can be set to the following values:
3937 *
3938 * - "0": the metal layer drawable size will not be updated on the
3939 * SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED event.
3940 * - "1": the metal layer drawable size will be updated on the
3941 * SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED event. (default)
3942 *
3943 * This hint should be set before SDL_Metal_CreateView called.
3944 *
3945 * \since This hint is available since SDL 3.4.0.
3946 */
3947#define SDL_HINT_VIDEO_METAL_AUTO_RESIZE_DRAWABLE "SDL_VIDEO_METAL_AUTO_RESIZE_DRAWABLE"
3948
3949/**
3950 * A variable controlling whether SDL will attempt to automatically set the
3951 * destination display to a mode most closely matching that of the previous
3952 * display if an exclusive fullscreen window is moved onto it.
3953 *
3954 * The variable can be set to the following values:
3955 *
3956 * - "0": SDL will not attempt to automatically set a matching mode on the
3957 * destination display. If an exclusive fullscreen window is moved to a new
3958 * display, the window will become fullscreen desktop.
3959 * - "1": SDL will attempt to automatically set a mode on the destination
3960 * display that most closely matches the mode of the display that the
3961 * exclusive fullscreen window was previously on. (default)
3962 *
3963 * This hint can be set anytime.
3964 *
3965 * \since This hint is available since SDL 3.4.0.
3966 */
3967#define SDL_HINT_VIDEO_MATCH_EXCLUSIVE_MODE_ON_MOVE "SDL_VIDEO_MATCH_EXCLUSIVE_MODE_ON_MOVE"
3968
3969/**
3970 * A variable controlling whether fullscreen windows are minimized when they
3971 * lose focus.
3972 *
3973 * The variable can be set to the following values:
3974 *
3975 * - "0": Fullscreen windows will not be minimized when they lose focus.
3976 * - "1": Fullscreen windows are minimized when they lose focus.
3977 * - "auto": Fullscreen windows are minimized when they lose focus if they use
3978 * exclusive fullscreen modes, so the desktop video mode is restored.
3979 * (default)
3980 *
3981 * This hint can be set anytime.
3982 *
3983 * \since This hint is available since SDL 3.2.0.
3984 */
3985#define SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS"
3986
3987/**
3988 * A variable controlling whether the offscreen video driver saves output
3989 * frames.
3990 *
3991 * This only saves frames that are generated using software rendering, not
3992 * accelerated OpenGL rendering.
3993 *
3994 * - "0": Video frames are not saved to disk. (default)
3995 * - "1": Video frames are saved to files in the format "SDL_windowX-Y.bmp",
3996 * where X is the window ID, and Y is the frame number.
3997 *
3998 * This hint can be set anytime.
3999 *
4000 * \since This hint is available since SDL 3.2.0.
4001 */
4002#define SDL_HINT_VIDEO_OFFSCREEN_SAVE_FRAMES "SDL_VIDEO_OFFSCREEN_SAVE_FRAMES"
4003
4004/**
4005 * A variable controlling whether all window operations will block until
4006 * complete.
4007 *
4008 * Window systems that run asynchronously may not have the results of window
4009 * operations that resize or move the window applied immediately upon the
4010 * return of the requesting function. Setting this hint will cause such
4011 * operations to block after every call until the pending operation has
4012 * completed. Setting this to '1' is the equivalent of calling
4013 * SDL_SyncWindow() after every function call.
4014 *
4015 * Be aware that amount of time spent blocking while waiting for window
4016 * operations to complete can be quite lengthy, as animations may have to
4017 * complete, which can take upwards of multiple seconds in some cases.
4018 *
4019 * The variable can be set to the following values:
4020 *
4021 * - "0": Window operations are non-blocking. (default)
4022 * - "1": Window operations will block until completed.
4023 *
4024 * This hint can be set anytime.
4025 *
4026 * \since This hint is available since SDL 3.2.0.
4027 */
4028#define SDL_HINT_VIDEO_SYNC_WINDOW_OPERATIONS "SDL_VIDEO_SYNC_WINDOW_OPERATIONS"
4029
4030/**
4031 * A variable controlling whether the libdecor Wayland backend is allowed to
4032 * be used.
4033 *
4034 * libdecor is used over xdg-shell when xdg-decoration protocol is
4035 * unavailable.
4036 *
4037 * The variable can be set to the following values:
4038 *
4039 * - "0": libdecor use is disabled.
4040 * - "1": libdecor use is enabled. (default)
4041 *
4042 * This hint should be set before SDL is initialized.
4043 *
4044 * \since This hint is available since SDL 3.2.0.
4045 */
4046#define SDL_HINT_VIDEO_WAYLAND_ALLOW_LIBDECOR "SDL_VIDEO_WAYLAND_ALLOW_LIBDECOR"
4047
4048/**
4049 * A variable controlling whether video mode emulation is enabled under
4050 * Wayland.
4051 *
4052 * When this hint is set, a standard set of emulated CVT video modes will be
4053 * exposed for use by the application. If it is disabled, the only modes
4054 * exposed will be the logical desktop size and, in the case of a scaled
4055 * desktop, the native display resolution.
4056 *
4057 * The variable can be set to the following values:
4058 *
4059 * - "0": Video mode emulation is disabled.
4060 * - "1": Video mode emulation is enabled. (default)
4061 *
4062 * This hint should be set before SDL is initialized.
4063 *
4064 * \since This hint is available since SDL 3.2.0.
4065 */
4066#define SDL_HINT_VIDEO_WAYLAND_MODE_EMULATION "SDL_VIDEO_WAYLAND_MODE_EMULATION"
4067
4068/**
4069 * A variable controlling how modes with a non-native aspect ratio are
4070 * displayed under Wayland.
4071 *
4072 * When this hint is set, the requested scaling will be used when displaying
4073 * fullscreen video modes that don't match the display's native aspect ratio.
4074 * This is contingent on compositor viewport support.
4075 *
4076 * The variable can be set to the following values:
4077 *
4078 * - "aspect" - Video modes will be displayed scaled, in their proper aspect
4079 * ratio, with black bars. (default)
4080 * - "stretch" - Video modes will be scaled to fill the entire display.
4081 * - "none" - Video modes will be displayed as 1:1 with no scaling.
4082 *
4083 * This hint should be set before creating a window.
4084 *
4085 * \since This hint is available since SDL 3.2.0.
4086 */
4087#define SDL_HINT_VIDEO_WAYLAND_MODE_SCALING "SDL_VIDEO_WAYLAND_MODE_SCALING"
4088
4089/**
4090 * A variable controlling whether the libdecor Wayland backend is preferred
4091 * over native decorations.
4092 *
4093 * When this hint is set, libdecor will be used to provide window decorations,
4094 * even if xdg-decoration is available. (Note that, by default, libdecor will
4095 * use xdg-decoration itself if available).
4096 *
4097 * The variable can be set to the following values:
4098 *
4099 * - "0": libdecor is enabled only if server-side decorations are unavailable.
4100 * (default)
4101 * - "1": libdecor is always enabled if available.
4102 *
4103 * This hint should be set before SDL is initialized.
4104 *
4105 * \since This hint is available since SDL 3.2.0.
4106 */
4107#define SDL_HINT_VIDEO_WAYLAND_PREFER_LIBDECOR "SDL_VIDEO_WAYLAND_PREFER_LIBDECOR"
4108
4109/**
4110 * A variable forcing non-DPI-aware Wayland windows to output at 1:1 scaling.
4111 *
4112 * This must be set before initializing the video subsystem.
4113 *
4114 * When this hint is set, Wayland windows that are not flagged as being
4115 * DPI-aware will be output with scaling designed to force 1:1 pixel mapping.
4116 *
4117 * This is intended to allow legacy applications to be displayed without
4118 * desktop scaling being applied, and has issues with certain display
4119 * configurations, as this forces the window to behave in a way that Wayland
4120 * desktops were not designed to accommodate:
4121 *
4122 * - Rounding errors can result with odd window sizes and/or desktop scales,
4123 * which can cause the window contents to appear slightly blurry.
4124 * - Positioning the window may be imprecise due to unit conversions and
4125 * rounding.
4126 * - The window may be unusably small on scaled desktops.
4127 * - The window may jump in size when moving between displays of different
4128 * scale factors.
4129 * - Displays may appear to overlap when using a multi-monitor setup with
4130 * scaling enabled.
4131 * - Possible loss of cursor precision due to the logical size of the window
4132 * being reduced.
4133 *
4134 * New applications should be designed with proper DPI awareness handling
4135 * instead of enabling this.
4136 *
4137 * The variable can be set to the following values:
4138 *
4139 * - "0": Windows will be scaled normally.
4140 * - "1": Windows will be forced to scale to achieve 1:1 output.
4141 *
4142 * This hint should be set before creating a window.
4143 *
4144 * \since This hint is available since SDL 3.2.0.
4145 */
4146#define SDL_HINT_VIDEO_WAYLAND_SCALE_TO_DISPLAY "SDL_VIDEO_WAYLAND_SCALE_TO_DISPLAY"
4147
4148/**
4149 * A variable specifying which shader compiler to preload when using the
4150 * Chrome ANGLE binaries.
4151 *
4152 * SDL has EGL and OpenGL ES2 support on Windows via the ANGLE project. It can
4153 * use two different sets of binaries, those compiled by the user from source
4154 * or those provided by the Chrome browser. In the later case, these binaries
4155 * require that SDL loads a DLL providing the shader compiler.
4156 *
4157 * The variable can be set to the following values:
4158 *
4159 * - "d3dcompiler_46.dll" - best for Vista or later. (default)
4160 * - "d3dcompiler_43.dll" - for XP support.
4161 * - "none" - do not load any library, useful if you compiled ANGLE from
4162 * source and included the compiler in your binaries.
4163 *
4164 * This hint should be set before SDL is initialized.
4165 *
4166 * \since This hint is available since SDL 3.2.0.
4167 */
4168#define SDL_HINT_VIDEO_WIN_D3DCOMPILER "SDL_VIDEO_WIN_D3DCOMPILER"
4169
4170/**
4171 * A variable controlling whether the X Synchronization Extension is enabled.
4172 *
4173 * If set, this can result in smoother window resizing when rendering using
4174 * OpenGL, however, there are some conditions:
4175 *
4176 * - It is only activated on windows created with the `SDL_WINDOW_OPENGL` flag
4177 * (windows using an SDL OpenGL renderer have this automatically set).
4178 * - When activated, presentation must be done with `SDL_GL_SwapWindow()`
4179 * (`SDL_RenderPresent()` calls this internally for OpenGL renderers as
4180 * well).
4181 *
4182 * Enabling this and presenting via an external mechanism will result in sync
4183 * requests not being acked, and hangs and other odd window behavior may
4184 * result.
4185 *
4186 * The variable can be set to the following values:
4187 *
4188 * - "0": The X Synchronization Extension is disabled. (default)
4189 * - "1": The X Synchronization Extension is enabled.
4190 *
4191 * This hint should be set before creating a window.
4192 *
4193 * \since This hint is available since SDL 3.4.10.
4194 */
4195#define SDL_HINT_VIDEO_X11_ENABLE_XSYNC_EXT "SDL_VIDEO_X11_ENABLE_XSYNC_EXT"
4196
4197/**
4198 * A variable controlling whether SDL should call XSelectInput() to enable
4199 * input events on X11 windows wrapped by SDL windows.
4200 *
4201 * The variable can be set to the following values:
4202 *
4203 * - "0": Don't call XSelectInput(), assuming the native window code has done
4204 * it already.
4205 * - "1": Call XSelectInput() to enable input events. (default)
4206 *
4207 * This hint should be set before creating a window.
4208 *
4209 * \since This hint is available since SDL 3.2.10.
4210 */
4211#define SDL_HINT_VIDEO_X11_EXTERNAL_WINDOW_INPUT "SDL_VIDEO_X11_EXTERNAL_WINDOW_INPUT"
4212
4213/**
4214 * A variable controlling whether the X11 _NET_WM_BYPASS_COMPOSITOR hint
4215 * should be used.
4216 *
4217 * The variable can be set to the following values:
4218 *
4219 * - "0": Disable _NET_WM_BYPASS_COMPOSITOR.
4220 * - "1": Enable _NET_WM_BYPASS_COMPOSITOR. (default)
4221 *
4222 * This hint should be set before creating a window.
4223 *
4224 * \since This hint is available since SDL 3.2.0.
4225 */
4226#define SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR "SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR"
4227
4228/**
4229 * A variable controlling whether the X11 _NET_WM_PING protocol should be
4230 * supported.
4231 *
4232 * By default SDL will use _NET_WM_PING, but for applications that know they
4233 * will not always be able to respond to ping requests in a timely manner they
4234 * can turn it off to avoid the window manager thinking the app is hung.
4235 *
4236 * The variable can be set to the following values:
4237 *
4238 * - "0": Disable _NET_WM_PING.
4239 * - "1": Enable _NET_WM_PING. (default)
4240 *
4241 * This hint should be set before creating a window.
4242 *
4243 * \since This hint is available since SDL 3.2.0.
4244 */
4245#define SDL_HINT_VIDEO_X11_NET_WM_PING "SDL_VIDEO_X11_NET_WM_PING"
4246
4247/**
4248 * A variable controlling whether SDL uses DirectColor visuals.
4249 *
4250 * The variable can be set to the following values:
4251 *
4252 * - "0": Disable DirectColor visuals.
4253 * - "1": Enable DirectColor visuals. (default)
4254 *
4255 * This hint should be set before initializing the video subsystem.
4256 *
4257 * \since This hint is available since SDL 3.2.0.
4258 */
4259#define SDL_HINT_VIDEO_X11_NODIRECTCOLOR "SDL_VIDEO_X11_NODIRECTCOLOR"
4260
4261/**
4262 * A variable forcing the content scaling factor for X11 displays.
4263 *
4264 * The variable can be set to a floating point value in the range 1.0-10.0f
4265 *
4266 * This hint should be set before SDL is initialized.
4267 *
4268 * \since This hint is available since SDL 3.2.0.
4269 */
4270#define SDL_HINT_VIDEO_X11_SCALING_FACTOR "SDL_VIDEO_X11_SCALING_FACTOR"
4271
4272/**
4273 * A variable forcing the visual ID used for X11 display modes.
4274 *
4275 * This hint should be set before initializing the video subsystem.
4276 *
4277 * \since This hint is available since SDL 3.2.0.
4278 */
4279#define SDL_HINT_VIDEO_X11_VISUALID "SDL_VIDEO_X11_VISUALID"
4280
4281/**
4282 * A variable forcing the visual ID chosen for new X11 windows.
4283 *
4284 * This hint should be set before creating a window.
4285 *
4286 * \since This hint is available since SDL 3.2.0.
4287 */
4288#define SDL_HINT_VIDEO_X11_WINDOW_VISUALID "SDL_VIDEO_X11_WINDOW_VISUALID"
4289
4290/**
4291 * A variable controlling whether the X11 XRandR extension should be used.
4292 *
4293 * The variable can be set to the following values:
4294 *
4295 * - "0": Disable XRandR.
4296 * - "1": Enable XRandR. (default)
4297 *
4298 * This hint should be set before SDL is initialized.
4299 *
4300 * \since This hint is available since SDL 3.2.0.
4301 */
4302#define SDL_HINT_VIDEO_X11_XRANDR "SDL_VIDEO_X11_XRANDR"
4303
4304/**
4305 * A variable controlling whether touch should be enabled on the back panel of
4306 * the PlayStation Vita.
4307 *
4308 * The variable can be set to the following values:
4309 *
4310 * - "0": Disable touch on the back panel.
4311 * - "1": Enable touch on the back panel. (default)
4312 *
4313 * This hint should be set before SDL is initialized.
4314 *
4315 * \since This hint is available since SDL 3.2.0.
4316 */
4317#define SDL_HINT_VITA_ENABLE_BACK_TOUCH "SDL_VITA_ENABLE_BACK_TOUCH"
4318
4319/**
4320 * A variable controlling whether touch should be enabled on the front panel
4321 * of the PlayStation Vita.
4322 *
4323 * The variable can be set to the following values:
4324 *
4325 * - "0": Disable touch on the front panel.
4326 * - "1": Enable touch on the front panel. (default)
4327 *
4328 * This hint should be set before SDL is initialized.
4329 *
4330 * \since This hint is available since SDL 3.2.0.
4331 */
4332#define SDL_HINT_VITA_ENABLE_FRONT_TOUCH "SDL_VITA_ENABLE_FRONT_TOUCH"
4333
4334/**
4335 * A variable controlling the module path on the PlayStation Vita.
4336 *
4337 * This hint defaults to "app0:module"
4338 *
4339 * This hint should be set before SDL is initialized.
4340 *
4341 * \since This hint is available since SDL 3.2.0.
4342 */
4343#define SDL_HINT_VITA_MODULE_PATH "SDL_VITA_MODULE_PATH"
4344
4345/**
4346 * A variable controlling whether to perform PVR initialization on the
4347 * PlayStation Vita.
4348 *
4349 * - "0": Skip PVR initialization.
4350 * - "1": Perform the normal PVR initialization. (default)
4351 *
4352 * This hint should be set before SDL is initialized.
4353 *
4354 * \since This hint is available since SDL 3.2.0.
4355 */
4356#define SDL_HINT_VITA_PVR_INIT "SDL_VITA_PVR_INIT"
4357
4358/**
4359 * A variable overriding the resolution reported on the PlayStation Vita.
4360 *
4361 * The variable can be set to the following values:
4362 *
4363 * - "544": 544p (default)
4364 * - "720": 725p for PSTV
4365 * - "1080": 1088i for PSTV
4366 *
4367 * This hint should be set before SDL is initialized.
4368 *
4369 * \since This hint is available since SDL 3.2.0.
4370 */
4371#define SDL_HINT_VITA_RESOLUTION "SDL_VITA_RESOLUTION"
4372
4373/**
4374 * A variable controlling whether OpenGL should be used instead of OpenGL ES
4375 * on the PlayStation Vita.
4376 *
4377 * The variable can be set to the following values:
4378 *
4379 * - "0": Use OpenGL ES. (default)
4380 * - "1": Use OpenGL.
4381 *
4382 * This hint should be set before SDL is initialized.
4383 *
4384 * \since This hint is available since SDL 3.2.0.
4385 */
4386#define SDL_HINT_VITA_PVR_OPENGL "SDL_VITA_PVR_OPENGL"
4387
4388/**
4389 * A variable controlling which touchpad should generate synthetic mouse
4390 * events.
4391 *
4392 * The variable can be set to the following values:
4393 *
4394 * - "0": Only front touchpad should generate mouse events. (default)
4395 * - "1": Only back touchpad should generate mouse events.
4396 * - "2": Both touchpads should generate mouse events.
4397 *
4398 * This hint can be set anytime.
4399 *
4400 * \since This hint is available since SDL 3.2.0.
4401 */
4402#define SDL_HINT_VITA_TOUCH_MOUSE_DEVICE "SDL_VITA_TOUCH_MOUSE_DEVICE"
4403
4404/**
4405 * A variable overriding the display index used in SDL_Vulkan_CreateSurface()
4406 *
4407 * The display index starts at 0, which is the default.
4408 *
4409 * This hint should be set before calling SDL_Vulkan_CreateSurface()
4410 *
4411 * \since This hint is available since SDL 3.2.0.
4412 */
4413#define SDL_HINT_VULKAN_DISPLAY "SDL_VULKAN_DISPLAY"
4414
4415/**
4416 * Specify the Vulkan library to load.
4417 *
4418 * This hint should be set before creating a Vulkan window or calling
4419 * SDL_Vulkan_LoadLibrary().
4420 *
4421 * \since This hint is available since SDL 3.2.0.
4422 */
4423#define SDL_HINT_VULKAN_LIBRARY "SDL_VULKAN_LIBRARY"
4424
4425/**
4426 * A variable controlling how the fact chunk affects the loading of a WAVE
4427 * file.
4428 *
4429 * The fact chunk stores information about the number of samples of a WAVE
4430 * file. The Standards Update from Microsoft notes that this value can be used
4431 * to 'determine the length of the data in seconds'. This is especially useful
4432 * for compressed formats (for which this is a mandatory chunk) if they
4433 * produce multiple sample frames per block and truncating the block is not
4434 * allowed. The fact chunk can exactly specify how many sample frames there
4435 * should be in this case.
4436 *
4437 * Unfortunately, most application seem to ignore the fact chunk and so SDL
4438 * ignores it by default as well.
4439 *
4440 * The variable can be set to the following values:
4441 *
4442 * - "truncate" - Use the number of samples to truncate the wave data if the
4443 * fact chunk is present and valid.
4444 * - "strict" - Like "truncate", but raise an error if the fact chunk is
4445 * invalid, not present for non-PCM formats, or if the data chunk doesn't
4446 * have that many samples.
4447 * - "ignorezero" - Like "truncate", but ignore fact chunk if the number of
4448 * samples is zero.
4449 * - "ignore" - Ignore fact chunk entirely. (default)
4450 *
4451 * This hint should be set before calling SDL_LoadWAV() or SDL_LoadWAV_IO()
4452 *
4453 * \since This hint is available since SDL 3.2.0.
4454 */
4455#define SDL_HINT_WAVE_FACT_CHUNK "SDL_WAVE_FACT_CHUNK"
4456
4457/**
4458 * A variable controlling the maximum number of chunks in a WAVE file.
4459 *
4460 * This sets an upper bound on the number of chunks in a WAVE file to avoid
4461 * wasting time on malformed or corrupt WAVE files. This defaults to "10000".
4462 *
4463 * This hint should be set before calling SDL_LoadWAV() or SDL_LoadWAV_IO()
4464 *
4465 * \since This hint is available since SDL 3.2.0.
4466 */
4467#define SDL_HINT_WAVE_CHUNK_LIMIT "SDL_WAVE_CHUNK_LIMIT"
4468
4469/**
4470 * A variable controlling how the size of the RIFF chunk affects the loading
4471 * of a WAVE file.
4472 *
4473 * The size of the RIFF chunk (which includes all the sub-chunks of the WAVE
4474 * file) is not always reliable. In case the size is wrong, it's possible to
4475 * just ignore it and step through the chunks until a fixed limit is reached.
4476 *
4477 * Note that files that have trailing data unrelated to the WAVE file or
4478 * corrupt files may slow down the loading process without a reliable
4479 * boundary. By default, SDL stops after 10000 chunks to prevent wasting time.
4480 * Use SDL_HINT_WAVE_CHUNK_LIMIT to adjust this value.
4481 *
4482 * The variable can be set to the following values:
4483 *
4484 * - "force" - Always use the RIFF chunk size as a boundary for the chunk
4485 * search.
4486 * - "ignorezero" - Like "force", but a zero size searches up to 4 GiB.
4487 * (default)
4488 * - "ignore" - Ignore the RIFF chunk size and always search up to 4 GiB.
4489 * - "maximum" - Search for chunks until the end of file. (not recommended)
4490 *
4491 * This hint should be set before calling SDL_LoadWAV() or SDL_LoadWAV_IO()
4492 *
4493 * \since This hint is available since SDL 3.2.0.
4494 */
4495#define SDL_HINT_WAVE_RIFF_CHUNK_SIZE "SDL_WAVE_RIFF_CHUNK_SIZE"
4496
4497/**
4498 * A variable controlling how a truncated WAVE file is handled.
4499 *
4500 * A WAVE file is considered truncated if any of the chunks are incomplete or
4501 * the data chunk size is not a multiple of the block size. By default, SDL
4502 * decodes until the first incomplete block, as most applications seem to do.
4503 *
4504 * The variable can be set to the following values:
4505 *
4506 * - "verystrict" - Raise an error if the file is truncated.
4507 * - "strict" - Like "verystrict", but the size of the RIFF chunk is ignored.
4508 * - "dropframe" - Decode until the first incomplete sample frame.
4509 * - "dropblock" - Decode until the first incomplete block. (default)
4510 *
4511 * This hint should be set before calling SDL_LoadWAV() or SDL_LoadWAV_IO()
4512 *
4513 * \since This hint is available since SDL 3.2.0.
4514 */
4515#define SDL_HINT_WAVE_TRUNCATION "SDL_WAVE_TRUNCATION"
4516
4517/**
4518 * A variable controlling whether the window is activated when the
4519 * SDL_RaiseWindow function is called.
4520 *
4521 * The variable can be set to the following values:
4522 *
4523 * - "0": The window is not activated when the SDL_RaiseWindow function is
4524 * called.
4525 * - "1": The window is activated when the SDL_RaiseWindow function is called.
4526 * (default)
4527 *
4528 * This hint can be set anytime.
4529 *
4530 * \since This hint is available since SDL 3.2.0.
4531 */
4532#define SDL_HINT_WINDOW_ACTIVATE_WHEN_RAISED "SDL_WINDOW_ACTIVATE_WHEN_RAISED"
4533
4534/**
4535 * A variable controlling whether the window is activated when the
4536 * SDL_ShowWindow function is called.
4537 *
4538 * The variable can be set to the following values:
4539 *
4540 * - "0": The window is not activated when the SDL_ShowWindow function is
4541 * called.
4542 * - "1": The window is activated when the SDL_ShowWindow function is called.
4543 * (default)
4544 *
4545 * This hint can be set anytime.
4546 *
4547 * \since This hint is available since SDL 3.2.0.
4548 */
4549#define SDL_HINT_WINDOW_ACTIVATE_WHEN_SHOWN "SDL_WINDOW_ACTIVATE_WHEN_SHOWN"
4550
4551/**
4552 * If set to "0" then never set the top-most flag on an SDL Window even if the
4553 * application requests it.
4554 *
4555 * This is a debugging aid for developers and not expected to be used by end
4556 * users.
4557 *
4558 * The variable can be set to the following values:
4559 *
4560 * - "0": don't allow topmost
4561 * - "1": allow topmost (default)
4562 *
4563 * This hint can be set anytime.
4564 *
4565 * \since This hint is available since SDL 3.2.0.
4566 */
4567#define SDL_HINT_WINDOW_ALLOW_TOPMOST "SDL_WINDOW_ALLOW_TOPMOST"
4568
4569/**
4570 * A variable controlling whether the window frame and title bar are
4571 * interactive when the cursor is hidden.
4572 *
4573 * The variable can be set to the following values:
4574 *
4575 * - "0": The window frame is not interactive when the cursor is hidden (no
4576 * move, resize, etc).
4577 * - "1": The window frame is interactive when the cursor is hidden. (default)
4578 *
4579 * This hint can be set anytime.
4580 *
4581 * \since This hint is available since SDL 3.2.0.
4582 */
4583#define SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN "SDL_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN"
4584
4585/**
4586 * A variable controlling whether SDL generates window-close events for Alt+F4
4587 * on Windows.
4588 *
4589 * The variable can be set to the following values:
4590 *
4591 * - "0": SDL will only do normal key handling for Alt+F4.
4592 * - "1": SDL will generate a window-close event when it sees Alt+F4.
4593 * (default)
4594 *
4595 * This hint can be set anytime.
4596 *
4597 * \since This hint is available since SDL 3.2.0.
4598 */
4599#define SDL_HINT_WINDOWS_CLOSE_ON_ALT_F4 "SDL_WINDOWS_CLOSE_ON_ALT_F4"
4600
4601/**
4602 * A variable controlling whether menus can be opened with their keyboard
4603 * shortcut (Alt+mnemonic).
4604 *
4605 * If the mnemonics are enabled, then menus can be opened by pressing the Alt
4606 * key and the corresponding mnemonic (for example, Alt+F opens the File
4607 * menu). However, in case an invalid mnemonic is pressed, Windows makes an
4608 * audible beep to convey that nothing happened. This is true even if the
4609 * window has no menu at all!
4610 *
4611 * Because most SDL applications don't have menus, and some want to use the
4612 * Alt key for other purposes, SDL disables mnemonics (and the beeping) by
4613 * default.
4614 *
4615 * Note: This also affects keyboard events: with mnemonics enabled, when a
4616 * menu is opened from the keyboard, you will not receive a KEYUP event for
4617 * the mnemonic key, and *might* not receive one for Alt.
4618 *
4619 * The variable can be set to the following values:
4620 *
4621 * - "0": Alt+mnemonic does nothing, no beeping. (default)
4622 * - "1": Alt+mnemonic opens menus, invalid mnemonics produce a beep.
4623 *
4624 * This hint can be set anytime.
4625 *
4626 * \since This hint is available since SDL 3.2.0.
4627 */
4628#define SDL_HINT_WINDOWS_ENABLE_MENU_MNEMONICS "SDL_WINDOWS_ENABLE_MENU_MNEMONICS"
4629
4630/**
4631 * A variable controlling whether the windows message loop is processed by
4632 * SDL.
4633 *
4634 * The variable can be set to the following values:
4635 *
4636 * - "0": The window message loop is not run.
4637 * - "1": The window message loop is processed in SDL_PumpEvents(). (default)
4638 *
4639 * This hint can be set anytime.
4640 *
4641 * \since This hint is available since SDL 3.2.0.
4642 */
4643#define SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP "SDL_WINDOWS_ENABLE_MESSAGELOOP"
4644
4645/**
4646 * A variable controlling whether GameInput is used for raw keyboard and mouse
4647 * on Windows.
4648 *
4649 * The variable can be set to the following values:
4650 *
4651 * - "0": GameInput is not used for raw keyboard and mouse events. (default)
4652 * - "1": GameInput is used for raw keyboard and mouse events, if available.
4653 *
4654 * This hint should be set before SDL is initialized.
4655 *
4656 * \since This hint is available since SDL 3.2.0.
4657 */
4658#define SDL_HINT_WINDOWS_GAMEINPUT "SDL_WINDOWS_GAMEINPUT"
4659
4660/**
4661 * A variable controlling whether raw keyboard events are used on Windows.
4662 *
4663 * The variable can be set to the following values:
4664 *
4665 * - "0": The Windows message loop is used for keyboard events. (default)
4666 * - "1": Low latency raw keyboard events are used.
4667 *
4668 * This hint can be set anytime.
4669 *
4670 * \since This hint is available since SDL 3.2.0.
4671 */
4672#define SDL_HINT_WINDOWS_RAW_KEYBOARD "SDL_WINDOWS_RAW_KEYBOARD"
4673
4674/**
4675 * A variable controlling whether or not the RIDEV_NOHOTKEYS flag is set when
4676 * enabling Windows raw keyboard events.
4677 *
4678 * This blocks any hotkeys that have been registered by applications from
4679 * having any effect beyond generating raw WM_INPUT events.
4680 *
4681 * This flag does not affect system-hotkeys like ALT-TAB or CTRL-ALT-DEL, but
4682 * does affect the Windows Logo key since it is a userland hotkey registered
4683 * by explorer.exe.
4684 *
4685 * The variable can be set to the following values:
4686 *
4687 * - "0": Hotkeys are not excluded. (default)
4688 * - "1": Hotkeys are excluded.
4689 *
4690 * This hint can be set anytime.
4691 *
4692 * \since This hint is available since SDL 3.4.0.
4693 */
4694#define SDL_HINT_WINDOWS_RAW_KEYBOARD_EXCLUDE_HOTKEYS "SDL_WINDOWS_RAW_KEYBOARD_EXCLUDE_HOTKEYS"
4695
4696/**
4697 * A variable controlling whether the RIDEV_INPUTSINK flag is set when
4698 * enabling Windows raw keyboard events.
4699 *
4700 * This enables the window to still receive input even if not in foreground.
4701 *
4702 * Focused windows that receive text input will still prevent input events
4703 * from triggering.
4704 *
4705 * - "0": Input is not received when not in focus or foreground. (default)
4706 * - "1": Input will be received even when not in focus or foreground.
4707 *
4708 * This hint can be set anytime.
4709 *
4710 * \since This hint is available since SDL 3.4.4.
4711 */
4712#define SDL_HINT_WINDOWS_RAW_KEYBOARD_INPUTSINK "SDL_WINDOWS_RAW_KEYBOARD_INPUTSINK"
4713
4714/**
4715 * A variable controlling whether SDL uses Kernel Semaphores on Windows.
4716 *
4717 * Kernel Semaphores are inter-process and require a context switch on every
4718 * interaction. On Windows 8 and newer, the WaitOnAddress API is available.
4719 * Using that and atomics to implement semaphores increases performance. SDL
4720 * will fall back to Kernel Objects on older OS versions or if forced to by
4721 * this hint.
4722 *
4723 * The variable can be set to the following values:
4724 *
4725 * - "0": Use Atomics and WaitOnAddress API when available, otherwise fall
4726 * back to Kernel Objects. (default)
4727 * - "1": Force the use of Kernel Objects in all cases.
4728 *
4729 * This hint should be set before SDL is initialized.
4730 *
4731 * \since This hint is available since SDL 3.2.0.
4732 */
4733#define SDL_HINT_WINDOWS_FORCE_SEMAPHORE_KERNEL "SDL_WINDOWS_FORCE_SEMAPHORE_KERNEL"
4734
4735/**
4736 * A variable to specify custom icon resource id from RC file on Windows
4737 * platform.
4738 *
4739 * This hint should be set before SDL is initialized.
4740 *
4741 * \since This hint is available since SDL 3.2.0.
4742 */
4743#define SDL_HINT_WINDOWS_INTRESOURCE_ICON "SDL_WINDOWS_INTRESOURCE_ICON"
4744
4745/**
4746 * A variable to specify custom icon resource id from RC file on Windows
4747 * platform.
4748 *
4749 * This hint should be set before SDL is initialized.
4750 *
4751 * \since This hint is available since SDL 3.2.0.
4752 */
4753#define SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL "SDL_WINDOWS_INTRESOURCE_ICON_SMALL"
4754
4755/**
4756 * A variable controlling whether SDL uses the D3D9Ex API introduced in
4757 * Windows Vista, instead of normal D3D9.
4758 *
4759 * Direct3D 9Ex contains changes to state management that can eliminate device
4760 * loss errors during scenarios like Alt+Tab or UAC prompts. D3D9Ex may
4761 * require some changes to your application to cope with the new behavior, so
4762 * this is disabled by default.
4763 *
4764 * For more information on Direct3D 9Ex, see:
4765 *
4766 * - https://docs.microsoft.com/en-us/windows/win32/direct3darticles/graphics-apis-in-windows-vista#direct3d-9ex
4767 * - https://docs.microsoft.com/en-us/windows/win32/direct3darticles/direct3d-9ex-improvements
4768 *
4769 * The variable can be set to the following values:
4770 *
4771 * - "0": Use the original Direct3D 9 API. (default)
4772 * - "1": Use the Direct3D 9Ex API on Vista and later (and fall back if D3D9Ex
4773 * is unavailable)
4774 *
4775 * This hint should be set before SDL is initialized.
4776 *
4777 * \since This hint is available since SDL 3.2.0.
4778 */
4779#define SDL_HINT_WINDOWS_USE_D3D9EX "SDL_WINDOWS_USE_D3D9EX"
4780
4781/**
4782 * A variable controlling whether SDL will clear the window contents when the
4783 * WM_ERASEBKGND message is received.
4784 *
4785 * The variable can be set to the following values:
4786 *
4787 * - "0"/"never": Never clear the window.
4788 * - "1"/"initial": Clear the window when the first WM_ERASEBKGND event fires.
4789 * (default)
4790 * - "2"/"always": Clear the window on every WM_ERASEBKGND event.
4791 *
4792 * This hint should be set before creating a window.
4793 *
4794 * \since This hint is available since SDL 3.2.0.
4795 */
4796#define SDL_HINT_WINDOWS_ERASE_BACKGROUND_MODE "SDL_WINDOWS_ERASE_BACKGROUND_MODE"
4797
4798/**
4799 * A variable controlling whether X11 windows are marked as override-redirect.
4800 *
4801 * If set, this _might_ increase framerate at the expense of the desktop not
4802 * working as expected. Override-redirect windows aren't noticed by the window
4803 * manager at all.
4804 *
4805 * You should probably only use this for fullscreen windows, and you probably
4806 * shouldn't even use it for that. But it's here if you want to try!
4807 *
4808 * The variable can be set to the following values:
4809 *
4810 * - "0": Do not mark the window as override-redirect. (default)
4811 * - "1": Mark the window as override-redirect.
4812 *
4813 * This hint should be set before creating a window.
4814 *
4815 * \since This hint is available since SDL 3.2.0.
4816 */
4817#define SDL_HINT_X11_FORCE_OVERRIDE_REDIRECT "SDL_X11_FORCE_OVERRIDE_REDIRECT"
4818
4819/**
4820 * A variable specifying the type of an X11 window.
4821 *
4822 * During SDL_CreateWindow, SDL uses the _NET_WM_WINDOW_TYPE X11 property to
4823 * report to the window manager the type of window it wants to create. This
4824 * might be set to various things if SDL_WINDOW_TOOLTIP or
4825 * SDL_WINDOW_POPUP_MENU, etc, were specified. For "normal" windows that
4826 * haven't set a specific type, this hint can be used to specify a custom
4827 * type. For example, a dock window might set this to
4828 * "_NET_WM_WINDOW_TYPE_DOCK".
4829 *
4830 * This hint should be set before creating a window.
4831 *
4832 * \since This hint is available since SDL 3.2.0.
4833 */
4834#define SDL_HINT_X11_WINDOW_TYPE "SDL_X11_WINDOW_TYPE"
4835
4836/**
4837 * Specify the XCB library to load for the X11 driver.
4838 *
4839 * The default is platform-specific, often "libX11-xcb.so.1".
4840 *
4841 * This hint should be set before initializing the video subsystem.
4842 *
4843 * \since This hint is available since SDL 3.2.0.
4844 */
4845#define SDL_HINT_X11_XCB_LIBRARY "SDL_X11_XCB_LIBRARY"
4846
4847/**
4848 * A variable controlling whether XInput should be used for controller
4849 * handling.
4850 *
4851 * The variable can be set to the following values:
4852 *
4853 * - "0": XInput is not enabled.
4854 * - "1": XInput is enabled. (default)
4855 *
4856 * This hint should be set before SDL is initialized.
4857 *
4858 * \since This hint is available since SDL 3.2.0.
4859 */
4860#define SDL_HINT_XINPUT_ENABLED "SDL_XINPUT_ENABLED"
4861
4862/**
4863 * A variable controlling response to SDL_assert failures.
4864 *
4865 * The variable can be set to the following case-sensitive values:
4866 *
4867 * - "abort": Program terminates immediately.
4868 * - "break": Program triggers a debugger breakpoint.
4869 * - "retry": Program reruns the SDL_assert's test again.
4870 * - "ignore": Program continues on, ignoring this assertion failure this
4871 * time.
4872 * - "always_ignore": Program continues on, ignoring this assertion failure
4873 * for the rest of the run.
4874 *
4875 * Note that SDL_SetAssertionHandler offers a programmatic means to deal with
4876 * assertion failures through a callback, and this hint is largely intended to
4877 * be used via environment variables by end users and automated tools.
4878 *
4879 * This hint should be set before an assertion failure is triggered and can be
4880 * changed at any time.
4881 *
4882 * \since This hint is available since SDL 3.2.0.
4883 */
4884#define SDL_HINT_ASSERT "SDL_ASSERT"
4885
4886/**
4887 * A variable controlling whether pen events should generate synthetic mouse
4888 * events.
4889 *
4890 * The variable can be set to the following values:
4891 *
4892 * - "0": Pen events will not generate mouse events.
4893 * - "1": Pen events will generate mouse events. (default)
4894 *
4895 * This hint can be set anytime.
4896 *
4897 * \since This hint is available since SDL 3.2.0.
4898 */
4899#define SDL_HINT_PEN_MOUSE_EVENTS "SDL_PEN_MOUSE_EVENTS"
4900
4901/**
4902 * A variable controlling whether pen events should generate synthetic touch
4903 * events.
4904 *
4905 * The variable can be set to the following values:
4906 *
4907 * - "0": Pen events will not generate touch events.
4908 * - "1": Pen events will generate touch events. (default)
4909 *
4910 * This hint can be set anytime.
4911 *
4912 * \since This hint is available since SDL 3.2.0.
4913 */
4914#define SDL_HINT_PEN_TOUCH_EVENTS "SDL_PEN_TOUCH_EVENTS"
4915
4916/**
4917 * An enumeration of hint priorities.
4918 *
4919 * \since This enum is available since SDL 3.2.0.
4920 */
4927
4928/**
4929 * Set a hint with a specific priority.
4930 *
4931 * The priority controls the behavior when setting a hint that already has a
4932 * value. Hints will replace existing hints of their priority and lower.
4933 * Environment variables are considered to have override priority.
4934 *
4935 * \param name the hint to set.
4936 * \param value the value of the hint variable.
4937 * \param priority the SDL_HintPriority level for the hint.
4938 * \returns true on success or false on failure; call SDL_GetError() for more
4939 * information.
4940 *
4941 * \threadsafety It is safe to call this function from any thread.
4942 *
4943 * \since This function is available since SDL 3.2.0.
4944 *
4945 * \sa SDL_GetHint
4946 * \sa SDL_ResetHint
4947 * \sa SDL_SetHint
4948 */
4949extern SDL_DECLSPEC bool SDLCALL SDL_SetHintWithPriority(const char *name, const char *value, SDL_HintPriority priority);
4950
4951/**
4952 * Set a hint with normal priority.
4953 *
4954 * Hints will not be set if there is an existing override hint or environment
4955 * variable that takes precedence. You can use SDL_SetHintWithPriority() to
4956 * set the hint with override priority instead.
4957 *
4958 * \param name the hint to set.
4959 * \param value the value of the hint variable.
4960 * \returns true on success or false on failure; call SDL_GetError() for more
4961 * information.
4962 *
4963 * \threadsafety It is safe to call this function from any thread.
4964 *
4965 * \since This function is available since SDL 3.2.0.
4966 *
4967 * \sa SDL_GetHint
4968 * \sa SDL_ResetHint
4969 * \sa SDL_SetHintWithPriority
4970 */
4971extern SDL_DECLSPEC bool SDLCALL SDL_SetHint(const char *name, const char *value);
4972
4973/**
4974 * Reset a hint to the default value.
4975 *
4976 * This will reset a hint to the value of the environment variable, or NULL if
4977 * the environment isn't set. Callbacks will be called normally with this
4978 * change.
4979 *
4980 * \param name the hint to set.
4981 * \returns true on success or false on failure; call SDL_GetError() for more
4982 * information.
4983 *
4984 * \threadsafety It is safe to call this function from any thread.
4985 *
4986 * \since This function is available since SDL 3.2.0.
4987 *
4988 * \sa SDL_SetHint
4989 * \sa SDL_ResetHints
4990 */
4991extern SDL_DECLSPEC bool SDLCALL SDL_ResetHint(const char *name);
4992
4993/**
4994 * Reset all hints to the default values.
4995 *
4996 * This will reset all hints to the value of the associated environment
4997 * variable, or NULL if the environment isn't set. Callbacks will be called
4998 * normally with this change.
4999 *
5000 * \threadsafety It is safe to call this function from any thread.
5001 *
5002 * \since This function is available since SDL 3.2.0.
5003 *
5004 * \sa SDL_ResetHint
5005 */
5006extern SDL_DECLSPEC void SDLCALL SDL_ResetHints(void);
5007
5008/**
5009 * Get the value of a hint.
5010 *
5011 * \param name the hint to query.
5012 * \returns the string value of a hint or NULL if the hint isn't set.
5013 *
5014 * \threadsafety It is safe to call this function from any thread.
5015 *
5016 * \since This function is available since SDL 3.2.0.
5017 *
5018 * \sa SDL_SetHint
5019 * \sa SDL_SetHintWithPriority
5020 */
5021extern SDL_DECLSPEC const char *SDLCALL SDL_GetHint(const char *name);
5022
5023/**
5024 * Get the boolean value of a hint variable.
5025 *
5026 * \param name the name of the hint to get the boolean value from.
5027 * \param default_value the value to return if the hint does not exist.
5028 * \returns the boolean value of a hint or the provided default value if the
5029 * hint does not exist.
5030 *
5031 * \threadsafety It is safe to call this function from any thread.
5032 *
5033 * \since This function is available since SDL 3.2.0.
5034 *
5035 * \sa SDL_GetHint
5036 * \sa SDL_SetHint
5037 */
5038extern SDL_DECLSPEC bool SDLCALL SDL_GetHintBoolean(const char *name, bool default_value);
5039
5040/**
5041 * A callback used to send notifications of hint value changes.
5042 *
5043 * This is called an initial time during SDL_AddHintCallback with the hint's
5044 * current value, and then again each time the hint's value changes. In the
5045 * initial call, the current value is in both `oldValue` and `newValue`.
5046 *
5047 * \param userdata what was passed as `userdata` to SDL_AddHintCallback().
5048 * \param name what was passed as `name` to SDL_AddHintCallback().
5049 * \param oldValue the previous hint value.
5050 * \param newValue the new value hint is to be set to.
5051 *
5052 * \threadsafety This callback is fired from whatever thread is setting a new
5053 * hint value. SDL holds a lock on the hint subsystem when
5054 * calling this callback.
5055 *
5056 * \since This datatype is available since SDL 3.2.0.
5057 *
5058 * \sa SDL_AddHintCallback
5059 */
5060typedef void(SDLCALL *SDL_HintCallback)(void *userdata, const char *name, const char *oldValue, const char *newValue);
5061
5062/**
5063 * Add a function to watch a particular hint.
5064 *
5065 * The callback function is called _during_ this function, to provide it an
5066 * initial value, and again each time the hint's value changes.
5067 *
5068 * \param name the hint to watch.
5069 * \param callback An SDL_HintCallback function that will be called when the
5070 * hint value changes.
5071 * \param userdata a pointer to pass to the callback function.
5072 * \returns true on success or false on failure; call SDL_GetError() for more
5073 * information.
5074 *
5075 * \threadsafety It is safe to call this function from any thread.
5076 *
5077 * \since This function is available since SDL 3.2.0.
5078 *
5079 * \sa SDL_RemoveHintCallback
5080 */
5081extern SDL_DECLSPEC bool SDLCALL SDL_AddHintCallback(const char *name, SDL_HintCallback callback, void *userdata);
5082
5083/**
5084 * Remove a function watching a particular hint.
5085 *
5086 * \param name the hint being watched.
5087 * \param callback an SDL_HintCallback function that will be called when the
5088 * hint value changes.
5089 * \param userdata a pointer being passed to the callback function.
5090 *
5091 * \threadsafety It is safe to call this function from any thread.
5092 *
5093 * \since This function is available since SDL 3.2.0.
5094 *
5095 * \sa SDL_AddHintCallback
5096 */
5097extern SDL_DECLSPEC void SDLCALL SDL_RemoveHintCallback(const char *name,
5098 SDL_HintCallback callback,
5099 void *userdata);
5100
5101/* Ends C function definitions when using C++ */
5102#ifdef __cplusplus
5103}
5104#endif
5105#include <SDL3/SDL_close_code.h>
5106
5107#endif /* SDL_hints_h_ */
bool SDL_ResetHint(const char *name)
void SDL_RemoveHintCallback(const char *name, SDL_HintCallback callback, void *userdata)
void SDL_ResetHints(void)
bool SDL_GetHintBoolean(const char *name, bool default_value)
bool SDL_SetHintWithPriority(const char *name, const char *value, SDL_HintPriority priority)
bool SDL_SetHint(const char *name, const char *value)
SDL_HintPriority
Definition SDL_hints.h:4922
@ SDL_HINT_DEFAULT
Definition SDL_hints.h:4923
@ SDL_HINT_OVERRIDE
Definition SDL_hints.h:4925
@ SDL_HINT_NORMAL
Definition SDL_hints.h:4924
const char * SDL_GetHint(const char *name)
bool SDL_AddHintCallback(const char *name, SDL_HintCallback callback, void *userdata)
void(* SDL_HintCallback)(void *userdata, const char *name, const char *oldValue, const char *newValue)
Definition SDL_hints.h:5060