-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Expand file tree
/
Copy pathSDL_hints.h
More file actions
4851 lines (4570 loc) · 160 KB
/
SDL_hints.h
File metadata and controls
4851 lines (4570 loc) · 160 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
Simple DirectMedia Layer
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
/**
* # CategoryHints
*
* This file contains functions to set and get configuration hints, as well as
* listing each of them alphabetically.
*
* The convention for naming hints is SDL_HINT_X, where "SDL_X" is the
* environment variable that can be used to override the default.
*
* In general these hints are just that - they may or may not be supported or
* applicable on any given platform, but they provide a way for an application
* or user to give the library a hint as to how they would like the library to
* work.
*/
#ifndef SDL_hints_h_
#define SDL_hints_h_
#include <SDL3/SDL_error.h>
#include <SDL3/SDL_stdinc.h>
#include <SDL3/SDL_begin_code.h>
/* Set up for C function definitions, even when using C++ */
#ifdef __cplusplus
extern "C" {
#endif
/**
* Specify the behavior of Alt+Tab while the keyboard is grabbed.
*
* By default, SDL emulates Alt+Tab functionality while the keyboard is
* grabbed and your window is full-screen. This prevents the user from getting
* stuck in your application if you've enabled keyboard grab.
*
* The variable can be set to the following values:
*
* - "0": SDL will not handle Alt+Tab. Your application is responsible for
* handling Alt+Tab while the keyboard is grabbed.
* - "1": SDL will minimize your window when Alt+Tab is pressed (default)
*
* This hint can be set anytime.
*
* \since This hint is available since SDL 3.2.0.
*/
#define SDL_HINT_ALLOW_ALT_TAB_WHILE_GRABBED "SDL_ALLOW_ALT_TAB_WHILE_GRABBED"
/**
* A variable to control whether the SDL activity is allowed to be re-created.
*
* If this hint is true, the activity can be recreated on demand by the OS,
* and Java static data and C++ static data remain with their current values.
* If this hint is false, then SDL will call exit() when you return from your
* main function and the application will be terminated and then started fresh
* each time.
*
* The variable can be set to the following values:
*
* - "0": The application starts fresh at each launch. (default)
* - "1": The application activity can be recreated by the OS.
*
* This hint can be set anytime.
*
* \since This hint is available since SDL 3.2.0.
*/
#define SDL_HINT_ANDROID_ALLOW_RECREATE_ACTIVITY "SDL_ANDROID_ALLOW_RECREATE_ACTIVITY"
/**
* A variable to control whether the event loop will block itself when the app
* is paused.
*
* The variable can be set to the following values:
*
* - "0": Non blocking.
* - "1": Blocking. (default)
*
* This hint should be set before SDL is initialized.
*
* \since This hint is available since SDL 3.2.0.
*/
#define SDL_HINT_ANDROID_BLOCK_ON_PAUSE "SDL_ANDROID_BLOCK_ON_PAUSE"
/**
* A variable to control whether low latency audio should be enabled.
*
* Some devices have poor quality output when this is enabled, but this is
* usually an improvement in audio latency.
*
* The variable can be set to the following values:
*
* - "0": Low latency audio is not enabled.
* - "1": Low latency audio is enabled. (default)
*
* This hint should be set before SDL audio is initialized.
*
* \since This hint is available since SDL 3.2.0.
*/
#define SDL_HINT_ANDROID_LOW_LATENCY_AUDIO "SDL_ANDROID_LOW_LATENCY_AUDIO"
/**
* A variable to control whether we trap the Android back button to handle it
* manually.
*
* This is necessary for the right mouse button to work on some Android
* devices, or to be able to trap the back button for use in your code
* reliably. If this hint is true, the back button will show up as an
* SDL_EVENT_KEY_DOWN / SDL_EVENT_KEY_UP pair with a keycode of
* SDL_SCANCODE_AC_BACK.
*
* The variable can be set to the following values:
*
* - "0": Back button will be handled as usual for system. (default)
* - "1": Back button will be trapped, allowing you to handle the key press
* manually. (This will also let right mouse click work on systems where the
* right mouse button functions as back.)
*
* This hint can be set anytime.
*
* \since This hint is available since SDL 3.2.0.
*/
#define SDL_HINT_ANDROID_TRAP_BACK_BUTTON "SDL_ANDROID_TRAP_BACK_BUTTON"
/**
* A variable setting the app ID string.
*
* This string is used by desktop compositors to identify and group windows
* together, as well as match applications with associated desktop settings
* and icons.
*
* This will override SDL_PROP_APP_METADATA_IDENTIFIER_STRING, if set by the
* application.
*
* This hint should be set before SDL is initialized.
*
* \since This hint is available since SDL 3.2.0.
*/
#define SDL_HINT_APP_ID "SDL_APP_ID"
/**
* A variable setting the application name.
*
* This hint lets you specify the application name sent to the OS when
* required. For example, this will often appear in volume control applets for
* audio streams, and in lists of applications which are inhibiting the
* screensaver. You should use a string that describes your program ("My Game
* 2: The Revenge")
*
* This will override SDL_PROP_APP_METADATA_NAME_STRING, if set by the
* application.
*
* This hint should be set before SDL is initialized.
*
* \since This hint is available since SDL 3.2.0.
*/
#define SDL_HINT_APP_NAME "SDL_APP_NAME"
/**
* A variable controlling whether controllers used with the Apple TV generate
* UI events.
*
* When UI events are generated by controller input, the app will be
* backgrounded when the Apple TV remote's menu button is pressed, and when
* the pause or B buttons on gamepads are pressed.
*
* More information about properly making use of controllers for the Apple TV
* can be found here:
* https://developer.apple.com/tvos/human-interface-guidelines/remote-and-controllers/
*
* The variable can be set to the following values:
*
* - "0": Controller input does not generate UI events. (default)
* - "1": Controller input generates UI events.
*
* This hint can be set anytime.
*
* \since This hint is available since SDL 3.2.0.
*/
#define SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS "SDL_APPLE_TV_CONTROLLER_UI_EVENTS"
/**
* A variable controlling whether the Apple TV remote's joystick axes will
* automatically match the rotation of the remote.
*
* The variable can be set to the following values:
*
* - "0": Remote orientation does not affect joystick axes. (default)
* - "1": Joystick axes are based on the orientation of the remote.
*
* This hint can be set anytime.
*
* \since This hint is available since SDL 3.2.0.
*/
#define SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION "SDL_APPLE_TV_REMOTE_ALLOW_ROTATION"
/**
* Specify the default ALSA audio device name.
*
* This variable is a specific audio device to open when the "default" audio
* device is used.
*
* This hint will be ignored when opening the default playback device if
* SDL_HINT_AUDIO_ALSA_DEFAULT_PLAYBACK_DEVICE is set, or when opening the
* default recording device if SDL_HINT_AUDIO_ALSA_DEFAULT_RECORDING_DEVICE is
* set.
*
* This hint should be set before an audio device is opened.
*
* \since This hint is available since SDL 3.2.0.
*
* \sa SDL_HINT_AUDIO_ALSA_DEFAULT_PLAYBACK_DEVICE
* \sa SDL_HINT_AUDIO_ALSA_DEFAULT_RECORDING_DEVICE
*/
#define SDL_HINT_AUDIO_ALSA_DEFAULT_DEVICE "SDL_AUDIO_ALSA_DEFAULT_DEVICE"
/**
* Specify the default ALSA audio playback device name.
*
* This variable is a specific audio device to open for playback, when the
* "default" audio device is used.
*
* If this hint isn't set, SDL will check SDL_HINT_AUDIO_ALSA_DEFAULT_DEVICE
* before choosing a reasonable default.
*
* This hint should be set before an audio device is opened.
*
* \since This hint is available since SDL 3.2.0.
*
* \sa SDL_HINT_AUDIO_ALSA_DEFAULT_RECORDING_DEVICE
* \sa SDL_HINT_AUDIO_ALSA_DEFAULT_DEVICE
*/
#define SDL_HINT_AUDIO_ALSA_DEFAULT_PLAYBACK_DEVICE "SDL_AUDIO_ALSA_DEFAULT_PLAYBACK_DEVICE"
/**
* Specify the default ALSA audio recording device name.
*
* This variable is a specific audio device to open for recording, when the
* "default" audio device is used.
*
* If this hint isn't set, SDL will check SDL_HINT_AUDIO_ALSA_DEFAULT_DEVICE
* before choosing a reasonable default.
*
* This hint should be set before an audio device is opened.
*
* \since This hint is available since SDL 3.2.0.
*
* \sa SDL_HINT_AUDIO_ALSA_DEFAULT_PLAYBACK_DEVICE
* \sa SDL_HINT_AUDIO_ALSA_DEFAULT_DEVICE
*/
#define SDL_HINT_AUDIO_ALSA_DEFAULT_RECORDING_DEVICE "SDL_AUDIO_ALSA_DEFAULT_RECORDING_DEVICE"
/**
* A variable controlling the audio category on iOS and macOS.
*
* The variable can be set to the following values:
*
* - "ambient": Use the AVAudioSessionCategoryAmbient audio category, will be
* muted by the phone mute switch (default)
* - "playback": Use the AVAudioSessionCategoryPlayback category.
*
* For more information, see Apple's documentation:
* https://developer.apple.com/library/content/documentation/Audio/Conceptual/AudioSessionProgrammingGuide/AudioSessionCategoriesandModes/AudioSessionCategoriesandModes.html
*
* This hint should be set before an audio device is opened.
*
* \since This hint is available since SDL 3.2.0.
*/
#define SDL_HINT_AUDIO_CATEGORY "SDL_AUDIO_CATEGORY"
/**
* A variable controlling the default audio channel count.
*
* If the application doesn't specify the audio channel count when opening the
* device, this hint can be used to specify a default channel count that will
* be used. This defaults to "1" for recording and "2" for playback devices.
*
* This hint should be set before an audio device is opened.
*
* \since This hint is available since SDL 3.2.0.
*/
#define SDL_HINT_AUDIO_CHANNELS "SDL_AUDIO_CHANNELS"
/**
* Specify an application icon name for an audio device.
*
* Some audio backends (such as Pulseaudio and Pipewire) allow you to set an
* XDG icon name for your application. Among other things, this icon might
* show up in a system control panel that lets the user adjust the volume on
* specific audio streams instead of using one giant master volume slider.
* Note that this is unrelated to the icon used by the windowing system, which
* may be set with SDL_SetWindowIcon (or via desktop file on Wayland).
*
* Setting this to "" or leaving it unset will have SDL use a reasonable
* default, "applications-games", which is likely to be installed. See
* https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html
* and
* https://specifications.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html
* for the relevant XDG icon specs.
*
* This hint should be set before an audio device is opened.
*
* \since This hint is available since SDL 3.2.0.
*/
#define SDL_HINT_AUDIO_DEVICE_APP_ICON_NAME "SDL_AUDIO_DEVICE_APP_ICON_NAME"
/**
* A variable controlling device buffer size.
*
* This hint is an integer > 0, that represents the size of the device's
* buffer in sample frames (stereo audio data in 16-bit format is 4 bytes per
* sample frame, for example).
*
* SDL3 generally decides this value on behalf of the app, but if for some
* reason the app needs to dictate this (because they want either lower
* latency or higher throughput AND ARE WILLING TO DEAL WITH what that might
* require of the app), they can specify it.
*
* SDL will try to accommodate this value, but there is no promise you'll get
* the buffer size requested. Many platforms won't honor this request at all,
* or might adjust it.
*
* This hint should be set before an audio device is opened.
*
* \since This hint is available since SDL 3.2.0.
*/
#define SDL_HINT_AUDIO_DEVICE_SAMPLE_FRAMES "SDL_AUDIO_DEVICE_SAMPLE_FRAMES"
/**
* Specify an audio stream name for an audio device.
*
* Some audio backends (such as PulseAudio) allow you to describe your audio
* stream. Among other things, this description might show up in a system
* control panel that lets the user adjust the volume on specific audio
* streams instead of using one giant master volume slider.
*
* This hints lets you transmit that information to the OS. The contents of
* this hint are used while opening an audio device. You should use a string
* that describes your what your program is playing ("audio stream" is
* probably sufficient in many cases, but this could be useful for something
* like "team chat" if you have a headset playing VoIP audio separately).
*
* Setting this to "" or leaving it unset will have SDL use a reasonable
* default: "audio stream" or something similar.
*
* Note that while this talks about audio streams, this is an OS-level
* concept, so it applies to a physical audio device in this case, and not an
* SDL_AudioStream, nor an SDL logical audio device.
*
* This hint should be set before an audio device is opened.
*
* \since This hint is available since SDL 3.2.0.
*/
#define SDL_HINT_AUDIO_DEVICE_STREAM_NAME "SDL_AUDIO_DEVICE_STREAM_NAME"
/**
* Specify an application role for an audio device.
*
* Some audio backends (such as Pipewire) allow you to describe the role of
* your audio stream. Among other things, this description might show up in a
* system control panel or software for displaying and manipulating media
* playback/recording graphs.
*
* This hints lets you transmit that information to the OS. The contents of
* this hint are used while opening an audio device. You should use a string
* that describes your what your program is playing (Game, Music, Movie,
* etc...).
*
* Setting this to "" or leaving it unset will have SDL use a reasonable
* default: "Game" or something similar.
*
* Note that while this talks about audio streams, this is an OS-level
* concept, so it applies to a physical audio device in this case, and not an
* SDL_AudioStream, nor an SDL logical audio device.
*
* For Windows WASAPI audio, the following roles are supported, and map to
* `AUDIO_STREAM_CATEGORY`:
*
* - "Other" (default)
* - "Communications" - Real-time communications, such as VOIP or chat
* - "Game" - Game audio
* - "GameChat" - Game chat audio, similar to "Communications" except that
* this will not attenuate other audio streams
* - "Movie" - Music or sound with dialog
* - "Media" - Music or sound without dialog
*
* If your application applies its own echo cancellation, gain control, and
* noise reduction it should also set SDL_HINT_AUDIO_DEVICE_RAW_STREAM.
*
* This hint should be set before an audio device is opened.
*
* \since This hint is available since SDL 3.2.0.
*/
#define SDL_HINT_AUDIO_DEVICE_STREAM_ROLE "SDL_AUDIO_DEVICE_STREAM_ROLE"
/**
* Specify whether this audio device should do audio processing.
*
* Some operating systems perform echo cancellation, gain control, and noise
* reduction as needed. If your application already handles these, you can set
* this hint to prevent the OS from doing additional audio processing.
*
* This corresponds to the WASAPI audio option `AUDCLNT_STREAMOPTIONS_RAW`.
*
* The variable can be set to the following values:
*
* - "0": audio processing can be done by the OS. (default)
* - "1": audio processing is done by the application.
*
* This hint should be set before an audio device is opened.
*
* \since This hint is available since SDL 3.4.0.
*/
#define SDL_HINT_AUDIO_DEVICE_RAW_STREAM "SDL_AUDIO_DEVICE_RAW_STREAM"
/**
* Specify the input file when recording audio using the disk audio driver.
*
* This defaults to "sdlaudio-in.raw"
*
* This hint should be set before an audio device is opened.
*
* \since This hint is available since SDL 3.2.0.
*/
#define SDL_HINT_AUDIO_DISK_INPUT_FILE "SDL_AUDIO_DISK_INPUT_FILE"
/**
* Specify the output file when playing audio using the disk audio driver.
*
* This defaults to "sdlaudio.raw"
*
* This hint should be set before an audio device is opened.
*
* \since This hint is available since SDL 3.2.0.
*/
#define SDL_HINT_AUDIO_DISK_OUTPUT_FILE "SDL_AUDIO_DISK_OUTPUT_FILE"
/**
* A variable controlling the audio rate when using the disk audio driver.
*
* The disk audio driver normally simulates real-time for the audio rate that
* was specified, but you can use this variable to adjust this rate higher or
* lower down to 0. The default value is "1.0".
*
* This hint should be set before an audio device is opened.
*
* \since This hint is available since SDL 3.2.0.
*/
#define SDL_HINT_AUDIO_DISK_TIMESCALE "SDL_AUDIO_DISK_TIMESCALE"
/**
* A variable that specifies an audio backend to use.
*
* By default, SDL will try all available audio backends in a reasonable order
* until it finds one that can work, but this hint allows the app or user to
* force a specific driver, such as "pipewire" if, say, you are on PulseAudio
* but want to try talking to the lower level instead.
*
* This hint should be set before SDL is initialized.
*
* \since This hint is available since SDL 3.2.0.
*/
#define SDL_HINT_AUDIO_DRIVER "SDL_AUDIO_DRIVER"
/**
* A variable controlling the audio rate when using the dummy audio driver.
*
* The dummy audio driver normally simulates real-time for the audio rate that
* was specified, but you can use this variable to adjust this rate higher or
* lower down to 0. The default value is "1.0".
*
* This hint should be set before an audio device is opened.
*
* \since This hint is available since SDL 3.2.0.
*/
#define SDL_HINT_AUDIO_DUMMY_TIMESCALE "SDL_AUDIO_DUMMY_TIMESCALE"
/**
* A variable controlling the default audio format.
*
* If the application doesn't specify the audio format when opening the
* device, this hint can be used to specify a default format that will be
* used.
*
* The variable can be set to the following values:
*
* - "U8": Unsigned 8-bit audio
* - "S8": Signed 8-bit audio
* - "S16LE": Signed 16-bit little-endian audio
* - "S16BE": Signed 16-bit big-endian audio
* - "S16": Signed 16-bit native-endian audio (default)
* - "S32LE": Signed 32-bit little-endian audio
* - "S32BE": Signed 32-bit big-endian audio
* - "S32": Signed 32-bit native-endian audio
* - "F32LE": Floating point little-endian audio
* - "F32BE": Floating point big-endian audio
* - "F32": Floating point native-endian audio
*
* This hint should be set before an audio device is opened.
*
* \since This hint is available since SDL 3.2.0.
*/
#define SDL_HINT_AUDIO_FORMAT "SDL_AUDIO_FORMAT"
/**
* A variable controlling the default audio frequency.
*
* If the application doesn't specify the audio frequency when opening the
* device, this hint can be used to specify a default frequency that will be
* used. This defaults to "44100".
*
* This hint should be set before an audio device is opened.
*
* \since This hint is available since SDL 3.2.0.
*/
#define SDL_HINT_AUDIO_FREQUENCY "SDL_AUDIO_FREQUENCY"
/**
* A variable that causes SDL to not ignore audio "monitors".
*
* This is currently only used by the PulseAudio driver.
*
* By default, SDL ignores audio devices that aren't associated with physical
* hardware. Changing this hint to "1" will expose anything SDL sees that
* appears to be an audio source or sink. This will add "devices" to the list
* that the user probably doesn't want or need, but it can be useful in
* scenarios where you want to hook up SDL to some sort of virtual device,
* etc.
*
* The variable can be set to the following values:
*
* - "0": Audio monitor devices will be ignored. (default)
* - "1": Audio monitor devices will show up in the device list.
*
* This hint should be set before SDL is initialized.
*
* \since This hint is available since SDL 3.2.0.
*/
#define SDL_HINT_AUDIO_INCLUDE_MONITORS "SDL_AUDIO_INCLUDE_MONITORS"
/**
* A variable controlling whether SDL updates joystick state when getting
* input events.
*
* The variable can be set to the following values:
*
* - "0": You'll call SDL_UpdateJoysticks() manually.
* - "1": SDL will automatically call SDL_UpdateJoysticks(). (default)
*
* This hint can be set anytime.
*
* \since This hint is available since SDL 3.2.0.
*/
#define SDL_HINT_AUTO_UPDATE_JOYSTICKS "SDL_AUTO_UPDATE_JOYSTICKS"
/**
* A variable controlling whether SDL updates sensor state when getting input
* events.
*
* The variable can be set to the following values:
*
* - "0": You'll call SDL_UpdateSensors() manually.
* - "1": SDL will automatically call SDL_UpdateSensors(). (default)
*
* This hint can be set anytime.
*
* \since This hint is available since SDL 3.2.0.
*/
#define SDL_HINT_AUTO_UPDATE_SENSORS "SDL_AUTO_UPDATE_SENSORS"
/**
* Prevent SDL from using version 4 of the bitmap header when saving BMPs.
*
* The bitmap header version 4 is required for proper alpha channel support
* and SDL will use it when required. Should this not be desired, this hint
* can force the use of the 40 byte header version which is supported
* everywhere.
*
* The variable can be set to the following values:
*
* - "0": Surfaces with a colorkey or an alpha channel are saved to a 32-bit
* BMP file with an alpha mask. SDL will use the bitmap header version 4 and
* set the alpha mask accordingly. (default)
* - "1": Surfaces with a colorkey or an alpha channel are saved to a 32-bit
* BMP file without an alpha mask. The alpha channel data will be in the
* file, but applications are going to ignore it.
*
* This hint can be set anytime.
*
* \since This hint is available since SDL 3.2.0.
*/
#define SDL_HINT_BMP_SAVE_LEGACY_FORMAT "SDL_BMP_SAVE_LEGACY_FORMAT"
/**
* A variable that decides what camera backend to use.
*
* By default, SDL will try all available camera backends in a reasonable
* order until it finds one that can work, but this hint allows the app or
* user to force a specific target, such as "directshow" if, say, you are on
* Windows Media Foundations but want to try DirectShow instead.
*
* The default value is unset, in which case SDL will try to figure out the
* best camera backend on your behalf. This hint needs to be set before
* SDL_Init() is called to be useful.
*
* \since This hint is available since SDL 3.2.0.
*/
#define SDL_HINT_CAMERA_DRIVER "SDL_CAMERA_DRIVER"
/**
* A variable that limits what CPU features are available.
*
* By default, SDL marks all features the current CPU supports as available.
* This hint allows the enabled features to be limited to a subset.
*
* When the hint is unset, or empty, SDL will enable all detected CPU
* features.
*
* The variable can be set to a comma separated list containing the following
* items:
*
* - "all"
* - "altivec"
* - "sse"
* - "sse2"
* - "sse3"
* - "sse41"
* - "sse42"
* - "avx"
* - "avx2"
* - "avx512f"
* - "arm-simd"
* - "neon"
* - "lsx"
* - "lasx"
*
* The items can be prefixed by '+'/'-' to add/remove features.
*
* \since This hint is available since SDL 3.2.0.
*/
#define SDL_HINT_CPU_FEATURE_MASK "SDL_CPU_FEATURE_MASK"
/**
* A variable controlling whether DirectInput should be used for controllers.
*
* The variable can be set to the following values:
*
* - "0": Disable DirectInput detection.
* - "1": Enable DirectInput detection. (default)
*
* This hint should be set before SDL is initialized.
*
* \since This hint is available since SDL 3.2.0.
*/
#define SDL_HINT_JOYSTICK_DIRECTINPUT "SDL_JOYSTICK_DIRECTINPUT"
/**
* A variable that specifies a dialog backend to use.
*
* By default, SDL will try all available dialog backends in a reasonable
* order until it finds one that can work, but this hint allows the app or
* user to force a specific target.
*
* If the specified target does not exist or is not available, the
* dialog-related function calls will fail.
*
* This hint currently only applies to platforms using the generic "Unix"
* dialog implementation, but may be extended to more platforms in the future.
* Note that some Unix and Unix-like platforms have their own implementation,
* such as macOS and Haiku.
*
* The variable can be set to the following values:
*
* - NULL: Select automatically (default, all platforms)
* - "portal": Use XDG Portals through DBus (Unix only)
* - "zenity": Use the Zenity program (Unix only)
*
* More options may be added in the future.
*
* This hint can be set anytime.
*
* \since This hint is available since SDL 3.2.0.
*/
#define SDL_HINT_FILE_DIALOG_DRIVER "SDL_FILE_DIALOG_DRIVER"
/**
* Override for SDL_GetDisplayUsableBounds().
*
* If set, this hint will override the expected results for
* SDL_GetDisplayUsableBounds() for display index 0. Generally you don't want
* to do this, but this allows an embedded system to request that some of the
* screen be reserved for other uses when paired with a well-behaved
* application.
*
* The contents of this hint must be 4 comma-separated integers, the first is
* the bounds x, then y, width and height, in that order.
*
* This hint can be set anytime.
*
* \since This hint is available since SDL 3.2.0.
*/
#define SDL_HINT_DISPLAY_USABLE_BOUNDS "SDL_DISPLAY_USABLE_BOUNDS"
/**
* Set the level of checking for invalid parameters passed to SDL functions.
*
* The variable can be set to the following values:
*
* - "1": Enable fast parameter error checking, e.g. quick NULL checks, etc.
* - "2": Enable full parameter error checking, e.g. validating objects are
* the correct type, etc. (default)
*
* This hint can be set anytime.
*
* \since This hint is available since SDL 3.4.0.
*/
#define SDL_HINT_INVALID_PARAM_CHECKS "SDL_INVALID_PARAM_CHECKS"
/**
* Disable giving back control to the browser automatically when running with
* asyncify.
*
* With -s ASYNCIFY, SDL calls emscripten_sleep during operations such as
* refreshing the screen or polling events.
*
* This hint only applies to the emscripten platform.
*
* The variable can be set to the following values:
*
* - "0": Disable emscripten_sleep calls (if you give back browser control
* manually or use asyncify for other purposes).
* - "1": Enable emscripten_sleep calls. (default)
*
* This hint can be set anytime.
*
* \since This hint is available since SDL 3.2.0.
*/
#define SDL_HINT_EMSCRIPTEN_ASYNCIFY "SDL_EMSCRIPTEN_ASYNCIFY"
/**
* Specify the CSS selector used for the "default" window/canvas.
*
* This hint only applies to the emscripten platform.
*
* This hint should be set before creating a window.
*
* \since This hint is available since SDL 3.2.0.
*/
#define SDL_HINT_EMSCRIPTEN_CANVAS_SELECTOR "SDL_EMSCRIPTEN_CANVAS_SELECTOR"
/**
* Override the binding element for keyboard inputs for Emscripten builds.
*
* This hint only applies to the emscripten platform.
*
* The variable can be one of:
*
* - "#window": the javascript window object
* - "#document": the javascript document object
* - "#screen": the javascript window.screen object
* - "#canvas": the WebGL canvas element
* - "#none": Don't bind anything at all
* - any other string without a leading # sign applies to the element on the
* page with that ID.
*
* This hint should be set before creating a window.
*
* \since This hint is available since SDL 3.2.0.
*/
#define SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT "SDL_EMSCRIPTEN_KEYBOARD_ELEMENT"
/**
* Dictate that newly-created windows will fill the whole browser window.
*
* The canvas element fills the entire document. Resize events will be
* generated as the browser window is resized, as that will adjust the canvas
* size as well. The canvas will cover anything else on the page, including
* any controls provided by Emscripten in its generated HTML file. Often times
* this is desirable for a browser-based game, but it means several things
* that we expect of an SDL window on other platforms might not work as
* expected, such as minimum window sizes and aspect ratios.
*
* This hint overrides SDL_PROP_WINDOW_CREATE_EMSCRIPTEN_FILL_DOCUMENT_BOOLEAN
* properties when creating an SDL window.
*
* This hint only applies to the emscripten platform.
*
* This hint should be set before creating a window.
*
* \since This hint is available since SDL 3.4.0.
*/
#define SDL_HINT_EMSCRIPTEN_FILL_DOCUMENT "SDL_EMSCRIPTEN_FILL_DOCUMENT"
/**
* A variable that controls whether the on-screen keyboard should be shown
* when text input is active.
*
* The variable can be set to the following values:
*
* - "auto": The on-screen keyboard will be shown if there is no physical
* keyboard attached. (default)
* - "0": Do not show the on-screen keyboard.
* - "1": Show the on-screen keyboard, if available.
*
* This hint must be set before SDL_StartTextInput() is called
*
* \since This hint is available since SDL 3.2.0.
*/
#define SDL_HINT_ENABLE_SCREEN_KEYBOARD "SDL_ENABLE_SCREEN_KEYBOARD"
/**
* A variable containing a list of evdev devices to use if udev is not
* available.
*
* The list of devices is in the form:
*
* deviceclass:path[,deviceclass:path[,...]]
*
* where device class is an integer representing the SDL_UDEV_deviceclass and
* path is the full path to the event device.
*
* This hint should be set before SDL is initialized.
*
* \since This hint is available since SDL 3.2.0.
*/
#define SDL_HINT_EVDEV_DEVICES "SDL_EVDEV_DEVICES"
/**
* A variable controlling verbosity of the logging of SDL events pushed onto
* the internal queue.
*
* The variable can be set to the following values, from least to most
* verbose:
*
* - "0": Don't log any events. (default)
* - "1": Log most events (other than the really spammy ones).
* - "2": Include mouse and finger motion events.
*
* This is generally meant to be used to debug SDL itself, but can be useful
* for application developers that need better visibility into what is going
* on in the event queue. Logged events are sent through SDL_Log(), which
* means by default they appear on stdout on most platforms or maybe
* OutputDebugString() on Windows, and can be funneled by the app with
* SDL_SetLogOutputFunction(), etc.
*
* This hint can be set anytime.
*
* \since This hint is available since SDL 3.2.0.
*/
#define SDL_HINT_EVENT_LOGGING "SDL_EVENT_LOGGING"
/**
* A variable controlling whether raising the window should be done more
* forcefully.
*
* The variable can be set to the following values:
*
* - "0": Honor the OS policy for raising windows. (default)
* - "1": Force the window to be raised, overriding any OS policy.
*
* At present, this is only an issue under MS Windows, which makes it nearly
* impossible to programmatically move a window to the foreground, for
* "security" reasons. See http://stackoverflow.com/a/34414846 for a
* discussion.
*
* This hint can be set anytime.
*
* \since This hint is available since SDL 3.2.0.
*/
#define SDL_HINT_FORCE_RAISEWINDOW "SDL_FORCE_RAISEWINDOW"
/**
* A variable controlling how 3D acceleration is used to accelerate the SDL
* screen surface.
*
* SDL can try to accelerate the SDL screen surface by using streaming
* textures with a 3D rendering engine. This variable controls whether and how
* this is done.
*
* The variable can be set to the following values:
*
* - "0": Disable 3D acceleration
* - "1": Enable 3D acceleration, using the default renderer. (default)
* - "X": Enable 3D acceleration, using X where X is one of the valid
* rendering drivers. (e.g. "direct3d", "opengl", etc.)
*
* This hint should be set before calling SDL_GetWindowSurface()
*
* \since This hint is available since SDL 3.2.0.
*/
#define SDL_HINT_FRAMEBUFFER_ACCELERATION "SDL_FRAMEBUFFER_ACCELERATION"
/**
* A variable that lets you manually hint extra gamecontroller db entries.
*
* The variable should be newline delimited rows of gamecontroller config
* data, see SDL_gamepad.h
*
* You can update mappings after SDL is initialized with
* SDL_GetGamepadMappingForGUID() and SDL_AddGamepadMapping()
*
* This hint should be set before SDL is initialized.
*
* \since This hint is available since SDL 3.2.0.
*/
#define SDL_HINT_GAMECONTROLLERCONFIG "SDL_GAMECONTROLLERCONFIG"
/**
* A variable that lets you provide a file with extra gamecontroller db
* entries.
*
* The file should contain lines of gamecontroller config data, see
* SDL_gamepad.h
*
* You can update mappings after SDL is initialized with
* SDL_GetGamepadMappingForGUID() and SDL_AddGamepadMapping()
*
* This hint should be set before SDL is initialized.
*
* \since This hint is available since SDL 3.2.0.
*/
#define SDL_HINT_GAMECONTROLLERCONFIG_FILE "SDL_GAMECONTROLLERCONFIG_FILE"
/**
* A variable that overrides the automatic controller type detection.
*
* The variable should be comma separated entries, in the form: VID/PID=type
*
* The VID and PID should be hexadecimal with exactly 4 digits, e.g. 0x00fd
*
* This hint affects what low level protocol is used with the HIDAPI driver.
*
* The variable can be set to the following values:
*
* - "Xbox360"
* - "XboxOne"
* - "PS3"
* - "PS4"
* - "PS5"
* - "SwitchPro"
*
* This hint should be set before SDL is initialized.
*
* \since This hint is available since SDL 3.2.0.
*/
#define SDL_HINT_GAMECONTROLLERTYPE "SDL_GAMECONTROLLERTYPE"
/**
* A variable containing a list of devices to skip when scanning for game
* controllers.
*
* The format of the string is a comma separated list of USB VID/PID pairs in
* hexadecimal form, e.g.
*
* 0xAAAA/0xBBBB,0xCCCC/0xDDDD
*
* The variable can also take the form of "@file", in which case the named
* file will be loaded and interpreted as the value of the variable.
*
* This hint can be set anytime.
*
* \since This hint is available since SDL 3.2.0.
*/
#define SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES "SDL_GAMECONTROLLER_IGNORE_DEVICES"
/**
* If set, all devices will be skipped when scanning for game controllers
* except for the ones listed in this variable.
*
* The format of the string is a comma separated list of USB VID/PID pairs in
* hexadecimal form, e.g.
*
* 0xAAAA/0xBBBB,0xCCCC/0xDDDD
*
* The variable can also take the form of "@file", in which case the named
* file will be loaded and interpreted as the value of the variable.
*
* This hint can be set anytime.
*
* \since This hint is available since SDL 3.2.0.
*/
#define SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT "SDL_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT"