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