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