gosu 1.4.5.pre1 → 1.4.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/dependencies/SDL/include/SDL.h +1 -0
  3. data/dependencies/SDL/include/SDL_assert.h +4 -2
  4. data/dependencies/SDL/include/SDL_atomic.h +20 -0
  5. data/dependencies/SDL/include/SDL_audio.h +40 -4
  6. data/dependencies/SDL/include/SDL_blendmode.h +4 -6
  7. data/dependencies/SDL/include/SDL_clipboard.h +47 -0
  8. data/dependencies/SDL/include/SDL_config.h +71 -45
  9. data/dependencies/SDL/include/SDL_cpuinfo.h +39 -4
  10. data/dependencies/SDL/include/SDL_egl.h +59 -9
  11. data/dependencies/SDL/include/SDL_endian.h +34 -3
  12. data/dependencies/SDL/include/SDL_events.h +32 -1
  13. data/dependencies/SDL/include/SDL_filesystem.h +5 -1
  14. data/dependencies/SDL/include/SDL_gamecontroller.h +78 -5
  15. data/dependencies/SDL/include/SDL_guid.h +100 -0
  16. data/dependencies/SDL/include/SDL_hints.h +645 -43
  17. data/dependencies/SDL/include/SDL_joystick.h +127 -7
  18. data/dependencies/SDL/include/SDL_keyboard.h +38 -1
  19. data/dependencies/SDL/include/SDL_keycode.h +6 -1
  20. data/dependencies/SDL/include/SDL_log.h +2 -2
  21. data/dependencies/SDL/include/SDL_main.h +42 -2
  22. data/dependencies/SDL/include/SDL_metal.h +2 -1
  23. data/dependencies/SDL/include/SDL_mouse.h +12 -1
  24. data/dependencies/SDL/include/SDL_opengl.h +0 -51
  25. data/dependencies/SDL/include/SDL_opengl_glext.h +2260 -231
  26. data/dependencies/SDL/include/SDL_opengles2_gl2.h +374 -339
  27. data/dependencies/SDL/include/SDL_opengles2_gl2ext.h +3479 -1496
  28. data/dependencies/SDL/include/SDL_opengles2_gl2platform.h +6 -9
  29. data/dependencies/SDL/include/SDL_opengles2_khrplatform.h +43 -14
  30. data/dependencies/SDL/include/SDL_platform.h +32 -6
  31. data/dependencies/SDL/include/SDL_rect.h +154 -2
  32. data/dependencies/SDL/include/SDL_render.h +46 -17
  33. data/dependencies/SDL/include/SDL_revision.h +6 -1
  34. data/dependencies/SDL/include/SDL_rwops.h +1 -15
  35. data/dependencies/SDL/include/SDL_scancode.h +46 -21
  36. data/dependencies/SDL/include/SDL_sensor.h +24 -3
  37. data/dependencies/SDL/include/SDL_stdinc.h +119 -8
  38. data/dependencies/SDL/include/SDL_surface.h +3 -1
  39. data/dependencies/SDL/include/SDL_system.h +66 -6
  40. data/dependencies/SDL/include/SDL_syswm.h +2 -0
  41. data/dependencies/SDL/include/SDL_test_common.h +1 -0
  42. data/dependencies/SDL/include/SDL_test_font.h +90 -3
  43. data/dependencies/SDL/include/SDL_thread.h +3 -3
  44. data/dependencies/SDL/include/SDL_touch.h +8 -0
  45. data/dependencies/SDL/include/SDL_version.h +19 -3
  46. data/dependencies/SDL/include/SDL_video.h +71 -9
  47. data/dependencies/SDL/include/begin_code.h +4 -4
  48. data/dependencies/SDL/lib/x64/libSDL2.dll.a +0 -0
  49. data/dependencies/SDL/lib/x86/libSDL2.dll.a +0 -0
  50. data/dependencies/SDL_sound/SDL_sound.c +210 -71
  51. data/dependencies/SDL_sound/SDL_sound.h +1 -1
  52. data/dependencies/SDL_sound/SDL_sound_coreaudio.c +111 -168
  53. data/dependencies/SDL_sound/SDL_sound_flac.c +0 -6
  54. data/dependencies/SDL_sound/SDL_sound_internal.h +27 -5
  55. data/dependencies/SDL_sound/SDL_sound_modplug.c +20 -8
  56. data/dependencies/SDL_sound/SDL_sound_mp3.c +11 -7
  57. data/dependencies/SDL_sound/SDL_sound_raw.c +1 -1
  58. data/dependencies/SDL_sound/SDL_sound_shn.c +1 -5
  59. data/dependencies/SDL_sound/SDL_sound_voc.c +1 -1
  60. data/dependencies/SDL_sound/SDL_sound_vorbis.c +2 -4
  61. data/dependencies/SDL_sound/SDL_sound_wav.c +44 -20
  62. data/dependencies/SDL_sound/dr_flac.h +237 -95
  63. data/dependencies/SDL_sound/dr_mp3.h +46 -33
  64. data/dependencies/SDL_sound/libmodplug/fastmix.c +53 -39
  65. data/dependencies/SDL_sound/libmodplug/libmodplug.h +0 -12
  66. data/dependencies/SDL_sound/libmodplug/load_669.c +37 -32
  67. data/dependencies/SDL_sound/libmodplug/load_amf.c +57 -44
  68. data/dependencies/SDL_sound/libmodplug/load_ams.c +127 -100
  69. data/dependencies/SDL_sound/libmodplug/load_dbm.c +40 -37
  70. data/dependencies/SDL_sound/libmodplug/load_dmf.c +61 -49
  71. data/dependencies/SDL_sound/libmodplug/load_dsm.c +18 -13
  72. data/dependencies/SDL_sound/libmodplug/load_far.c +31 -24
  73. data/dependencies/SDL_sound/libmodplug/load_gdm.c +27 -21
  74. data/dependencies/SDL_sound/libmodplug/load_it.c +106 -91
  75. data/dependencies/SDL_sound/libmodplug/load_mdl.c +43 -35
  76. data/dependencies/SDL_sound/libmodplug/load_med.c +66 -52
  77. data/dependencies/SDL_sound/libmodplug/load_mod.c +30 -26
  78. data/dependencies/SDL_sound/libmodplug/load_mt2.c +61 -50
  79. data/dependencies/SDL_sound/libmodplug/load_mtm.c +23 -17
  80. data/dependencies/SDL_sound/libmodplug/load_okt.c +18 -16
  81. data/dependencies/SDL_sound/libmodplug/load_psm.c +44 -32
  82. data/dependencies/SDL_sound/libmodplug/load_ptm.c +18 -14
  83. data/dependencies/SDL_sound/libmodplug/load_s3m.c +59 -53
  84. data/dependencies/SDL_sound/libmodplug/load_stm.c +23 -18
  85. data/dependencies/SDL_sound/libmodplug/load_ult.c +33 -29
  86. data/dependencies/SDL_sound/libmodplug/load_xm.c +64 -57
  87. data/dependencies/SDL_sound/libmodplug/mmcmp.c +2 -1
  88. data/dependencies/SDL_sound/libmodplug/snd_dsp.c +30 -20
  89. data/dependencies/SDL_sound/libmodplug/snd_flt.c +6 -4
  90. data/dependencies/SDL_sound/libmodplug/snd_fx.c +91 -65
  91. data/dependencies/SDL_sound/libmodplug/sndfile.c +91 -66
  92. data/dependencies/SDL_sound/libmodplug/sndmix.c +58 -35
  93. data/dependencies/SDL_sound/stb_vorbis.h +14 -9
  94. data/dependencies/mojoAL/mojoal.c +41 -24
  95. data/dependencies/utf8proc/utf8proc.c +1 -1
  96. data/dependencies/utf8proc/utf8proc.h +1 -1
  97. data/dependencies/utf8proc/utf8proc_data.h +3366 -3184
  98. data/lib/SDL2.dll +0 -0
  99. data/lib64/SDL2.dll +0 -0
  100. data/src/Window.cpp +3 -0
  101. metadata +5 -4
@@ -278,10 +278,7 @@ extern "C" {
278
278
  * If this hint isn't specified to a valid setting, or libsamplerate isn't
279
279
  * available, SDL will use the default, internal resampling algorithm.
280
280
  *
281
- * Note that this is currently only applicable to resampling audio that is
282
- * being written to a device for playback or audio being read from a device
283
- * for capture. SDL_AudioCVT always uses the default resampler (although this
284
- * might change for SDL 2.1).
281
+ * As of SDL 2.26, SDL_ConvertAudio() respects this hint when libsamplerate is available.
285
282
  *
286
283
  * This hint is currently only checked at audio subsystem initialization.
287
284
  *
@@ -392,13 +389,14 @@ extern "C" {
392
389
  #define SDL_HINT_ENABLE_STEAM_CONTROLLERS "SDL_ENABLE_STEAM_CONTROLLERS"
393
390
 
394
391
  /**
395
- * \brief A variable controlling whether SDL logs all events pushed onto its internal queue.
392
+ * \brief A variable controlling verbosity of the logging of SDL events pushed onto the internal queue.
396
393
  *
397
- * This variable can be set to the following values:
394
+ * This variable can be set to the following values, from least to most verbose:
398
395
  *
399
396
  * "0" - Don't log any events (default)
400
- * "1" - Log all events except mouse and finger motion, which are pretty spammy.
401
- * "2" - Log all events.
397
+ * "1" - Log most events (other than the really spammy ones).
398
+ * "2" - Include mouse and finger motion events.
399
+ * "3" - Include SDL_SysWMEvent events.
402
400
  *
403
401
  * This is generally meant to be used to debug SDL itself, but can be useful
404
402
  * for application developers that need better visibility into what is going
@@ -412,6 +410,19 @@ extern "C" {
412
410
  */
413
411
  #define SDL_HINT_EVENT_LOGGING "SDL_EVENT_LOGGING"
414
412
 
413
+ /**
414
+ * \brief A variable controlling whether raising the window should be done more forcefully
415
+ *
416
+ * This variable can be set to the following values:
417
+ * "0" - No forcing (the default)
418
+ * "1" - Extra level of forcing
419
+ *
420
+ * At present, this is only an issue under MS Windows, which makes it nearly impossible to
421
+ * programmatically move a window to the foreground, for "security" reasons. See
422
+ * http://stackoverflow.com/a/34414846 for a discussion.
423
+ */
424
+ #define SDL_HINT_FORCE_RAISEWINDOW "SDL_HINT_FORCE_RAISEWINDOW"
425
+
415
426
  /**
416
427
  * \brief A variable controlling how 3D acceleration is used to accelerate the SDL screen surface.
417
428
  *
@@ -528,6 +539,14 @@ extern "C" {
528
539
  */
529
540
  #define SDL_HINT_GRAB_KEYBOARD "SDL_GRAB_KEYBOARD"
530
541
 
542
+ /**
543
+ * \brief A variable containing a list of devices to ignore in SDL_hid_enumerate()
544
+ *
545
+ * For example, to ignore the Shanwan DS3 controller and any Valve controller, you might
546
+ * have the string "0x2563/0x0523,0x28de/0x0000"
547
+ */
548
+ #define SDL_HINT_HIDAPI_IGNORE_DEVICES "SDL_HIDAPI_IGNORE_DEVICES"
549
+
531
550
  /**
532
551
  * \brief A variable controlling whether the idle timer is disabled on iOS.
533
552
  *
@@ -566,6 +585,17 @@ extern "C" {
566
585
  */
567
586
  #define SDL_HINT_IME_SHOW_UI "SDL_IME_SHOW_UI"
568
587
 
588
+ /**
589
+ * \brief A variable to control if extended IME text support is enabled.
590
+ * If enabled then SDL_TextEditingExtEvent will be issued if the text would be truncated otherwise.
591
+ * Additionally SDL_TextInputEvent will be dispatched multiple times so that it is not truncated.
592
+ *
593
+ * The variable can be set to the following values:
594
+ * "0" - Legacy behavior. Text can be truncated, no heap allocations. (default)
595
+ * "1" - Modern behavior.
596
+ */
597
+ #define SDL_HINT_IME_SUPPORT_EXTENDED_TEXT "SDL_IME_SUPPORT_EXTENDED_TEXT"
598
+
569
599
  /**
570
600
  * \brief A variable controlling whether the home indicator bar on iPhone X
571
601
  * should be hidden.
@@ -612,18 +642,53 @@ extern "C" {
612
642
  */
613
643
  #define SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE "SDL_JOYSTICK_HIDAPI_GAMECUBE"
614
644
 
615
- /**
616
- * \brief A variable controlling whether Switch Joy-Cons should be treated the same as Switch Pro Controllers when using the HIDAPI driver.
645
+ /**
646
+ * \brief A variable controlling whether "low_frequency_rumble" and "high_frequency_rumble" is used to implement
647
+ * the GameCube controller's 3 rumble modes, Stop(0), Rumble(1), and StopHard(2)
648
+ * this is useful for applications that need full compatibility for things like ADSR envelopes.
649
+ * Stop is implemented by setting "low_frequency_rumble" to "0" and "high_frequency_rumble" ">0"
650
+ * Rumble is both at any arbitrary value,
651
+ * StopHard is implemented by setting both "low_frequency_rumble" and "high_frequency_rumble" to "0"
652
+ *
653
+ * This variable can be set to the following values:
654
+ * "0" - Normal rumble behavior is behavior is used (default)
655
+ * "1" - Proper GameCube controller rumble behavior is used
656
+ *
657
+ */
658
+ #define SDL_HINT_JOYSTICK_GAMECUBE_RUMBLE_BRAKE "SDL_JOYSTICK_GAMECUBE_RUMBLE_BRAKE"
659
+
660
+ /**
661
+ * \brief A variable controlling whether the HIDAPI driver for Nintendo Switch Joy-Cons should be used.
617
662
  *
618
663
  * This variable can be set to the following values:
619
- * "0" - basic Joy-Con support with no analog input (the default)
620
- * "1" - Joy-Cons treated as half full Pro Controllers with analog inputs and sensors
664
+ * "0" - HIDAPI driver is not used
665
+ * "1" - HIDAPI driver is used
621
666
  *
622
- * This does not combine Joy-Cons into a single controller. That's up to the user.
667
+ * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
623
668
  */
624
669
  #define SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS "SDL_JOYSTICK_HIDAPI_JOY_CONS"
625
670
 
626
- /**
671
+ /**
672
+ * \brief A variable controlling whether Nintendo Switch Joy-Con controllers will be combined into a single Pro-like controller when using the HIDAPI driver
673
+ *
674
+ * This variable can be set to the following values:
675
+ * "0" - Left and right Joy-Con controllers will not be combined and each will be a mini-gamepad
676
+ * "1" - Left and right Joy-Con controllers will be combined into a single controller (the default)
677
+ */
678
+ #define SDL_HINT_JOYSTICK_HIDAPI_COMBINE_JOY_CONS "SDL_JOYSTICK_HIDAPI_COMBINE_JOY_CONS"
679
+
680
+ /**
681
+ * \brief A variable controlling whether Nintendo Switch Joy-Con controllers will be in vertical mode when using the HIDAPI driver
682
+ *
683
+ * This variable can be set to the following values:
684
+ * "0" - Left and right Joy-Con controllers will not be in vertical mode (the default)
685
+ * "1" - Left and right Joy-Con controllers will be in vertical mode
686
+ *
687
+ * This hint must be set before calling SDL_Init(SDL_INIT_GAMECONTROLLER)
688
+ */
689
+ #define SDL_HINT_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS "SDL_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS"
690
+
691
+ /**
627
692
  * \brief A variable controlling whether the HIDAPI driver for Amazon Luna controllers connected via Bluetooth should be used.
628
693
  *
629
694
  * This variable can be set to the following values:
@@ -634,6 +699,42 @@ extern "C" {
634
699
  */
635
700
  #define SDL_HINT_JOYSTICK_HIDAPI_LUNA "SDL_JOYSTICK_HIDAPI_LUNA"
636
701
 
702
+ /**
703
+ * \brief A variable controlling whether the HIDAPI driver for Nintendo Online classic controllers should be used.
704
+ *
705
+ * This variable can be set to the following values:
706
+ * "0" - HIDAPI driver is not used
707
+ * "1" - HIDAPI driver is used
708
+ *
709
+ * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
710
+ */
711
+ #define SDL_HINT_JOYSTICK_HIDAPI_NINTENDO_CLASSIC "SDL_JOYSTICK_HIDAPI_NINTENDO_CLASSIC"
712
+
713
+ /**
714
+ * \brief A variable controlling whether the HIDAPI driver for NVIDIA SHIELD controllers should be used.
715
+ *
716
+ * This variable can be set to the following values:
717
+ * "0" - HIDAPI driver is not used
718
+ * "1" - HIDAPI driver is used
719
+ *
720
+ * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
721
+ */
722
+ #define SDL_HINT_JOYSTICK_HIDAPI_SHIELD "SDL_JOYSTICK_HIDAPI_SHIELD"
723
+
724
+ /**
725
+ * \brief A variable controlling whether the HIDAPI driver for PS3 controllers should be used.
726
+ *
727
+ * This variable can be set to the following values:
728
+ * "0" - HIDAPI driver is not used
729
+ * "1" - HIDAPI driver is used
730
+ *
731
+ * The default is the value of SDL_HINT_JOYSTICK_HIDAPI on macOS, and "0" on other platforms.
732
+ *
733
+ * It is not possible to use this driver on Windows, due to limitations in the default drivers
734
+ * installed. See https://github.com/ViGEm/DsHidMini for an alternative driver on Windows.
735
+ */
736
+ #define SDL_HINT_JOYSTICK_HIDAPI_PS3 "SDL_JOYSTICK_HIDAPI_PS3"
737
+
637
738
  /**
638
739
  * \brief A variable controlling whether the HIDAPI driver for PS4 controllers should be used.
639
740
  *
@@ -716,7 +817,7 @@ extern "C" {
716
817
  #define SDL_HINT_JOYSTICK_HIDAPI_STADIA "SDL_JOYSTICK_HIDAPI_STADIA"
717
818
 
718
819
  /**
719
- * \brief A variable controlling whether the HIDAPI driver for Steam Controllers should be used.
820
+ * \brief A variable controlling whether the HIDAPI driver for Bluetooth Steam Controllers should be used.
720
821
  *
721
822
  * This variable can be set to the following values:
722
823
  * "0" - HIDAPI driver is not used
@@ -739,16 +840,56 @@ extern "C" {
739
840
  #define SDL_HINT_JOYSTICK_HIDAPI_SWITCH "SDL_JOYSTICK_HIDAPI_SWITCH"
740
841
 
741
842
  /**
742
- * \brief A variable controlling whether the Home button LED should be turned on when a Nintendo Switch controller is opened
843
+ * \brief A variable controlling whether the Home button LED should be turned on when a Nintendo Switch Pro controller is opened
743
844
  *
744
845
  * This variable can be set to the following values:
745
846
  * "0" - home button LED is turned off
746
847
  * "1" - home button LED is turned on
747
848
  *
748
- * By default the Home button LED state is not changed.
849
+ * By default the Home button LED state is not changed. This hint can also be set to a floating point value between 0.0 and 1.0 which controls the brightness of the Home button LED.
749
850
  */
750
851
  #define SDL_HINT_JOYSTICK_HIDAPI_SWITCH_HOME_LED "SDL_JOYSTICK_HIDAPI_SWITCH_HOME_LED"
751
852
 
853
+ /**
854
+ * \brief A variable controlling whether the Home button LED should be turned on when a Nintendo Switch Joy-Con controller is opened
855
+ *
856
+ * This variable can be set to the following values:
857
+ * "0" - home button LED is turned off
858
+ * "1" - home button LED is turned on
859
+ *
860
+ * By default the Home button LED state is not changed. This hint can also be set to a floating point value between 0.0 and 1.0 which controls the brightness of the Home button LED.
861
+ */
862
+ #define SDL_HINT_JOYSTICK_HIDAPI_JOYCON_HOME_LED "SDL_JOYSTICK_HIDAPI_JOYCON_HOME_LED"
863
+
864
+ /**
865
+ * \brief A variable controlling whether the player LEDs should be lit to indicate which player is associated with a Nintendo Switch controller.
866
+ *
867
+ * This variable can be set to the following values:
868
+ * "0" - player LEDs are not enabled
869
+ * "1" - player LEDs are enabled (the default)
870
+ */
871
+ #define SDL_HINT_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED "SDL_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED"
872
+
873
+ /**
874
+ * \brief A variable controlling whether the HIDAPI driver for Nintendo Wii and Wii U controllers should be used.
875
+ *
876
+ * This variable can be set to the following values:
877
+ * "0" - HIDAPI driver is not used
878
+ * "1" - HIDAPI driver is used
879
+ *
880
+ * This driver doesn't work with the dolphinbar, so the default is SDL_FALSE for now.
881
+ */
882
+ #define SDL_HINT_JOYSTICK_HIDAPI_WII "SDL_JOYSTICK_HIDAPI_WII"
883
+
884
+ /**
885
+ * \brief A variable controlling whether the player LEDs should be lit to indicate which player is associated with a Wii controller.
886
+ *
887
+ * This variable can be set to the following values:
888
+ * "0" - player LEDs are not enabled
889
+ * "1" - player LEDs are enabled (the default)
890
+ */
891
+ #define SDL_HINT_JOYSTICK_HIDAPI_WII_PLAYER_LED "SDL_JOYSTICK_HIDAPI_WII_PLAYER_LED"
892
+
752
893
  /**
753
894
  * \brief A variable controlling whether the HIDAPI driver for XBox controllers should be used.
754
895
  *
@@ -760,17 +901,69 @@ extern "C" {
760
901
  */
761
902
  #define SDL_HINT_JOYSTICK_HIDAPI_XBOX "SDL_JOYSTICK_HIDAPI_XBOX"
762
903
 
763
- /**
904
+ /**
905
+ * \brief A variable controlling whether the HIDAPI driver for XBox 360 controllers should be used.
906
+ *
907
+ * This variable can be set to the following values:
908
+ * "0" - HIDAPI driver is not used
909
+ * "1" - HIDAPI driver is used
910
+ *
911
+ * The default is the value of SDL_HINT_JOYSTICK_HIDAPI_XBOX
912
+ */
913
+ #define SDL_HINT_JOYSTICK_HIDAPI_XBOX_360 "SDL_JOYSTICK_HIDAPI_XBOX_360"
914
+
915
+ /**
916
+ * \brief A variable controlling whether the player LEDs should be lit to indicate which player is associated with an Xbox 360 controller.
917
+ *
918
+ * This variable can be set to the following values:
919
+ * "0" - player LEDs are not enabled
920
+ * "1" - player LEDs are enabled (the default)
921
+ */
922
+ #define SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED "SDL_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED"
923
+
924
+ /**
925
+ * \brief A variable controlling whether the HIDAPI driver for XBox 360 wireless controllers should be used.
926
+ *
927
+ * This variable can be set to the following values:
928
+ * "0" - HIDAPI driver is not used
929
+ * "1" - HIDAPI driver is used
930
+ *
931
+ * The default is the value of SDL_HINT_JOYSTICK_HIDAPI_XBOX_360
932
+ */
933
+ #define SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_WIRELESS "SDL_JOYSTICK_HIDAPI_XBOX_360_WIRELESS"
934
+
935
+ /**
936
+ * \brief A variable controlling whether the HIDAPI driver for XBox One controllers should be used.
937
+ *
938
+ * This variable can be set to the following values:
939
+ * "0" - HIDAPI driver is not used
940
+ * "1" - HIDAPI driver is used
941
+ *
942
+ * The default is the value of SDL_HINT_JOYSTICK_HIDAPI_XBOX
943
+ */
944
+ #define SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE "SDL_JOYSTICK_HIDAPI_XBOX_ONE"
945
+
946
+ /**
947
+ * \brief A variable controlling whether the Home button LED should be turned on when an Xbox One controller is opened
948
+ *
949
+ * This variable can be set to the following values:
950
+ * "0" - home button LED is turned off
951
+ * "1" - home button LED is turned on
952
+ *
953
+ * By default the Home button LED state is not changed. This hint can also be set to a floating point value between 0.0 and 1.0 which controls the brightness of the Home button LED. The default brightness is 0.4.
954
+ */
955
+ #define SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED "SDL_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED"
956
+
957
+ /**
764
958
  * \brief A variable controlling whether the RAWINPUT joystick drivers should be used for better handling XInput-capable devices.
765
959
  *
766
960
  * This variable can be set to the following values:
767
961
  * "0" - RAWINPUT drivers are not used
768
962
  * "1" - RAWINPUT drivers are used (the default)
769
- *
770
963
  */
771
964
  #define SDL_HINT_JOYSTICK_RAWINPUT "SDL_JOYSTICK_RAWINPUT"
772
965
 
773
- /**
966
+ /**
774
967
  * \brief A variable controlling whether the RAWINPUT driver should pull correlated data from XInput.
775
968
  *
776
969
  * This variable can be set to the following values:
@@ -783,7 +976,16 @@ extern "C" {
783
976
  */
784
977
  #define SDL_HINT_JOYSTICK_RAWINPUT_CORRELATE_XINPUT "SDL_JOYSTICK_RAWINPUT_CORRELATE_XINPUT"
785
978
 
786
- /**
979
+ /**
980
+ * \brief A variable controlling whether the ROG Chakram mice should show up as joysticks
981
+ *
982
+ * This variable can be set to the following values:
983
+ * "0" - ROG Chakram mice do not show up as joysticks (the default)
984
+ * "1" - ROG Chakram mice show up as joysticks
985
+ */
986
+ #define SDL_HINT_JOYSTICK_ROG_CHAKRAM "SDL_JOYSTICK_ROG_CHAKRAM"
987
+
988
+ /**
787
989
  * \brief A variable controlling whether a separate thread should be used
788
990
  * for handling joystick detection and raw input messages on Windows
789
991
  *
@@ -817,14 +1019,32 @@ extern "C" {
817
1019
  */
818
1020
  #define SDL_HINT_KMSDRM_REQUIRE_DRM_MASTER "SDL_KMSDRM_REQUIRE_DRM_MASTER"
819
1021
 
820
- /**
1022
+ /**
821
1023
  * \brief A comma separated list of devices to open as joysticks
822
1024
  *
823
1025
  * This variable is currently only used by the Linux joystick driver.
824
1026
  */
825
1027
  #define SDL_HINT_JOYSTICK_DEVICE "SDL_JOYSTICK_DEVICE"
826
1028
 
827
- /**
1029
+ /**
1030
+ * \brief A variable controlling whether joysticks on Linux will always treat 'hat' axis inputs (ABS_HAT0X - ABS_HAT3Y) as 8-way digital hats without checking whether they may be analog.
1031
+ *
1032
+ * This variable can be set to the following values:
1033
+ * "0" - Only map hat axis inputs to digital hat outputs if the input axes appear to actually be digital (the default)
1034
+ * "1" - Always handle the input axes numbered ABS_HAT0X to ABS_HAT3Y as digital hats
1035
+ */
1036
+ #define SDL_HINT_LINUX_DIGITAL_HATS "SDL_LINUX_DIGITAL_HATS"
1037
+
1038
+ /**
1039
+ * \brief A variable controlling whether digital hats on Linux will apply deadzones to their underlying input axes or use unfiltered values.
1040
+ *
1041
+ * This variable can be set to the following values:
1042
+ * "0" - Return digital hat values based on unfiltered input axis values
1043
+ * "1" - Return digital hat values with deadzones on the input axes taken into account (the default)
1044
+ */
1045
+ #define SDL_HINT_LINUX_HAT_DEADZONES "SDL_LINUX_HAT_DEADZONES"
1046
+
1047
+ /**
828
1048
  * \brief A variable controlling whether to use the classic /dev/input/js* joystick interface or the newer /dev/input/event* joystick interface on Linux
829
1049
  *
830
1050
  * This variable can be set to the following values:
@@ -835,7 +1055,7 @@ extern "C" {
835
1055
  */
836
1056
  #define SDL_HINT_LINUX_JOYSTICK_CLASSIC "SDL_LINUX_JOYSTICK_CLASSIC"
837
1057
 
838
- /**
1058
+ /**
839
1059
  * \brief A variable controlling whether joysticks on Linux adhere to their HID-defined deadzones or return unfiltered values.
840
1060
  *
841
1061
  * This variable can be set to the following values:
@@ -860,6 +1080,24 @@ extern "C" {
860
1080
  */
861
1081
  #define SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK "SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK"
862
1082
 
1083
+ /**
1084
+ * \brief A variable controlling whether dispatching OpenGL context updates should block the dispatching thread until the main thread finishes processing
1085
+ *
1086
+ * This variable can be set to the following values:
1087
+ * "0" - Dispatching OpenGL context updates will block the dispatching thread until the main thread finishes processing (default).
1088
+ * "1" - Dispatching OpenGL context updates will allow the dispatching thread to continue execution.
1089
+ *
1090
+ * Generally you want the default, but if you have OpenGL code in a background thread on a Mac, and the main thread
1091
+ * hangs because it's waiting for that background thread, but that background thread is also hanging because it's
1092
+ * waiting for the main thread to do an update, this might fix your issue.
1093
+ *
1094
+ * This hint only applies to macOS.
1095
+ *
1096
+ * This hint is available since SDL 2.24.0.
1097
+ *
1098
+ */
1099
+ #define SDL_HINT_MAC_OPENGL_ASYNC_DISPATCH "SDL_MAC_OPENGL_ASYNC_DISPATCH"
1100
+
863
1101
  /**
864
1102
  * \brief A variable setting the double click radius, in pixels.
865
1103
  */
@@ -886,6 +1124,22 @@ extern "C" {
886
1124
  */
887
1125
  #define SDL_HINT_MOUSE_NORMAL_SPEED_SCALE "SDL_MOUSE_NORMAL_SPEED_SCALE"
888
1126
 
1127
+ /**
1128
+ * \brief A variable controlling whether relative mouse mode constrains the mouse to the center of the window
1129
+ *
1130
+ * This variable can be set to the following values:
1131
+ * "0" - Relative mouse mode constrains the mouse to the window
1132
+ * "1" - Relative mouse mode constrains the mouse to the center of the window
1133
+ *
1134
+ * Constraining to the center of the window works better for FPS games and when the
1135
+ * application is running over RDP. Constraining to the whole window works better
1136
+ * for 2D games and increases the chance that the mouse will be in the correct
1137
+ * position when using high DPI mice.
1138
+ *
1139
+ * By default SDL will constrain the mouse to the center of the window
1140
+ */
1141
+ #define SDL_HINT_MOUSE_RELATIVE_MODE_CENTER "SDL_MOUSE_RELATIVE_MODE_CENTER"
1142
+
889
1143
  /**
890
1144
  * \brief A variable controlling whether relative mouse mode is implemented using mouse warping
891
1145
  *
@@ -913,6 +1167,28 @@ extern "C" {
913
1167
  */
914
1168
  #define SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE "SDL_MOUSE_RELATIVE_SPEED_SCALE"
915
1169
 
1170
+ /**
1171
+ * \brief A variable controlling whether the system mouse acceleration curve is used for relative mouse motion.
1172
+ *
1173
+ * This variable can be set to the following values:
1174
+ * "0" - Relative mouse motion will be unscaled (the default)
1175
+ * "1" - Relative mouse motion will be scaled using the system mouse acceleration curve.
1176
+ *
1177
+ * If SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE is set, that will override the system speed scale.
1178
+ */
1179
+ #define SDL_HINT_MOUSE_RELATIVE_SYSTEM_SCALE "SDL_MOUSE_RELATIVE_SYSTEM_SCALE"
1180
+
1181
+ /**
1182
+ * \brief A variable controlling whether a motion event should be generated for mouse warping in relative mode.
1183
+ *
1184
+ * This variable can be set to the following values:
1185
+ * "0" - Warping the mouse will not generate a motion event in relative mode
1186
+ * "1" - Warping the mouse will generate a motion event in relative mode
1187
+ *
1188
+ * By default warping the mouse will not generate motion events in relative mode. This avoids the application having to filter out large relative motion due to warping.
1189
+ */
1190
+ #define SDL_HINT_MOUSE_RELATIVE_WARP_MOTION "SDL_MOUSE_RELATIVE_WARP_MOTION"
1191
+
916
1192
  /**
917
1193
  * \brief A variable controlling whether mouse events should generate synthetic touch events
918
1194
  *
@@ -922,6 +1198,19 @@ extern "C" {
922
1198
  */
923
1199
  #define SDL_HINT_MOUSE_TOUCH_EVENTS "SDL_MOUSE_TOUCH_EVENTS"
924
1200
 
1201
+ /**
1202
+ * \brief A variable controlling whether the mouse is captured while mouse buttons are pressed
1203
+ *
1204
+ * This variable can be set to the following values:
1205
+ * "0" - The mouse is not captured while mouse buttons are pressed
1206
+ * "1" - The mouse is captured while mouse buttons are pressed
1207
+ *
1208
+ * By default the mouse is captured while mouse buttons are pressed so if the mouse is dragged
1209
+ * outside the window, the application continues to receive mouse events until the button is
1210
+ * released.
1211
+ */
1212
+ #define SDL_HINT_MOUSE_AUTO_CAPTURE "SDL_MOUSE_AUTO_CAPTURE"
1213
+
925
1214
  /**
926
1215
  * \brief Tell SDL not to catch the SIGINT or SIGTERM signals.
927
1216
  *
@@ -987,7 +1276,7 @@ extern "C" {
987
1276
  * When polling for events, SDL_PumpEvents is used to gather new events from devices.
988
1277
  * If a device keeps producing new events between calls to SDL_PumpEvents, a poll loop will
989
1278
  * become stuck until the new events stop.
990
- * This is most noticable when moving a high frequency mouse.
1279
+ * This is most noticeable when moving a high frequency mouse.
991
1280
  *
992
1281
  * By default, poll sentinels are enabled.
993
1282
  */
@@ -1105,6 +1394,8 @@ extern "C" {
1105
1394
  *
1106
1395
  * This variable is case insensitive and can be set to the following values:
1107
1396
  * "direct3d"
1397
+ * "direct3d11"
1398
+ * "direct3d12"
1108
1399
  * "opengl"
1109
1400
  * "opengles2"
1110
1401
  * "opengles"
@@ -1161,7 +1452,18 @@ extern "C" {
1161
1452
  */
1162
1453
  #define SDL_HINT_RENDER_VSYNC "SDL_RENDER_VSYNC"
1163
1454
 
1164
- /**
1455
+ /**
1456
+ * \brief A variable controlling if VSYNC is automatically disable if doesn't reach the enough FPS
1457
+ *
1458
+ * This variable can be set to the following values:
1459
+ * "0" - It will be using VSYNC as defined in the main flag. Default
1460
+ * "1" - If VSYNC was previously enabled, then it will disable VSYNC if doesn't reach enough speed
1461
+ *
1462
+ * By default SDL does not enable the automatic VSYNC
1463
+ */
1464
+ #define SDL_HINT_PS2_DYNAMIC_VSYNC "SDL_PS2_DYNAMIC_VSYNC"
1465
+
1466
+ /**
1165
1467
  * \brief A variable to control whether the return key on the soft keyboard
1166
1468
  * should hide the soft keyboard on Android and iOS.
1167
1469
  *
@@ -1278,6 +1580,18 @@ extern "C" {
1278
1580
  */
1279
1581
  #define SDL_HINT_TOUCH_MOUSE_EVENTS "SDL_TOUCH_MOUSE_EVENTS"
1280
1582
 
1583
+ /**
1584
+ * \brief A variable controlling which touchpad should generate synthetic mouse events
1585
+ *
1586
+ * This variable can be set to the following values:
1587
+ * "0" - Only front touchpad should generate mouse events. Default
1588
+ * "1" - Only back touchpad should generate mouse events.
1589
+ * "2" - Both touchpads should generate mouse events.
1590
+ *
1591
+ * By default SDL will generate mouse events for all touch devices
1592
+ */
1593
+ #define SDL_HINT_VITA_TOUCH_MOUSE_DEVICE "SDL_HINT_VITA_TOUCH_MOUSE_DEVICE"
1594
+
1281
1595
  /**
1282
1596
  * \brief A variable controlling whether the Android / tvOS remotes
1283
1597
  * should be listed as joystick devices, instead of sending keyboard events.
@@ -1362,9 +1676,7 @@ extern "C" {
1362
1676
  * SDL_WINDOW_RESIZABLE windows will offer the "fullscreen"
1363
1677
  * button on their titlebars).
1364
1678
  *
1365
- * The default value is "1". Spaces are disabled regardless of this hint if
1366
- * the OS isn't at least Mac OS X Lion (10.7). This hint must be set before
1367
- * any windows are created.
1679
+ * The default value is "1". This hint must be set before any windows are created.
1368
1680
  */
1369
1681
  #define SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES "SDL_VIDEO_MAC_FULLSCREEN_SPACES"
1370
1682
 
@@ -1387,6 +1699,52 @@ extern "C" {
1387
1699
  */
1388
1700
  #define SDL_HINT_VIDEO_WAYLAND_ALLOW_LIBDECOR "SDL_VIDEO_WAYLAND_ALLOW_LIBDECOR"
1389
1701
 
1702
+ /**
1703
+ * \brief A variable controlling whether the libdecor Wayland backend is preferred over native decrations.
1704
+ *
1705
+ * When this hint is set, libdecor will be used to provide window decorations, even if xdg-decoration is
1706
+ * available. (Note that, by default, libdecor will use xdg-decoration itself if available).
1707
+ *
1708
+ * This variable can be set to the following values:
1709
+ * "0" - libdecor is enabled only if server-side decorations are unavailable.
1710
+ * "1" - libdecor is always enabled if available.
1711
+ *
1712
+ * libdecor is used over xdg-shell when xdg-decoration protocol is unavailable.
1713
+ */
1714
+ #define SDL_HINT_VIDEO_WAYLAND_PREFER_LIBDECOR "SDL_VIDEO_WAYLAND_PREFER_LIBDECOR"
1715
+
1716
+ /**
1717
+ * \brief A variable controlling whether video mode emulation is enabled under Wayland.
1718
+ *
1719
+ * When this hint is set, a standard set of emulated CVT video modes will be exposed for use by the application.
1720
+ * If it is disabled, the only modes exposed will be the logical desktop size and, in the case of a scaled
1721
+ * desktop, the native display resolution.
1722
+ *
1723
+ * This variable can be set to the following values:
1724
+ * "0" - Video mode emulation is disabled.
1725
+ * "1" - Video mode emulation is enabled.
1726
+ *
1727
+ * By default video mode emulation is enabled.
1728
+ */
1729
+ #define SDL_HINT_VIDEO_WAYLAND_MODE_EMULATION "SDL_VIDEO_WAYLAND_MODE_EMULATION"
1730
+
1731
+ /**
1732
+ * \brief Enable or disable mouse pointer warp emulation, needed by some older games.
1733
+ *
1734
+ * When this hint is set, any SDL will emulate mouse warps using relative mouse mode.
1735
+ * This is required for some older games (such as Source engine games), which warp the
1736
+ * mouse to the centre of the screen rather than using relative mouse motion. Note that
1737
+ * relative mouse mode may have different mouse acceleration behaviour than pointer warps.
1738
+ *
1739
+ * This variable can be set to the following values:
1740
+ * "0" - All mouse warps fail, as mouse warping is not available under wayland.
1741
+ * "1" - Some mouse warps will be emulated by forcing relative mouse mode.
1742
+ *
1743
+ * If not set, this is automatically enabled unless an application uses relative mouse
1744
+ * mode directly.
1745
+ */
1746
+ #define SDL_HINT_VIDEO_WAYLAND_EMULATE_MOUSE_WARP "SDL_VIDEO_WAYLAND_EMULATE_MOUSE_WARP"
1747
+
1390
1748
  /**
1391
1749
  * \brief A variable that is the address of another SDL_Window* (as a hex string formatted with "%p").
1392
1750
  *
@@ -1406,6 +1764,28 @@ extern "C" {
1406
1764
  */
1407
1765
  #define SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT "SDL_VIDEO_WINDOW_SHARE_PIXEL_FORMAT"
1408
1766
 
1767
+ /**
1768
+ * \brief When calling SDL_CreateWindowFrom(), make the window compatible with OpenGL.
1769
+ *
1770
+ * This variable can be set to the following values:
1771
+ * "0" - Don't add any graphics flags to the SDL_WindowFlags
1772
+ * "1" - Add SDL_WINDOW_OPENGL to the SDL_WindowFlags
1773
+ *
1774
+ * By default SDL will not make the foreign window compatible with OpenGL.
1775
+ */
1776
+ #define SDL_HINT_VIDEO_FOREIGN_WINDOW_OPENGL "SDL_VIDEO_FOREIGN_WINDOW_OPENGL"
1777
+
1778
+ /**
1779
+ * \brief When calling SDL_CreateWindowFrom(), make the window compatible with Vulkan.
1780
+ *
1781
+ * This variable can be set to the following values:
1782
+ * "0" - Don't add any graphics flags to the SDL_WindowFlags
1783
+ * "1" - Add SDL_WINDOW_VULKAN to the SDL_WindowFlags
1784
+ *
1785
+ * By default SDL will not make the foreign window compatible with Vulkan.
1786
+ */
1787
+ #define SDL_HINT_VIDEO_FOREIGN_WINDOW_VULKAN "SDL_VIDEO_FOREIGN_WINDOW_VULKAN"
1788
+
1409
1789
  /**
1410
1790
  * \brief A variable specifying which shader compiler to preload when using the Chrome ANGLE binaries
1411
1791
  *
@@ -1466,13 +1846,11 @@ extern "C" {
1466
1846
  #define SDL_HINT_VIDEO_X11_WINDOW_VISUALID "SDL_VIDEO_X11_WINDOW_VISUALID"
1467
1847
 
1468
1848
  /**
1469
- * \brief A variable controlling whether the X11 Xinerama extension should be used.
1470
- *
1471
- * This variable can be set to the following values:
1472
- * "0" - Disable Xinerama
1473
- * "1" - Enable Xinerama
1849
+ * \brief A no-longer-used variable controlling whether the X11 Xinerama extension should be used.
1474
1850
  *
1475
- * By default SDL will use Xinerama if it is available.
1851
+ * Before SDL 2.0.24, this would let apps and users disable Xinerama support on X11.
1852
+ * Now SDL never uses Xinerama, and does not check for this hint at all.
1853
+ * The preprocessor define is left here for source compatibility.
1476
1854
  */
1477
1855
  #define SDL_HINT_VIDEO_X11_XINERAMA "SDL_VIDEO_X11_XINERAMA"
1478
1856
 
@@ -1483,18 +1861,16 @@ extern "C" {
1483
1861
  * "0" - Disable XRandR
1484
1862
  * "1" - Enable XRandR
1485
1863
  *
1486
- * By default SDL will not use XRandR because of window manager issues.
1864
+ * By default SDL will use XRandR.
1487
1865
  */
1488
1866
  #define SDL_HINT_VIDEO_X11_XRANDR "SDL_VIDEO_X11_XRANDR"
1489
1867
 
1490
1868
  /**
1491
- * \brief A variable controlling whether the X11 VidMode extension should be used.
1492
- *
1493
- * This variable can be set to the following values:
1494
- * "0" - Disable XVidMode
1495
- * "1" - Enable XVidMode
1869
+ * \brief A no-longer-used variable controlling whether the X11 VidMode extension should be used.
1496
1870
  *
1497
- * By default SDL will use XVidMode if it is available.
1871
+ * Before SDL 2.0.24, this would let apps and users disable XVidMode support on X11.
1872
+ * Now SDL never uses XVidMode, and does not check for this hint at all.
1873
+ * The preprocessor define is left here for source compatibility.
1498
1874
  */
1499
1875
  #define SDL_HINT_VIDEO_X11_XVIDMODE "SDL_VIDEO_X11_XVIDMODE"
1500
1876
 
@@ -1654,6 +2030,57 @@ extern "C" {
1654
2030
  */
1655
2031
  #define SDL_HINT_WINDOWS_USE_D3D9EX "SDL_WINDOWS_USE_D3D9EX"
1656
2032
 
2033
+ /**
2034
+ * \brief Controls whether SDL will declare the process to be DPI aware.
2035
+ *
2036
+ * This hint must be set before initializing the video subsystem.
2037
+ *
2038
+ * The main purpose of declaring DPI awareness is to disable OS bitmap scaling of SDL windows on monitors with
2039
+ * a DPI scale factor.
2040
+ *
2041
+ * This hint is equivalent to requesting DPI awareness via external means (e.g. calling SetProcessDpiAwarenessContext)
2042
+ * and does not cause SDL to use a virtualized coordinate system, so it will generally give you 1 SDL coordinate = 1 pixel
2043
+ * even on high-DPI displays.
2044
+ *
2045
+ * For more information, see:
2046
+ * https://docs.microsoft.com/en-us/windows/win32/hidpi/high-dpi-desktop-application-development-on-windows
2047
+ *
2048
+ * This variable can be set to the following values:
2049
+ * "" - Do not change the DPI awareness (default).
2050
+ * "unaware" - Declare the process as DPI unaware. (Windows 8.1 and later).
2051
+ * "system" - Request system DPI awareness. (Vista and later).
2052
+ * "permonitor" - Request per-monitor DPI awareness. (Windows 8.1 and later).
2053
+ * "permonitorv2" - Request per-monitor V2 DPI awareness. (Windows 10, version 1607 and later).
2054
+ * The most visible difference from "permonitor" is that window title bar will be scaled
2055
+ * to the visually correct size when dragging between monitors with different scale factors.
2056
+ * This is the preferred DPI awareness level.
2057
+ *
2058
+ * If the requested DPI awareness is not available on the currently running OS, SDL will try to request the best
2059
+ * available match.
2060
+ */
2061
+ #define SDL_HINT_WINDOWS_DPI_AWARENESS "SDL_WINDOWS_DPI_AWARENESS"
2062
+
2063
+ /**
2064
+ * \brief Uses DPI-scaled points as the SDL coordinate system on Windows.
2065
+ *
2066
+ * This changes the SDL coordinate system units to be DPI-scaled points, rather than pixels everywhere.
2067
+ * This means windows will be appropriately sized, even when created on high-DPI displays with scaling.
2068
+ *
2069
+ * e.g. requesting a 640x480 window from SDL, on a display with 125% scaling in Windows display settings,
2070
+ * will create a window with an 800x600 client area (in pixels).
2071
+ *
2072
+ * Setting this to "1" implicitly requests process DPI awareness (setting SDL_WINDOWS_DPI_AWARENESS is unnecessary),
2073
+ * and forces SDL_WINDOW_ALLOW_HIGHDPI on all windows.
2074
+ *
2075
+ * This variable can be set to the following values:
2076
+ * "0" - SDL coordinates equal Windows coordinates. No automatic window resizing when dragging
2077
+ * between monitors with different scale factors (unless this is performed by
2078
+ * Windows itself, which is the case when the process is DPI unaware).
2079
+ * "1" - SDL coordinates are in DPI-scaled points. Automatically resize windows as needed on
2080
+ * displays with non-100% scale factors.
2081
+ */
2082
+ #define SDL_HINT_WINDOWS_DPI_SCALING "SDL_WINDOWS_DPI_SCALING"
2083
+
1657
2084
  /**
1658
2085
  * \brief A variable controlling whether the window frame and title bar are interactive when the cursor is hidden
1659
2086
  *
@@ -1796,6 +2223,15 @@ extern "C" {
1796
2223
  */
1797
2224
  #define SDL_HINT_XINPUT_ENABLED "SDL_XINPUT_ENABLED"
1798
2225
 
2226
+ /**
2227
+ * \brief A variable that lets you disable the detection and use of DirectInput gamepad devices
2228
+ *
2229
+ * The variable can be set to the following values:
2230
+ * "0" - Disable DirectInput detection (only uses XInput)
2231
+ * "1" - Enable DirectInput detection (the default)
2232
+ */
2233
+ #define SDL_HINT_DIRECTINPUT_ENABLED "SDL_DIRECTINPUT_ENABLED"
2234
+
1799
2235
  /**
1800
2236
  * \brief A variable that causes SDL to use the old axis and button mapping for XInput devices.
1801
2237
  *
@@ -1824,6 +2260,133 @@ extern "C" {
1824
2260
  */
1825
2261
  #define SDL_HINT_AUDIO_INCLUDE_MONITORS "SDL_AUDIO_INCLUDE_MONITORS"
1826
2262
 
2263
+ /**
2264
+ * \brief A variable that forces X11 windows to create as a custom type.
2265
+ *
2266
+ * This is currently only used for X11 and ignored elsewhere.
2267
+ *
2268
+ * During SDL_CreateWindow, SDL uses the _NET_WM_WINDOW_TYPE X11 property
2269
+ * to report to the window manager the type of window it wants to create.
2270
+ * This might be set to various things if SDL_WINDOW_TOOLTIP or
2271
+ * SDL_WINDOW_POPUP_MENU, etc, were specified. For "normal" windows that
2272
+ * haven't set a specific type, this hint can be used to specify a custom
2273
+ * type. For example, a dock window might set this to
2274
+ * "_NET_WM_WINDOW_TYPE_DOCK".
2275
+ *
2276
+ * If not set or set to "", this hint is ignored. This hint must be set
2277
+ * before the SDL_CreateWindow() call that it is intended to affect.
2278
+ *
2279
+ * This hint is available since SDL 2.0.22.
2280
+ */
2281
+ #define SDL_HINT_X11_WINDOW_TYPE "SDL_X11_WINDOW_TYPE"
2282
+
2283
+ /**
2284
+ * \brief A variable that decides whether to send SDL_QUIT when closing the final window.
2285
+ *
2286
+ * By default, SDL sends an SDL_QUIT event when there is only one window
2287
+ * and it receives an SDL_WINDOWEVENT_CLOSE event, under the assumption most
2288
+ * apps would also take the loss of this window as a signal to terminate the
2289
+ * program.
2290
+ *
2291
+ * However, it's not unreasonable in some cases to have the program continue
2292
+ * to live on, perhaps to create new windows later.
2293
+ *
2294
+ * Changing this hint to "0" will cause SDL to not send an SDL_QUIT event
2295
+ * when the final window is requesting to close. Note that in this case,
2296
+ * there are still other legitimate reasons one might get an SDL_QUIT
2297
+ * event: choosing "Quit" from the macOS menu bar, sending a SIGINT (ctrl-c)
2298
+ * on Unix, etc.
2299
+ *
2300
+ * The default value is "1". This hint can be changed at any time.
2301
+ *
2302
+ * This hint is available since SDL 2.0.22. Before then, you always get
2303
+ * an SDL_QUIT event when closing the final window.
2304
+ */
2305
+ #define SDL_HINT_QUIT_ON_LAST_WINDOW_CLOSE "SDL_QUIT_ON_LAST_WINDOW_CLOSE"
2306
+
2307
+
2308
+ /**
2309
+ * \brief A variable that decides what video backend to use.
2310
+ *
2311
+ * By default, SDL will try all available video backends in a reasonable
2312
+ * order until it finds one that can work, but this hint allows the app
2313
+ * or user to force a specific target, such as "x11" if, say, you are
2314
+ * on Wayland but want to try talking to the X server instead.
2315
+ *
2316
+ * This functionality has existed since SDL 2.0.0 (indeed, before that)
2317
+ * but before 2.0.22 this was an environment variable only. In 2.0.22,
2318
+ * it was upgraded to a full SDL hint, so you can set the environment
2319
+ * variable as usual or programatically set the hint with SDL_SetHint,
2320
+ * which won't propagate to child processes.
2321
+ *
2322
+ * The default value is unset, in which case SDL will try to figure out
2323
+ * the best video backend on your behalf. This hint needs to be set
2324
+ * before SDL_Init() is called to be useful.
2325
+ *
2326
+ * This hint is available since SDL 2.0.22. Before then, you could set
2327
+ * the environment variable to get the same effect.
2328
+ */
2329
+ #define SDL_HINT_VIDEODRIVER "SDL_VIDEODRIVER"
2330
+
2331
+ /**
2332
+ * \brief A variable that decides what audio backend to use.
2333
+ *
2334
+ * By default, SDL will try all available audio backends in a reasonable
2335
+ * order until it finds one that can work, but this hint allows the app
2336
+ * or user to force a specific target, such as "alsa" if, say, you are
2337
+ * on PulseAudio but want to try talking to the lower level instead.
2338
+ *
2339
+ * This functionality has existed since SDL 2.0.0 (indeed, before that)
2340
+ * but before 2.0.22 this was an environment variable only. In 2.0.22,
2341
+ * it was upgraded to a full SDL hint, so you can set the environment
2342
+ * variable as usual or programatically set the hint with SDL_SetHint,
2343
+ * which won't propagate to child processes.
2344
+ *
2345
+ * The default value is unset, in which case SDL will try to figure out
2346
+ * the best audio backend on your behalf. This hint needs to be set
2347
+ * before SDL_Init() is called to be useful.
2348
+ *
2349
+ * This hint is available since SDL 2.0.22. Before then, you could set
2350
+ * the environment variable to get the same effect.
2351
+ */
2352
+ #define SDL_HINT_AUDIODRIVER "SDL_AUDIODRIVER"
2353
+
2354
+ /**
2355
+ * \brief A variable that decides what KMSDRM device to use.
2356
+ *
2357
+ * Internally, SDL might open something like "/dev/dri/cardNN" to
2358
+ * access KMSDRM functionality, where "NN" is a device index number.
2359
+ *
2360
+ * SDL makes a guess at the best index to use (usually zero), but the
2361
+ * app or user can set this hint to a number between 0 and 99 to
2362
+ * force selection.
2363
+ *
2364
+ * This hint is available since SDL 2.24.0.
2365
+ */
2366
+ #define SDL_HINT_KMSDRM_DEVICE_INDEX "SDL_KMSDRM_DEVICE_INDEX"
2367
+
2368
+
2369
+ /**
2370
+ * \brief A variable that treats trackpads as touch devices.
2371
+ *
2372
+ * On macOS (and possibly other platforms in the future), SDL will report
2373
+ * touches on a trackpad as mouse input, which is generally what users
2374
+ * expect from this device; however, these are often actually full
2375
+ * multitouch-capable touch devices, so it might be preferable to some apps
2376
+ * to treat them as such.
2377
+ *
2378
+ * Setting this hint to true will make the trackpad input report as a
2379
+ * multitouch device instead of a mouse. The default is false.
2380
+ *
2381
+ * Note that most platforms don't support this hint. As of 2.24.0, it
2382
+ * only supports MacBooks' trackpads on macOS. Others may follow later.
2383
+ *
2384
+ * This hint is checked during SDL_Init and can not be changed after.
2385
+ *
2386
+ * This hint is available since SDL 2.24.0.
2387
+ */
2388
+ #define SDL_HINT_TRACKPAD_IS_TOUCH_ONLY "SDL_TRACKPAD_IS_TOUCH_ONLY"
2389
+
1827
2390
 
1828
2391
  /**
1829
2392
  * \brief An enumeration of hint priorities
@@ -1876,6 +2439,38 @@ extern DECLSPEC SDL_bool SDLCALL SDL_SetHintWithPriority(const char *name,
1876
2439
  extern DECLSPEC SDL_bool SDLCALL SDL_SetHint(const char *name,
1877
2440
  const char *value);
1878
2441
 
2442
+ /**
2443
+ * Reset a hint to the default value.
2444
+ *
2445
+ * This will reset a hint to the value of the environment variable, or NULL if
2446
+ * the environment isn't set. Callbacks will be called normally with this
2447
+ * change.
2448
+ *
2449
+ * \param name the hint to set
2450
+ * \returns SDL_TRUE if the hint was set, SDL_FALSE otherwise.
2451
+ *
2452
+ * \since This function is available since SDL 2.24.0.
2453
+ *
2454
+ * \sa SDL_GetHint
2455
+ * \sa SDL_SetHint
2456
+ */
2457
+ extern DECLSPEC SDL_bool SDLCALL SDL_ResetHint(const char *name);
2458
+
2459
+ /**
2460
+ * Reset all hints to the default values.
2461
+ *
2462
+ * This will reset all hints to the value of the associated environment
2463
+ * variable, or NULL if the environment isn't set. Callbacks will be called
2464
+ * normally with this change.
2465
+ *
2466
+ * \since This function is available since SDL 2.26.0.
2467
+ *
2468
+ * \sa SDL_GetHint
2469
+ * \sa SDL_SetHint
2470
+ * \sa SDL_ResetHint
2471
+ */
2472
+ extern DECLSPEC void SDLCALL SDL_ResetHints(void);
2473
+
1879
2474
  /**
1880
2475
  * Get the value of a hint.
1881
2476
  *
@@ -1949,9 +2544,16 @@ extern DECLSPEC void SDLCALL SDL_DelHintCallback(const char *name,
1949
2544
  /**
1950
2545
  * Clear all hints.
1951
2546
  *
1952
- * This function is automatically called during SDL_Quit().
2547
+ * This function is automatically called during SDL_Quit(), and deletes all
2548
+ * callbacks without calling them and frees all memory associated with hints.
2549
+ * If you're calling this from application code you probably want to call
2550
+ * SDL_ResetHints() instead.
2551
+ *
2552
+ * This function will be removed from the API the next time we rev the ABI.
1953
2553
  *
1954
2554
  * \since This function is available since SDL 2.0.0.
2555
+ *
2556
+ * \sa SDL_ResetHints
1955
2557
  */
1956
2558
  extern DECLSPEC void SDLCALL SDL_ClearHints(void);
1957
2559