SDL_hints.h 117 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303
  1. /*
  2. Simple DirectMedia Layer
  3. Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
  4. This software is provided 'as-is', without any express or implied
  5. warranty. In no event will the authors be held liable for any damages
  6. arising from the use of this software.
  7. Permission is granted to anyone to use this software for any purpose,
  8. including commercial applications, and to alter it and redistribute it
  9. freely, subject to the following restrictions:
  10. 1. The origin of this software must not be misrepresented; you must not
  11. claim that you wrote the original software. If you use this software
  12. in a product, an acknowledgment in the product documentation would be
  13. appreciated but is not required.
  14. 2. Altered source versions must be plainly marked as such, and must not be
  15. misrepresented as being the original software.
  16. 3. This notice may not be removed or altered from any source distribution.
  17. */
  18. /**
  19. * # CategoryHints
  20. *
  21. * Official documentation for SDL configuration variables
  22. *
  23. * This file contains functions to set and get configuration hints, as well as
  24. * listing each of them alphabetically.
  25. *
  26. * The convention for naming hints is SDL_HINT_X, where "SDL_X" is the
  27. * environment variable that can be used to override the default.
  28. *
  29. * In general these hints are just that - they may or may not be supported or
  30. * applicable on any given platform, but they provide a way for an application
  31. * or user to give the library a hint as to how they would like the library to
  32. * work.
  33. */
  34. #ifndef SDL_hints_h_
  35. #define SDL_hints_h_
  36. #include "SDL_stdinc.h"
  37. #include "begin_code.h"
  38. /* Set up for C function definitions, even when using C++ */
  39. #ifdef __cplusplus
  40. extern "C" {
  41. #endif
  42. /**
  43. * A variable controlling whether the Android / iOS built-in accelerometer
  44. * should be listed as a joystick device.
  45. *
  46. * This variable can be set to the following values:
  47. *
  48. * - "0": The accelerometer is not listed as a joystick
  49. * - "1": The accelerometer is available as a 3 axis joystick (the default).
  50. */
  51. #define SDL_HINT_ACCELEROMETER_AS_JOYSTICK "SDL_ACCELEROMETER_AS_JOYSTICK"
  52. /**
  53. * Specify the behavior of Alt+Tab while the keyboard is grabbed.
  54. *
  55. * By default, SDL emulates Alt+Tab functionality while the keyboard is
  56. * grabbed and your window is full-screen. This prevents the user from getting
  57. * stuck in your application if you've enabled keyboard grab.
  58. *
  59. * The variable can be set to the following values:
  60. *
  61. * - "0": SDL will not handle Alt+Tab. Your application is responsible for
  62. * handling Alt+Tab while the keyboard is grabbed.
  63. * - "1": SDL will minimize your window when Alt+Tab is pressed (default)
  64. */
  65. #define SDL_HINT_ALLOW_ALT_TAB_WHILE_GRABBED "SDL_ALLOW_ALT_TAB_WHILE_GRABBED"
  66. /**
  67. * If set to "0" then never set the top most bit on a SDL Window, even if the
  68. * video mode expects it.
  69. *
  70. * This is a debugging aid for developers and not expected to be used by end
  71. * users. The default is "1"
  72. *
  73. * This variable can be set to the following values:
  74. *
  75. * - "0": don't allow topmost
  76. * - "1": allow topmost
  77. */
  78. #define SDL_HINT_ALLOW_TOPMOST "SDL_ALLOW_TOPMOST"
  79. /**
  80. * Android APK expansion main file version.
  81. *
  82. * Should be a string number like "1", "2" etc.
  83. *
  84. * Must be set together with
  85. * SDL_HINT_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION.
  86. *
  87. * If both hints were set then SDL_RWFromFile() will look into expansion files
  88. * after a given relative path was not found in the internal storage and
  89. * assets.
  90. *
  91. * By default this hint is not set and the APK expansion files are not
  92. * searched.
  93. */
  94. #define SDL_HINT_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION "SDL_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION"
  95. /**
  96. * Android APK expansion patch file version.
  97. *
  98. * Should be a string number like "1", "2" etc.
  99. *
  100. * Must be set together with SDL_HINT_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION.
  101. *
  102. * If both hints were set then SDL_RWFromFile() will look into expansion files
  103. * after a given relative path was not found in the internal storage and
  104. * assets.
  105. *
  106. * By default this hint is not set and the APK expansion files are not
  107. * searched.
  108. */
  109. #define SDL_HINT_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION "SDL_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION"
  110. /**
  111. * A variable to control whether the event loop will block itself when the app
  112. * is paused.
  113. *
  114. * The variable can be set to the following values:
  115. *
  116. * - "0": Non blocking.
  117. * - "1": Blocking. (default)
  118. *
  119. * The value should be set before SDL is initialized.
  120. */
  121. #define SDL_HINT_ANDROID_BLOCK_ON_PAUSE "SDL_ANDROID_BLOCK_ON_PAUSE"
  122. /**
  123. * A variable to control whether SDL will pause audio in background (Requires
  124. * SDL_ANDROID_BLOCK_ON_PAUSE as "Non blocking")
  125. *
  126. * The variable can be set to the following values:
  127. *
  128. * - "0": Non paused.
  129. * - "1": Paused. (default)
  130. *
  131. * The value should be set before SDL is initialized.
  132. */
  133. #define SDL_HINT_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO "SDL_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO"
  134. /**
  135. * A variable to control whether we trap the Android back button to handle it
  136. * manually.
  137. *
  138. * This is necessary for the right mouse button to work on some Android
  139. * devices, or to be able to trap the back button for use in your code
  140. * reliably. If set to true, the back button will show up as an SDL_KEYDOWN /
  141. * SDL_KEYUP pair with a keycode of SDL_SCANCODE_AC_BACK.
  142. *
  143. * The variable can be set to the following values:
  144. *
  145. * - "0": Back button will be handled as usual for system. (default)
  146. * - "1": Back button will be trapped, allowing you to handle the key press
  147. * manually. (This will also let right mouse click work on systems where the
  148. * right mouse button functions as back.)
  149. *
  150. * The value of this hint is used at runtime, so it can be changed at any
  151. * time.
  152. */
  153. #define SDL_HINT_ANDROID_TRAP_BACK_BUTTON "SDL_ANDROID_TRAP_BACK_BUTTON"
  154. /**
  155. * Specify an application name.
  156. *
  157. * This hint lets you specify the application name sent to the OS when
  158. * required. For example, this will often appear in volume control applets for
  159. * audio streams, and in lists of applications which are inhibiting the
  160. * screensaver. You should use a string that describes your program ("My Game
  161. * 2: The Revenge")
  162. *
  163. * Setting this to "" or leaving it unset will have SDL use a reasonable
  164. * default: probably the application's name or "SDL Application" if SDL
  165. * doesn't have any better information.
  166. *
  167. * Note that, for audio streams, this can be overridden with
  168. * SDL_HINT_AUDIO_DEVICE_APP_NAME.
  169. *
  170. * On targets where this is not supported, this hint does nothing.
  171. */
  172. #define SDL_HINT_APP_NAME "SDL_APP_NAME"
  173. /**
  174. * A variable controlling whether controllers used with the Apple TV generate
  175. * UI events.
  176. *
  177. * When UI events are generated by controller input, the app will be
  178. * backgrounded when the Apple TV remote's menu button is pressed, and when
  179. * the pause or B buttons on gamepads are pressed.
  180. *
  181. * More information about properly making use of controllers for the Apple TV
  182. * can be found here:
  183. * https://developer.apple.com/tvos/human-interface-guidelines/remote-and-controllers/
  184. *
  185. * This variable can be set to the following values:
  186. *
  187. * - "0": Controller input does not generate UI events (the default).
  188. * - "1": Controller input generates UI events.
  189. */
  190. #define SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS "SDL_APPLE_TV_CONTROLLER_UI_EVENTS"
  191. /**
  192. * A variable controlling whether the Apple TV remote's joystick axes will
  193. * automatically match the rotation of the remote.
  194. *
  195. * This variable can be set to the following values:
  196. *
  197. * - "0": Remote orientation does not affect joystick axes (the default).
  198. * - "1": Joystick axes are based on the orientation of the remote.
  199. */
  200. #define SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION "SDL_APPLE_TV_REMOTE_ALLOW_ROTATION"
  201. /**
  202. * A variable controlling the audio category on iOS and Mac OS X
  203. *
  204. * This variable can be set to the following values:
  205. *
  206. * - "ambient": Use the AVAudioSessionCategoryAmbient audio category, will be
  207. * muted by the phone mute switch (default)
  208. * - "playback": Use the AVAudioSessionCategoryPlayback category
  209. *
  210. * For more information, see Apple's documentation:
  211. * https://developer.apple.com/library/content/documentation/Audio/Conceptual/AudioSessionProgrammingGuide/AudioSessionCategoriesandModes/AudioSessionCategoriesandModes.html
  212. */
  213. #define SDL_HINT_AUDIO_CATEGORY "SDL_AUDIO_CATEGORY"
  214. /**
  215. * Specify an application name for an audio device.
  216. *
  217. * Some audio backends (such as PulseAudio) allow you to describe your audio
  218. * stream. Among other things, this description might show up in a system
  219. * control panel that lets the user adjust the volume on specific audio
  220. * streams instead of using one giant master volume slider.
  221. *
  222. * This hints lets you transmit that information to the OS. The contents of
  223. * this hint are used while opening an audio device. You should use a string
  224. * that describes your program ("My Game 2: The Revenge")
  225. *
  226. * Setting this to "" or leaving it unset will have SDL use a reasonable
  227. * default: this will be the name set with SDL_HINT_APP_NAME, if that hint is
  228. * set. Otherwise, it'll probably the application's name or "SDL Application"
  229. * if SDL doesn't have any better information.
  230. *
  231. * On targets where this is not supported, this hint does nothing.
  232. */
  233. #define SDL_HINT_AUDIO_DEVICE_APP_NAME "SDL_AUDIO_DEVICE_APP_NAME"
  234. /**
  235. * Specify an application name for an audio device.
  236. *
  237. * Some audio backends (such as PulseAudio) allow you to describe your audio
  238. * stream. Among other things, this description might show up in a system
  239. * control panel that lets the user adjust the volume on specific audio
  240. * streams instead of using one giant master volume slider.
  241. *
  242. * This hints lets you transmit that information to the OS. The contents of
  243. * this hint are used while opening an audio device. You should use a string
  244. * that describes your what your program is playing ("audio stream" is
  245. * probably sufficient in many cases, but this could be useful for something
  246. * like "team chat" if you have a headset playing VoIP audio separately).
  247. *
  248. * Setting this to "" or leaving it unset will have SDL use a reasonable
  249. * default: "audio stream" or something similar.
  250. *
  251. * On targets where this is not supported, this hint does nothing.
  252. */
  253. #define SDL_HINT_AUDIO_DEVICE_STREAM_NAME "SDL_AUDIO_DEVICE_STREAM_NAME"
  254. /**
  255. * Specify an application role for an audio device.
  256. *
  257. * Some audio backends (such as Pipewire) allow you to describe the role of
  258. * your audio stream. Among other things, this description might show up in a
  259. * system control panel or software for displaying and manipulating media
  260. * playback/capture graphs.
  261. *
  262. * This hints lets you transmit that information to the OS. The contents of
  263. * this hint are used while opening an audio device. You should use a string
  264. * that describes your what your program is playing (Game, Music, Movie,
  265. * etc...).
  266. *
  267. * Setting this to "" or leaving it unset will have SDL use a reasonable
  268. * default: "Game" or something similar.
  269. *
  270. * On targets where this is not supported, this hint does nothing.
  271. */
  272. #define SDL_HINT_AUDIO_DEVICE_STREAM_ROLE "SDL_AUDIO_DEVICE_STREAM_ROLE"
  273. /**
  274. * A variable controlling speed/quality tradeoff of audio resampling.
  275. *
  276. * If available, SDL can use libsamplerate ( http://www.mega-nerd.com/SRC/ )
  277. * to handle audio resampling. There are different resampling modes available
  278. * that produce different levels of quality, using more CPU.
  279. *
  280. * If this hint isn't specified to a valid setting, or libsamplerate isn't
  281. * available, SDL will use the default, internal resampling algorithm.
  282. *
  283. * As of SDL 2.26, SDL_ConvertAudio() respects this hint when libsamplerate is
  284. * available.
  285. *
  286. * This hint is currently only checked at audio subsystem initialization.
  287. *
  288. * This variable can be set to the following values:
  289. *
  290. * - "0" or "default": Use SDL's internal resampling (Default when not set -
  291. * low quality, fast)
  292. * - "1" or "fast": Use fast, slightly higher quality resampling, if available
  293. * - "2" or "medium": Use medium quality resampling, if available
  294. * - "3" or "best": Use high quality resampling, if available
  295. */
  296. #define SDL_HINT_AUDIO_RESAMPLING_MODE "SDL_AUDIO_RESAMPLING_MODE"
  297. /**
  298. * A variable controlling whether SDL updates joystick state when getting
  299. * input events
  300. *
  301. * This variable can be set to the following values:
  302. *
  303. * - "0": You'll call SDL_JoystickUpdate() manually
  304. * - "1": SDL will automatically call SDL_JoystickUpdate() (default)
  305. *
  306. * This hint can be toggled on and off at runtime.
  307. */
  308. #define SDL_HINT_AUTO_UPDATE_JOYSTICKS "SDL_AUTO_UPDATE_JOYSTICKS"
  309. /**
  310. * A variable controlling whether SDL updates sensor state when getting input
  311. * events
  312. *
  313. * This variable can be set to the following values:
  314. *
  315. * - "0": You'll call SDL_SensorUpdate() manually
  316. * - "1": SDL will automatically call SDL_SensorUpdate() (default)
  317. *
  318. * This hint can be toggled on and off at runtime.
  319. */
  320. #define SDL_HINT_AUTO_UPDATE_SENSORS "SDL_AUTO_UPDATE_SENSORS"
  321. /**
  322. * Prevent SDL from using version 4 of the bitmap header when saving BMPs.
  323. *
  324. * The bitmap header version 4 is required for proper alpha channel support
  325. * and SDL will use it when required. Should this not be desired, this hint
  326. * can force the use of the 40 byte header version which is supported
  327. * everywhere.
  328. *
  329. * The variable can be set to the following values:
  330. *
  331. * - "0": Surfaces with a colorkey or an alpha channel are saved to a 32-bit
  332. * BMP file with an alpha mask. SDL will use the bitmap header version 4 and
  333. * set the alpha mask accordingly.
  334. * - "1": Surfaces with a colorkey or an alpha channel are saved to a 32-bit
  335. * BMP file without an alpha mask. The alpha channel data will be in the
  336. * file, but applications are going to ignore it.
  337. *
  338. * The default value is "0".
  339. */
  340. #define SDL_HINT_BMP_SAVE_LEGACY_FORMAT "SDL_BMP_SAVE_LEGACY_FORMAT"
  341. /**
  342. * Override for SDL_GetDisplayUsableBounds()
  343. *
  344. * If set, this hint will override the expected results for
  345. * SDL_GetDisplayUsableBounds() for display index 0. Generally you don't want
  346. * to do this, but this allows an embedded system to request that some of the
  347. * screen be reserved for other uses when paired with a well-behaved
  348. * application.
  349. *
  350. * The contents of this hint must be 4 comma-separated integers, the first is
  351. * the bounds x, then y, width and height, in that order.
  352. */
  353. #define SDL_HINT_DISPLAY_USABLE_BOUNDS "SDL_DISPLAY_USABLE_BOUNDS"
  354. /**
  355. * Disable giving back control to the browser automatically when running with
  356. * asyncify
  357. *
  358. * With -s ASYNCIFY, SDL2 calls emscripten_sleep during operations such as
  359. * refreshing the screen or polling events.
  360. *
  361. * This hint only applies to the emscripten platform
  362. *
  363. * The variable can be set to the following values:
  364. *
  365. * - "0": Disable emscripten_sleep calls (if you give back browser control
  366. * manually or use asyncify for other purposes)
  367. * - "1": Enable emscripten_sleep calls (the default)
  368. */
  369. #define SDL_HINT_EMSCRIPTEN_ASYNCIFY "SDL_EMSCRIPTEN_ASYNCIFY"
  370. /**
  371. * override the binding element for keyboard inputs for Emscripten builds
  372. *
  373. * This hint only applies to the emscripten platform.
  374. *
  375. * The variable can be one of:
  376. *
  377. * - "#window": the javascript window object (this is the default)
  378. * - "#document": the javascript document object
  379. * - "#screen": the javascript window.screen object
  380. * - "#canvas": the WebGL canvas element
  381. *
  382. * Any other string without a leading # sign applies to the element on the
  383. * page with that ID.
  384. */
  385. #define SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT "SDL_EMSCRIPTEN_KEYBOARD_ELEMENT"
  386. /**
  387. * A variable that controls whether the on-screen keyboard should be shown
  388. * when text input is active
  389. *
  390. * The variable can be set to the following values:
  391. *
  392. * - "0": Do not show the on-screen keyboard
  393. * - "1": Show the on-screen keyboard
  394. *
  395. * The default value is "1". This hint must be set before text input is
  396. * activated.
  397. */
  398. #define SDL_HINT_ENABLE_SCREEN_KEYBOARD "SDL_ENABLE_SCREEN_KEYBOARD"
  399. /**
  400. * A variable controlling verbosity of the logging of SDL events pushed onto
  401. * the internal queue.
  402. *
  403. * This variable can be set to the following values, from least to most
  404. * verbose:
  405. *
  406. * - "0": Don't log any events (default)
  407. * - "1": Log most events (other than the really spammy ones).
  408. * - "2": Include mouse and finger motion events.
  409. * - "3": Include SDL_SysWMEvent events.
  410. *
  411. * This is generally meant to be used to debug SDL itself, but can be useful
  412. * for application developers that need better visibility into what is going
  413. * on in the event queue. Logged events are sent through SDL_Log(), which
  414. * means by default they appear on stdout on most platforms or maybe
  415. * OutputDebugString() on Windows, and can be funneled by the app with
  416. * SDL_LogSetOutputFunction(), etc.
  417. *
  418. * This hint can be toggled on and off at runtime, if you only need to log
  419. * events for a small subset of program execution.
  420. */
  421. #define SDL_HINT_EVENT_LOGGING "SDL_EVENT_LOGGING"
  422. /**
  423. * A variable controlling whether raising the window should be done more
  424. * forcefully
  425. *
  426. * This variable can be set to the following values:
  427. *
  428. * - "0": No forcing (the default)
  429. * - "1": Extra level of forcing
  430. *
  431. * At present, this is only an issue under MS Windows, which makes it nearly
  432. * impossible to programmatically move a window to the foreground, for
  433. * "security" reasons. See http://stackoverflow.com/a/34414846 for a
  434. * discussion.
  435. */
  436. #define SDL_HINT_FORCE_RAISEWINDOW "SDL_HINT_FORCE_RAISEWINDOW"
  437. /**
  438. * A variable controlling how 3D acceleration is used to accelerate the SDL
  439. * screen surface.
  440. *
  441. * SDL can try to accelerate the SDL screen surface by using streaming
  442. * textures with a 3D rendering engine. This variable controls whether and how
  443. * this is done.
  444. *
  445. * This variable can be set to the following values:
  446. *
  447. * - "0": Disable 3D acceleration
  448. * - "1": Enable 3D acceleration, using the default renderer.
  449. * - "X": Enable 3D acceleration, using X where X is one of the valid
  450. * rendering drivers. (e.g. "direct3d", "opengl", etc.)
  451. *
  452. * By default SDL tries to make a best guess for each platform whether to use
  453. * acceleration or not.
  454. */
  455. #define SDL_HINT_FRAMEBUFFER_ACCELERATION "SDL_FRAMEBUFFER_ACCELERATION"
  456. /**
  457. * A variable that lets you manually hint extra gamecontroller db entries.
  458. *
  459. * The variable should be newline delimited rows of gamecontroller config
  460. * data, see SDL_gamecontroller.h
  461. *
  462. * This hint must be set before calling SDL_Init(SDL_INIT_GAMECONTROLLER) You
  463. * can update mappings after the system is initialized with
  464. * SDL_GameControllerMappingForGUID() and SDL_GameControllerAddMapping()
  465. */
  466. #define SDL_HINT_GAMECONTROLLERCONFIG "SDL_GAMECONTROLLERCONFIG"
  467. /**
  468. * A variable that lets you provide a file with extra gamecontroller db
  469. * entries.
  470. *
  471. * The file should contain lines of gamecontroller config data, see
  472. * SDL_gamecontroller.h
  473. *
  474. * This hint must be set before calling SDL_Init(SDL_INIT_GAMECONTROLLER) You
  475. * can update mappings after the system is initialized with
  476. * SDL_GameControllerMappingForGUID() and SDL_GameControllerAddMapping()
  477. */
  478. #define SDL_HINT_GAMECONTROLLERCONFIG_FILE "SDL_GAMECONTROLLERCONFIG_FILE"
  479. /**
  480. * A variable that overrides the automatic controller type detection
  481. *
  482. * The variable should be comma separated entries, in the form: VID/PID=type
  483. *
  484. * The VID and PID should be hexadecimal with exactly 4 digits, e.g. 0x00fd
  485. *
  486. * The type should be one of: Xbox360 XboxOne PS3 PS4 PS5 SwitchPro
  487. *
  488. * This hint affects what driver is used, and must be set before calling
  489. * SDL_Init(SDL_INIT_GAMECONTROLLER)
  490. */
  491. #define SDL_HINT_GAMECONTROLLERTYPE "SDL_GAMECONTROLLERTYPE"
  492. /**
  493. * A variable containing a list of devices to skip when scanning for game
  494. * controllers.
  495. *
  496. * The format of the string is a comma separated list of USB VID/PID pairs in
  497. * hexadecimal form, e.g.
  498. *
  499. * 0xAAAA/0xBBBB,0xCCCC/0xDDDD
  500. *
  501. * The variable can also take the form of @file, in which case the named file
  502. * will be loaded and interpreted as the value of the variable.
  503. */
  504. #define SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES "SDL_GAMECONTROLLER_IGNORE_DEVICES"
  505. /**
  506. * If set, all devices will be skipped when scanning for game controllers
  507. * except for the ones listed in this variable.
  508. *
  509. * The format of the string is a comma separated list of USB VID/PID pairs in
  510. * hexadecimal form, e.g.
  511. *
  512. * 0xAAAA/0xBBBB,0xCCCC/0xDDDD
  513. *
  514. * The variable can also take the form of @file, in which case the named file
  515. * will be loaded and interpreted as the value of the variable.
  516. */
  517. #define SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT "SDL_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT"
  518. /**
  519. * If set, game controller face buttons report their values according to their
  520. * labels instead of their positional layout.
  521. *
  522. * For example, on Nintendo Switch controllers, normally you'd get:
  523. *
  524. * ```
  525. * (Y)
  526. * (X) (B)
  527. * (A)
  528. * ```
  529. *
  530. * but if this hint is set, you'll get:
  531. *
  532. * ```
  533. * (X)
  534. * (Y) (A)
  535. * (B)
  536. * ```
  537. *
  538. * The variable can be set to the following values:
  539. *
  540. * - "0": Report the face buttons by position, as though they were on an Xbox
  541. * controller.
  542. * - "1": Report the face buttons by label instead of position
  543. *
  544. * The default value is "1". This hint may be set at any time.
  545. */
  546. #define SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS "SDL_GAMECONTROLLER_USE_BUTTON_LABELS"
  547. /**
  548. * A variable controlling whether grabbing input grabs the keyboard
  549. *
  550. * This variable can be set to the following values:
  551. *
  552. * - "0": Grab will affect only the mouse
  553. * - "1": Grab will affect mouse and keyboard
  554. *
  555. * By default SDL will not grab the keyboard so system shortcuts still work.
  556. */
  557. #define SDL_HINT_GRAB_KEYBOARD "SDL_GRAB_KEYBOARD"
  558. /**
  559. * A variable containing a list of devices to ignore in SDL_hid_enumerate()
  560. *
  561. * For example, to ignore the Shanwan DS3 controller and any Valve controller,
  562. * you might have the string "0x2563/0x0523,0x28de/0x0000"
  563. */
  564. #define SDL_HINT_HIDAPI_IGNORE_DEVICES "SDL_HIDAPI_IGNORE_DEVICES"
  565. /**
  566. * A variable controlling whether the idle timer is disabled on iOS.
  567. *
  568. * When an iOS app does not receive touches for some time, the screen is
  569. * dimmed automatically. For games where the accelerometer is the only input
  570. * this is problematic. This functionality can be disabled by setting this
  571. * hint.
  572. *
  573. * As of SDL 2.0.4, SDL_EnableScreenSaver() and SDL_DisableScreenSaver()
  574. * accomplish the same thing on iOS. They should be preferred over this hint.
  575. *
  576. * This variable can be set to the following values:
  577. *
  578. * - "0": Enable idle timer
  579. * - "1": Disable idle timer
  580. */
  581. #define SDL_HINT_IDLE_TIMER_DISABLED "SDL_IOS_IDLE_TIMER_DISABLED"
  582. /**
  583. * A variable to control whether certain IMEs should handle text editing
  584. * internally instead of sending SDL_TEXTEDITING events.
  585. *
  586. * The variable can be set to the following values:
  587. *
  588. * - "0": SDL_TEXTEDITING events are sent, and it is the application's
  589. * responsibility to render the text from these events and differentiate it
  590. * somehow from committed text. (default)
  591. * - "1": If supported by the IME then SDL_TEXTEDITING events are not sent,
  592. * and text that is being composed will be rendered in its own UI.
  593. */
  594. #define SDL_HINT_IME_INTERNAL_EDITING "SDL_IME_INTERNAL_EDITING"
  595. /**
  596. * A variable to control whether certain IMEs should show native UI components
  597. * (such as the Candidate List) instead of suppressing them.
  598. *
  599. * The variable can be set to the following values:
  600. *
  601. * - "0": Native UI components are not display. (default)
  602. * - "1": Native UI components are displayed.
  603. */
  604. #define SDL_HINT_IME_SHOW_UI "SDL_IME_SHOW_UI"
  605. /**
  606. * A variable to control if extended IME text support is enabled.
  607. *
  608. * If enabled then SDL_TextEditingExtEvent will be issued if the text would be
  609. * truncated otherwise. Additionally SDL_TextInputEvent will be dispatched
  610. * multiple times so that it is not truncated.
  611. *
  612. * The variable can be set to the following values:
  613. *
  614. * - "0": Legacy behavior. Text can be truncated, no heap allocations.
  615. * (default)
  616. * - "1": Modern behavior.
  617. */
  618. #define SDL_HINT_IME_SUPPORT_EXTENDED_TEXT "SDL_IME_SUPPORT_EXTENDED_TEXT"
  619. /**
  620. * A variable controlling whether the home indicator bar on iPhone X should be
  621. * hidden.
  622. *
  623. * This variable can be set to the following values:
  624. *
  625. * - "0": The indicator bar is not hidden (default for windowed applications)
  626. * - "1": The indicator bar is hidden and is shown when the screen is touched
  627. * (useful for movie playback applications)
  628. * - "2": The indicator bar is dim and the first swipe makes it visible and
  629. * the second swipe performs the "home" action (default for fullscreen
  630. * applications)
  631. */
  632. #define SDL_HINT_IOS_HIDE_HOME_INDICATOR "SDL_IOS_HIDE_HOME_INDICATOR"
  633. /**
  634. * A variable that lets you enable joystick (and gamecontroller) events even
  635. * when your app is in the background.
  636. *
  637. * The variable can be set to the following values:
  638. *
  639. * - "0": Disable joystick & gamecontroller input events when the application
  640. * is in the background.
  641. * - "1": Enable joystick & gamecontroller input events when the application
  642. * is in the background.
  643. *
  644. * The default value is "0". This hint may be set at any time.
  645. */
  646. #define SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS "SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS"
  647. /**
  648. * A variable containing a list of arcade stick style controllers.
  649. *
  650. * The format of the string is a comma separated list of USB VID/PID pairs in
  651. * hexadecimal form, e.g.
  652. *
  653. * 0xAAAA/0xBBBB,0xCCCC/0xDDDD
  654. *
  655. * The variable can also take the form of @file, in which case the named file
  656. * will be loaded and interpreted as the value of the variable.
  657. */
  658. #define SDL_HINT_JOYSTICK_ARCADESTICK_DEVICES "SDL_JOYSTICK_ARCADESTICK_DEVICES"
  659. /**
  660. * A variable containing a list of devices that are not arcade stick style
  661. * controllers.
  662. *
  663. * This will override SDL_HINT_JOYSTICK_ARCADESTICK_DEVICES and the built in
  664. * device list.
  665. *
  666. * The format of the string is a comma separated list of USB VID/PID pairs in
  667. * hexadecimal form, e.g.
  668. *
  669. * 0xAAAA/0xBBBB,0xCCCC/0xDDDD
  670. *
  671. * The variable can also take the form of @file, in which case the named file
  672. * will be loaded and interpreted as the value of the variable.
  673. */
  674. #define SDL_HINT_JOYSTICK_ARCADESTICK_DEVICES_EXCLUDED "SDL_JOYSTICK_ARCADESTICK_DEVICES_EXCLUDED"
  675. /**
  676. * A variable containing a list of devices that should not be considerd
  677. * joysticks.
  678. *
  679. * The format of the string is a comma separated list of USB VID/PID pairs in
  680. * hexadecimal form, e.g.
  681. *
  682. * 0xAAAA/0xBBBB,0xCCCC/0xDDDD
  683. *
  684. * The variable can also take the form of @file, in which case the named file
  685. * will be loaded and interpreted as the value of the variable.
  686. */
  687. #define SDL_HINT_JOYSTICK_BLACKLIST_DEVICES "SDL_JOYSTICK_BLACKLIST_DEVICES"
  688. /**
  689. * A variable containing a list of devices that should be considered
  690. * joysticks.
  691. *
  692. * This will override SDL_HINT_JOYSTICK_BLACKLIST_DEVICES and the built in
  693. * device list.
  694. *
  695. * The format of the string is a comma separated list of USB VID/PID pairs in
  696. * hexadecimal form, e.g.
  697. *
  698. * 0xAAAA/0xBBBB,0xCCCC/0xDDDD
  699. *
  700. * The variable can also take the form of @file, in which case the named file
  701. * will be loaded and interpreted as the value of the variable.
  702. */
  703. #define SDL_HINT_JOYSTICK_BLACKLIST_DEVICES_EXCLUDED "SDL_JOYSTICK_BLACKLIST_DEVICES_EXCLUDED"
  704. /**
  705. * A variable containing a list of flightstick style controllers.
  706. *
  707. * The format of the string is a comma separated list of USB VID/PID pairs in
  708. * hexadecimal form, e.g.
  709. *
  710. * 0xAAAA/0xBBBB,0xCCCC/0xDDDD
  711. *
  712. * The variable can also take the form of @file, in which case the named file
  713. * will be loaded and interpreted as the value of the variable.
  714. */
  715. #define SDL_HINT_JOYSTICK_FLIGHTSTICK_DEVICES "SDL_JOYSTICK_FLIGHTSTICK_DEVICES"
  716. /**
  717. * A variable containing a list of devices that are not flightstick style
  718. * controllers.
  719. *
  720. * This will override SDL_HINT_JOYSTICK_FLIGHTSTICK_DEVICES and the built in
  721. * device list.
  722. *
  723. * The format of the string is a comma separated list of USB VID/PID pairs in
  724. * hexadecimal form, e.g.
  725. *
  726. * 0xAAAA/0xBBBB,0xCCCC/0xDDDD
  727. *
  728. * The variable can also take the form of @file, in which case the named file
  729. * will be loaded and interpreted as the value of the variable.
  730. */
  731. #define SDL_HINT_JOYSTICK_FLIGHTSTICK_DEVICES_EXCLUDED "SDL_JOYSTICK_FLIGHTSTICK_DEVICES_EXCLUDED"
  732. /**
  733. * A variable containing a list of devices known to have a GameCube form
  734. * factor.
  735. *
  736. * The format of the string is a comma separated list of USB VID/PID pairs in
  737. * hexadecimal form, e.g.
  738. *
  739. * 0xAAAA/0xBBBB,0xCCCC/0xDDDD
  740. *
  741. * The variable can also take the form of @file, in which case the named file
  742. * will be loaded and interpreted as the value of the variable.
  743. */
  744. #define SDL_HINT_JOYSTICK_GAMECUBE_DEVICES "SDL_JOYSTICK_GAMECUBE_DEVICES"
  745. /**
  746. * A variable containing a list of devices known not to have a GameCube form
  747. * factor.
  748. *
  749. * This will override SDL_HINT_JOYSTICK_GAMECUBE_DEVICES and the built in
  750. * device list.
  751. *
  752. * The format of the string is a comma separated list of USB VID/PID pairs in
  753. * hexadecimal form, e.g.
  754. *
  755. * 0xAAAA/0xBBBB,0xCCCC/0xDDDD
  756. *
  757. * The variable can also take the form of @file, in which case the named file
  758. * will be loaded and interpreted as the value of the variable.
  759. */
  760. #define SDL_HINT_JOYSTICK_GAMECUBE_DEVICES_EXCLUDED "SDL_JOYSTICK_GAMECUBE_DEVICES_EXCLUDED"
  761. /**
  762. * A variable controlling whether the HIDAPI joystick drivers should be used.
  763. *
  764. * This variable can be set to the following values:
  765. *
  766. * - "0": HIDAPI drivers are not used
  767. * - "1": HIDAPI drivers are used (the default)
  768. *
  769. * This variable is the default for all drivers, but can be overridden by the
  770. * hints for specific drivers below.
  771. */
  772. #define SDL_HINT_JOYSTICK_HIDAPI "SDL_JOYSTICK_HIDAPI"
  773. /**
  774. * A variable controlling whether the HIDAPI driver for Nintendo GameCube
  775. * controllers should be used.
  776. *
  777. * This variable can be set to the following values:
  778. *
  779. * - "0": HIDAPI driver is not used
  780. * - "1": HIDAPI driver is used
  781. *
  782. * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
  783. */
  784. #define SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE "SDL_JOYSTICK_HIDAPI_GAMECUBE"
  785. /**
  786. * A variable controlling whether "low_frequency_rumble" and
  787. * "high_frequency_rumble" is used to implement the GameCube controller's 3
  788. * rumble modes, Stop(0), Rumble(1), and StopHard(2) this is useful for
  789. * applications that need full compatibility for things like ADSR envelopes.
  790. *
  791. * Stop is implemented by setting "low_frequency_rumble" to "0" and
  792. * "high_frequency_rumble" ">0" Rumble is both at any arbitrary value,
  793. * StopHard is implemented by setting both "low_frequency_rumble" and
  794. * "high_frequency_rumble" to "0"
  795. *
  796. * This variable can be set to the following values:
  797. *
  798. * - "0": Normal rumble behavior is behavior is used (default)
  799. * - "1": Proper GameCube controller rumble behavior is used
  800. */
  801. #define SDL_HINT_JOYSTICK_GAMECUBE_RUMBLE_BRAKE "SDL_JOYSTICK_GAMECUBE_RUMBLE_BRAKE"
  802. /**
  803. * A variable controlling whether the HIDAPI driver for Nintendo Switch
  804. * Joy-Cons should be used.
  805. *
  806. * This variable can be set to the following values:
  807. *
  808. * - "0": HIDAPI driver is not used
  809. * - "1": HIDAPI driver is used
  810. *
  811. * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
  812. */
  813. #define SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS "SDL_JOYSTICK_HIDAPI_JOY_CONS"
  814. /**
  815. * A variable controlling whether Nintendo Switch Joy-Con controllers will be
  816. * combined into a single Pro-like controller when using the HIDAPI driver
  817. *
  818. * This variable can be set to the following values:
  819. *
  820. * - "0": Left and right Joy-Con controllers will not be combined and each
  821. * will be a mini-gamepad
  822. * - "1": Left and right Joy-Con controllers will be combined into a single
  823. * controller (the default)
  824. */
  825. #define SDL_HINT_JOYSTICK_HIDAPI_COMBINE_JOY_CONS "SDL_JOYSTICK_HIDAPI_COMBINE_JOY_CONS"
  826. /**
  827. * A variable controlling whether Nintendo Switch Joy-Con controllers will be
  828. * in vertical mode when using the HIDAPI driver
  829. *
  830. * This variable can be set to the following values:
  831. *
  832. * - "0": Left and right Joy-Con controllers will not be in vertical mode (the
  833. * default)
  834. * - "1": Left and right Joy-Con controllers will be in vertical mode
  835. *
  836. * This hint must be set before calling SDL_Init(SDL_INIT_GAMECONTROLLER)
  837. */
  838. #define SDL_HINT_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS "SDL_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS"
  839. /**
  840. * A variable controlling whether the HIDAPI driver for Amazon Luna
  841. * controllers connected via Bluetooth should be used.
  842. *
  843. * This variable can be set to the following values:
  844. *
  845. * - "0": HIDAPI driver is not used
  846. * - "1": HIDAPI driver is used
  847. *
  848. * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
  849. */
  850. #define SDL_HINT_JOYSTICK_HIDAPI_LUNA "SDL_JOYSTICK_HIDAPI_LUNA"
  851. /**
  852. * A variable controlling whether the HIDAPI driver for Nintendo Online
  853. * classic controllers should be used.
  854. *
  855. * This variable can be set to the following values:
  856. *
  857. * - "0": HIDAPI driver is not used
  858. * - "1": HIDAPI driver is used
  859. *
  860. * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
  861. */
  862. #define SDL_HINT_JOYSTICK_HIDAPI_NINTENDO_CLASSIC "SDL_JOYSTICK_HIDAPI_NINTENDO_CLASSIC"
  863. /**
  864. * A variable controlling whether the HIDAPI driver for NVIDIA SHIELD
  865. * controllers should be used.
  866. *
  867. * This variable can be set to the following values:
  868. *
  869. * - "0": HIDAPI driver is not used
  870. * - "1": HIDAPI driver is used
  871. *
  872. * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
  873. */
  874. #define SDL_HINT_JOYSTICK_HIDAPI_SHIELD "SDL_JOYSTICK_HIDAPI_SHIELD"
  875. /**
  876. * A variable controlling whether the HIDAPI driver for PS3 controllers should
  877. * be used.
  878. *
  879. * This variable can be set to the following values:
  880. *
  881. * - "0": HIDAPI driver is not used
  882. * - "1": HIDAPI driver is used
  883. *
  884. * The default is the value of SDL_HINT_JOYSTICK_HIDAPI on macOS, and "0" on
  885. * other platforms.
  886. *
  887. * It is not possible to use this driver on Windows, due to limitations in the
  888. * default drivers installed. See https://github.com/ViGEm/DsHidMini for an
  889. * alternative driver on Windows.
  890. */
  891. #define SDL_HINT_JOYSTICK_HIDAPI_PS3 "SDL_JOYSTICK_HIDAPI_PS3"
  892. /**
  893. * A variable controlling whether the HIDAPI driver for PS4 controllers should
  894. * be used.
  895. *
  896. * This variable can be set to the following values:
  897. *
  898. * - "0": HIDAPI driver is not used
  899. * - "1": HIDAPI driver is used
  900. *
  901. * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
  902. */
  903. #define SDL_HINT_JOYSTICK_HIDAPI_PS4 "SDL_JOYSTICK_HIDAPI_PS4"
  904. /**
  905. * A variable controlling whether extended input reports should be used for
  906. * PS4 controllers when using the HIDAPI driver.
  907. *
  908. * This variable can be set to the following values:
  909. *
  910. * - "0": extended reports are not enabled (the default)
  911. * - "1": extended reports
  912. *
  913. * Extended input reports allow rumble on Bluetooth PS4 controllers, but break
  914. * DirectInput handling for applications that don't use SDL.
  915. *
  916. * Once extended reports are enabled, they can not be disabled without power
  917. * cycling the controller.
  918. *
  919. * For compatibility with applications written for versions of SDL prior to
  920. * the introduction of PS5 controller support, this value will also control
  921. * the state of extended reports on PS5 controllers when the
  922. * SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE hint is not explicitly set.
  923. */
  924. #define SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE "SDL_JOYSTICK_HIDAPI_PS4_RUMBLE"
  925. /**
  926. * A variable controlling whether the HIDAPI driver for PS5 controllers should
  927. * be used.
  928. *
  929. * This variable can be set to the following values:
  930. *
  931. * - "0": HIDAPI driver is not used
  932. * - "1": HIDAPI driver is used
  933. *
  934. * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
  935. */
  936. #define SDL_HINT_JOYSTICK_HIDAPI_PS5 "SDL_JOYSTICK_HIDAPI_PS5"
  937. /**
  938. * A variable controlling whether the player LEDs should be lit to indicate
  939. * which player is associated with a PS5 controller.
  940. *
  941. * This variable can be set to the following values:
  942. *
  943. * - "0": player LEDs are not enabled
  944. * - "1": player LEDs are enabled (the default)
  945. */
  946. #define SDL_HINT_JOYSTICK_HIDAPI_PS5_PLAYER_LED "SDL_JOYSTICK_HIDAPI_PS5_PLAYER_LED"
  947. /**
  948. * A variable controlling whether extended input reports should be used for
  949. * PS5 controllers when using the HIDAPI driver.
  950. *
  951. * This variable can be set to the following values:
  952. *
  953. * - "0": extended reports are not enabled (the default)
  954. * - "1": extended reports
  955. *
  956. * Extended input reports allow rumble on Bluetooth PS5 controllers, but break
  957. * DirectInput handling for applications that don't use SDL.
  958. *
  959. * Once extended reports are enabled, they can not be disabled without power
  960. * cycling the controller.
  961. *
  962. * For compatibility with applications written for versions of SDL prior to
  963. * the introduction of PS5 controller support, this value defaults to the
  964. * value of SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE.
  965. */
  966. #define SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE "SDL_JOYSTICK_HIDAPI_PS5_RUMBLE"
  967. /**
  968. * A variable controlling whether the HIDAPI driver for Google Stadia
  969. * controllers should be used.
  970. *
  971. * This variable can be set to the following values:
  972. *
  973. * - "0": HIDAPI driver is not used
  974. * - "1": HIDAPI driver is used
  975. *
  976. * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
  977. */
  978. #define SDL_HINT_JOYSTICK_HIDAPI_STADIA "SDL_JOYSTICK_HIDAPI_STADIA"
  979. /**
  980. * A variable controlling whether the HIDAPI driver for Bluetooth Steam
  981. * Controllers should be used.
  982. *
  983. * This variable can be set to the following values:
  984. *
  985. * - "0": HIDAPI driver is not used
  986. * - "1": HIDAPI driver is used for Steam Controllers, which requires
  987. * Bluetooth access and may prompt the user for permission on iOS and
  988. * Android.
  989. *
  990. * The default is "0"
  991. */
  992. #define SDL_HINT_JOYSTICK_HIDAPI_STEAM "SDL_JOYSTICK_HIDAPI_STEAM"
  993. /**
  994. * A variable controlling whether the HIDAPI driver for the Steam Deck builtin
  995. * controller should be used.
  996. *
  997. * This variable can be set to the following values:
  998. *
  999. * - "0": HIDAPI driver is not used
  1000. * - "1": HIDAPI driver is used
  1001. *
  1002. * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
  1003. */
  1004. #define SDL_HINT_JOYSTICK_HIDAPI_STEAMDECK "SDL_JOYSTICK_HIDAPI_STEAMDECK"
  1005. /**
  1006. * A variable controlling whether the HIDAPI driver for Nintendo Switch
  1007. * controllers should be used.
  1008. *
  1009. * This variable can be set to the following values:
  1010. *
  1011. * - "0": HIDAPI driver is not used
  1012. * - "1": HIDAPI driver is used
  1013. *
  1014. * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
  1015. */
  1016. #define SDL_HINT_JOYSTICK_HIDAPI_SWITCH "SDL_JOYSTICK_HIDAPI_SWITCH"
  1017. /**
  1018. * A variable controlling whether the Home button LED should be turned on when
  1019. * a Nintendo Switch Pro controller is opened
  1020. *
  1021. * This variable can be set to the following values:
  1022. *
  1023. * - "0": home button LED is turned off
  1024. * - "1": home button LED is turned on
  1025. *
  1026. * By default the Home button LED state is not changed. This hint can also be
  1027. * set to a floating point value between 0.0 and 1.0 which controls the
  1028. * brightness of the Home button LED.
  1029. */
  1030. #define SDL_HINT_JOYSTICK_HIDAPI_SWITCH_HOME_LED "SDL_JOYSTICK_HIDAPI_SWITCH_HOME_LED"
  1031. /**
  1032. * A variable controlling whether the Home button LED should be turned on when
  1033. * a Nintendo Switch Joy-Con controller is opened
  1034. *
  1035. * This variable can be set to the following values:
  1036. *
  1037. * - "0": home button LED is turned off
  1038. * - "1": home button LED is turned on
  1039. *
  1040. * By default the Home button LED state is not changed. This hint can also be
  1041. * set to a floating point value between 0.0 and 1.0 which controls the
  1042. * brightness of the Home button LED.
  1043. */
  1044. #define SDL_HINT_JOYSTICK_HIDAPI_JOYCON_HOME_LED "SDL_JOYSTICK_HIDAPI_JOYCON_HOME_LED"
  1045. /**
  1046. * A variable controlling whether the player LEDs should be lit to indicate
  1047. * which player is associated with a Nintendo Switch controller.
  1048. *
  1049. * This variable can be set to the following values:
  1050. *
  1051. * - "0": player LEDs are not enabled
  1052. * - "1": player LEDs are enabled (the default)
  1053. */
  1054. #define SDL_HINT_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED "SDL_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED"
  1055. /**
  1056. * A variable controlling whether the HIDAPI driver for Nintendo Wii and Wii U
  1057. * controllers should be used.
  1058. *
  1059. * This variable can be set to the following values:
  1060. *
  1061. * - "0": HIDAPI driver is not used
  1062. * - "1": HIDAPI driver is used
  1063. *
  1064. * This driver doesn't work with the dolphinbar, so the default is SDL_FALSE
  1065. * for now.
  1066. */
  1067. #define SDL_HINT_JOYSTICK_HIDAPI_WII "SDL_JOYSTICK_HIDAPI_WII"
  1068. /**
  1069. * A variable controlling whether the player LEDs should be lit to indicate
  1070. * which player is associated with a Wii controller.
  1071. *
  1072. * This variable can be set to the following values:
  1073. *
  1074. * - "0": player LEDs are not enabled
  1075. * - "1": player LEDs are enabled (the default)
  1076. */
  1077. #define SDL_HINT_JOYSTICK_HIDAPI_WII_PLAYER_LED "SDL_JOYSTICK_HIDAPI_WII_PLAYER_LED"
  1078. /**
  1079. * A variable controlling whether the HIDAPI driver for XBox controllers
  1080. * should be used.
  1081. *
  1082. * This variable can be set to the following values:
  1083. *
  1084. * - "0": HIDAPI driver is not used
  1085. * - "1": HIDAPI driver is used
  1086. *
  1087. * The default is "0" on Windows, otherwise the value of
  1088. * SDL_HINT_JOYSTICK_HIDAPI
  1089. */
  1090. #define SDL_HINT_JOYSTICK_HIDAPI_XBOX "SDL_JOYSTICK_HIDAPI_XBOX"
  1091. /**
  1092. * A variable controlling whether the HIDAPI driver for XBox 360 controllers
  1093. * should be used.
  1094. *
  1095. * This variable can be set to the following values:
  1096. *
  1097. * - "0": HIDAPI driver is not used
  1098. * - "1": HIDAPI driver is used
  1099. *
  1100. * The default is the value of SDL_HINT_JOYSTICK_HIDAPI_XBOX
  1101. */
  1102. #define SDL_HINT_JOYSTICK_HIDAPI_XBOX_360 "SDL_JOYSTICK_HIDAPI_XBOX_360"
  1103. /**
  1104. * A variable controlling whether the player LEDs should be lit to indicate
  1105. * which player is associated with an Xbox 360 controller.
  1106. *
  1107. * This variable can be set to the following values:
  1108. *
  1109. * - "0": player LEDs are not enabled
  1110. * - "1": player LEDs are enabled (the default)
  1111. */
  1112. #define SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED "SDL_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED"
  1113. /**
  1114. * A variable controlling whether the HIDAPI driver for XBox 360 wireless
  1115. * controllers should be used.
  1116. *
  1117. * This variable can be set to the following values:
  1118. *
  1119. * - "0": HIDAPI driver is not used
  1120. * - "1": HIDAPI driver is used
  1121. *
  1122. * The default is the value of SDL_HINT_JOYSTICK_HIDAPI_XBOX_360
  1123. */
  1124. #define SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_WIRELESS "SDL_JOYSTICK_HIDAPI_XBOX_360_WIRELESS"
  1125. /**
  1126. * A variable controlling whether the HIDAPI driver for XBox One controllers
  1127. * should be used.
  1128. *
  1129. * This variable can be set to the following values:
  1130. *
  1131. * - "0": HIDAPI driver is not used
  1132. * - "1": HIDAPI driver is used
  1133. *
  1134. * The default is the value of SDL_HINT_JOYSTICK_HIDAPI_XBOX
  1135. */
  1136. #define SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE "SDL_JOYSTICK_HIDAPI_XBOX_ONE"
  1137. /**
  1138. * A variable controlling whether the Home button LED should be turned on when
  1139. * an Xbox One controller is opened
  1140. *
  1141. * This variable can be set to the following values:
  1142. *
  1143. * - "0": home button LED is turned off
  1144. * - "1": home button LED is turned on
  1145. *
  1146. * By default the Home button LED state is not changed. This hint can also be
  1147. * set to a floating point value between 0.0 and 1.0 which controls the
  1148. * brightness of the Home button LED. The default brightness is 0.4.
  1149. */
  1150. #define SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED "SDL_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED"
  1151. /**
  1152. * A variable controlling whether IOKit should be used for controller
  1153. * handling.
  1154. *
  1155. * This variable can be set to the following values:
  1156. *
  1157. * - "0": IOKit is not used
  1158. * - "1": IOKit is used (the default)
  1159. */
  1160. #define SDL_HINT_JOYSTICK_IOKIT "SDL_JOYSTICK_IOKIT"
  1161. /**
  1162. * A variable controlling whether GCController should be used for controller
  1163. * handling.
  1164. *
  1165. * This variable can be set to the following values:
  1166. *
  1167. * - "0": GCController is not used
  1168. * - "1": GCController is used (the default)
  1169. */
  1170. #define SDL_HINT_JOYSTICK_MFI "SDL_JOYSTICK_MFI"
  1171. /**
  1172. * A variable controlling whether the RAWINPUT joystick drivers should be used
  1173. * for better handling XInput-capable devices.
  1174. *
  1175. * This variable can be set to the following values:
  1176. *
  1177. * - "0": RAWINPUT drivers are not used
  1178. * - "1": RAWINPUT drivers are used (the default)
  1179. */
  1180. #define SDL_HINT_JOYSTICK_RAWINPUT "SDL_JOYSTICK_RAWINPUT"
  1181. /**
  1182. * A variable controlling whether the RAWINPUT driver should pull correlated
  1183. * data from XInput.
  1184. *
  1185. * This variable can be set to the following values:
  1186. *
  1187. * - "0": RAWINPUT driver will only use data from raw input APIs
  1188. * - "1": RAWINPUT driver will also pull data from XInput, providing better
  1189. * trigger axes, guide button presses, and rumble support for Xbox
  1190. * controllers
  1191. *
  1192. * The default is "1". This hint applies to any joysticks opened after setting
  1193. * the hint.
  1194. */
  1195. #define SDL_HINT_JOYSTICK_RAWINPUT_CORRELATE_XINPUT "SDL_JOYSTICK_RAWINPUT_CORRELATE_XINPUT"
  1196. /**
  1197. * A variable controlling whether the ROG Chakram mice should show up as
  1198. * joysticks
  1199. *
  1200. * This variable can be set to the following values:
  1201. *
  1202. * - "0": ROG Chakram mice do not show up as joysticks (the default)
  1203. * - "1": ROG Chakram mice show up as joysticks
  1204. */
  1205. #define SDL_HINT_JOYSTICK_ROG_CHAKRAM "SDL_JOYSTICK_ROG_CHAKRAM"
  1206. /**
  1207. * A variable controlling whether a separate thread should be used for
  1208. * handling joystick detection and raw input messages on Windows
  1209. *
  1210. * This variable can be set to the following values:
  1211. *
  1212. * - "0": A separate thread is not used (the default)
  1213. * - "1": A separate thread is used for handling raw input messages
  1214. */
  1215. #define SDL_HINT_JOYSTICK_THREAD "SDL_JOYSTICK_THREAD"
  1216. /**
  1217. * A variable containing a list of throttle style controllers.
  1218. *
  1219. * The format of the string is a comma separated list of USB VID/PID pairs in
  1220. * hexadecimal form, e.g.
  1221. *
  1222. * 0xAAAA/0xBBBB,0xCCCC/0xDDDD
  1223. *
  1224. * The variable can also take the form of @file, in which case the named file
  1225. * will be loaded and interpreted as the value of the variable.
  1226. */
  1227. #define SDL_HINT_JOYSTICK_THROTTLE_DEVICES "SDL_JOYSTICK_THROTTLE_DEVICES"
  1228. /**
  1229. * A variable containing a list of devices that are not throttle style
  1230. * controllers.
  1231. *
  1232. * This will override SDL_HINT_JOYSTICK_THROTTLE_DEVICES and the built in
  1233. * device list.
  1234. *
  1235. * The format of the string is a comma separated list of USB VID/PID pairs in
  1236. * hexadecimal form, e.g.
  1237. *
  1238. * 0xAAAA/0xBBBB,0xCCCC/0xDDDD
  1239. *
  1240. * The variable can also take the form of @file, in which case the named file
  1241. * will be loaded and interpreted as the value of the variable.
  1242. */
  1243. #define SDL_HINT_JOYSTICK_THROTTLE_DEVICES_EXCLUDED "SDL_JOYSTICK_THROTTLE_DEVICES_EXCLUDED"
  1244. /**
  1245. * A variable controlling whether Windows.Gaming.Input should be used for
  1246. * controller handling.
  1247. *
  1248. * This variable can be set to the following values:
  1249. *
  1250. * - "0": WGI is not used
  1251. * - "1": WGI is used (the default)
  1252. */
  1253. #define SDL_HINT_JOYSTICK_WGI "SDL_JOYSTICK_WGI"
  1254. /**
  1255. * A variable containing a list of wheel style controllers.
  1256. *
  1257. * The format of the string is a comma separated list of USB VID/PID pairs in
  1258. * hexadecimal form, e.g.
  1259. *
  1260. * 0xAAAA/0xBBBB,0xCCCC/0xDDDD
  1261. *
  1262. * The variable can also take the form of @file, in which case the named file
  1263. * will be loaded and interpreted as the value of the variable.
  1264. */
  1265. #define SDL_HINT_JOYSTICK_WHEEL_DEVICES "SDL_JOYSTICK_WHEEL_DEVICES"
  1266. /**
  1267. * A variable containing a list of devices that are not wheel style
  1268. * controllers.
  1269. *
  1270. * This will override SDL_HINT_JOYSTICK_WHEEL_DEVICES and the built in device
  1271. * list.
  1272. *
  1273. * The format of the string is a comma separated list of USB VID/PID pairs in
  1274. * hexadecimal form, e.g.
  1275. *
  1276. * 0xAAAA/0xBBBB,0xCCCC/0xDDDD
  1277. *
  1278. * The variable can also take the form of @file, in which case the named file
  1279. * will be loaded and interpreted as the value of the variable.
  1280. */
  1281. #define SDL_HINT_JOYSTICK_WHEEL_DEVICES_EXCLUDED "SDL_JOYSTICK_WHEEL_DEVICES_EXCLUDED"
  1282. /**
  1283. * A variable containing a list of devices known to have all axes centered at
  1284. * zero.
  1285. *
  1286. * The format of the string is a comma separated list of USB VID/PID pairs in
  1287. * hexadecimal form, e.g.
  1288. *
  1289. * 0xAAAA/0xBBBB,0xCCCC/0xDDDD
  1290. *
  1291. * The variable can also take the form of @file, in which case the named file
  1292. * will be loaded and interpreted as the value of the variable.
  1293. */
  1294. #define SDL_HINT_JOYSTICK_ZERO_CENTERED_DEVICES "SDL_JOYSTICK_ZERO_CENTERED_DEVICES"
  1295. /**
  1296. * Determines whether SDL enforces that DRM master is required in order to
  1297. * initialize the KMSDRM video backend.
  1298. *
  1299. * The DRM subsystem has a concept of a "DRM master" which is a DRM client
  1300. * that has the ability to set planes, set cursor, etc. When SDL is DRM
  1301. * master, it can draw to the screen using the SDL rendering APIs. Without DRM
  1302. * master, SDL is still able to process input and query attributes of attached
  1303. * displays, but it cannot change display state or draw to the screen
  1304. * directly.
  1305. *
  1306. * In some cases, it can be useful to have the KMSDRM backend even if it
  1307. * cannot be used for rendering. An app may want to use SDL for input
  1308. * processing while using another rendering API (such as an MMAL overlay on
  1309. * Raspberry Pi) or using its own code to render to DRM overlays that SDL
  1310. * doesn't support.
  1311. *
  1312. * This hint must be set before initializing the video subsystem.
  1313. *
  1314. * This variable can be set to the following values:
  1315. *
  1316. * - "0": SDL will allow usage of the KMSDRM backend without DRM master
  1317. * - "1": SDL Will require DRM master to use the KMSDRM backend (default)
  1318. */
  1319. #define SDL_HINT_KMSDRM_REQUIRE_DRM_MASTER "SDL_KMSDRM_REQUIRE_DRM_MASTER"
  1320. /**
  1321. * A comma separated list of devices to open as joysticks
  1322. *
  1323. * This variable is currently only used by the Linux joystick driver.
  1324. */
  1325. #define SDL_HINT_JOYSTICK_DEVICE "SDL_JOYSTICK_DEVICE"
  1326. /**
  1327. * A variable containing a list of devices and their desired number of haptic
  1328. * (force feedback) enabled axis.
  1329. *
  1330. * The format of the string is a comma separated list of USB VID/PID pairs in
  1331. * hexadecimal form plus the number of desired axes, e.g.
  1332. *
  1333. * `0xAAAA/0xBBBB/1,0xCCCC/0xDDDD/3`
  1334. *
  1335. * This hint supports a "wildcard" device that will set the number of haptic
  1336. * axes on all initialized haptic devices which were not defined explicitly in
  1337. * this hint.
  1338. *
  1339. * `0xFFFF/0xFFFF/1`
  1340. *
  1341. * This hint should be set before a controller is opened. The number of haptic
  1342. * axes won't exceed the number of real axes found on the device.
  1343. */
  1344. #define SDL_HINT_JOYSTICK_HAPTIC_AXES "SDL_JOYSTICK_HAPTIC_AXES"
  1345. /**
  1346. * A variable controlling whether joysticks on Linux will always treat 'hat'
  1347. * axis inputs (ABS_HAT0X - ABS_HAT3Y) as 8-way digital hats without checking
  1348. * whether they may be analog.
  1349. *
  1350. * This variable can be set to the following values:
  1351. *
  1352. * - "0": Only map hat axis inputs to digital hat outputs if the input axes
  1353. * appear to actually be digital (the default)
  1354. * - "1": Always handle the input axes numbered ABS_HAT0X to ABS_HAT3Y as
  1355. * digital hats
  1356. */
  1357. #define SDL_HINT_LINUX_DIGITAL_HATS "SDL_LINUX_DIGITAL_HATS"
  1358. /**
  1359. * A variable controlling whether digital hats on Linux will apply deadzones
  1360. * to their underlying input axes or use unfiltered values.
  1361. *
  1362. * This variable can be set to the following values:
  1363. *
  1364. * - "0": Return digital hat values based on unfiltered input axis values
  1365. * - "1": Return digital hat values with deadzones on the input axes taken
  1366. * into account (the default)
  1367. */
  1368. #define SDL_HINT_LINUX_HAT_DEADZONES "SDL_LINUX_HAT_DEADZONES"
  1369. /**
  1370. * A variable controlling whether to use the classic /dev/input/js* joystick
  1371. * interface or the newer /dev/input/event* joystick interface on Linux
  1372. *
  1373. * This variable can be set to the following values:
  1374. *
  1375. * - "0": Use /dev/input/event*
  1376. * - "1": Use /dev/input/js*
  1377. *
  1378. * By default the /dev/input/event* interfaces are used
  1379. */
  1380. #define SDL_HINT_LINUX_JOYSTICK_CLASSIC "SDL_LINUX_JOYSTICK_CLASSIC"
  1381. /**
  1382. * A variable controlling whether joysticks on Linux adhere to their
  1383. * HID-defined deadzones or return unfiltered values.
  1384. *
  1385. * This variable can be set to the following values:
  1386. *
  1387. * - "0": Return unfiltered joystick axis values (the default)
  1388. * - "1": Return axis values with deadzones taken into account
  1389. */
  1390. #define SDL_HINT_LINUX_JOYSTICK_DEADZONES "SDL_LINUX_JOYSTICK_DEADZONES"
  1391. /**
  1392. * A variable controlling the default SDL log levels.
  1393. *
  1394. * This variable is a comma separated set of category=level tokens that define
  1395. * the default logging levels for SDL applications.
  1396. *
  1397. * The category can be a numeric category, one of "app", "error", "assert",
  1398. * "system", "audio", "video", "render", "input", "test", or `*` for any
  1399. * unspecified category.
  1400. *
  1401. * The level can be a numeric level, one of "verbose", "debug", "info",
  1402. * "warn", "error", "critical", or "quiet" to disable that category.
  1403. *
  1404. * You can omit the category if you want to set the logging level for all
  1405. * categories.
  1406. *
  1407. * If this hint isn't set, the default log levels are equivalent to:
  1408. * "app=info,assert=warn,test=verbose,*=error"
  1409. */
  1410. #define SDL_HINT_LOGGING "SDL_LOGGING"
  1411. /**
  1412. * When set don't force the SDL app to become a foreground process
  1413. *
  1414. * This hint only applies to Mac OS X.
  1415. */
  1416. #define SDL_HINT_MAC_BACKGROUND_APP "SDL_MAC_BACKGROUND_APP"
  1417. /**
  1418. * A variable that determines whether ctrl+click should generate a right-click
  1419. * event on Mac
  1420. *
  1421. * If present, holding ctrl while left clicking will generate a right click
  1422. * event when on Mac.
  1423. */
  1424. #define SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK "SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK"
  1425. /**
  1426. * A variable controlling whether dispatching OpenGL context updates should
  1427. * block the dispatching thread until the main thread finishes processing
  1428. *
  1429. * This variable can be set to the following values:
  1430. *
  1431. * - "0": Dispatching OpenGL context updates will block the dispatching thread
  1432. * until the main thread finishes processing (default).
  1433. * - "1": Dispatching OpenGL context updates will allow the dispatching thread
  1434. * to continue execution.
  1435. *
  1436. * Generally you want the default, but if you have OpenGL code in a background
  1437. * thread on a Mac, and the main thread hangs because it's waiting for that
  1438. * background thread, but that background thread is also hanging because it's
  1439. * waiting for the main thread to do an update, this might fix your issue.
  1440. *
  1441. * This hint only applies to macOS.
  1442. *
  1443. * This hint is available since SDL 2.24.0.
  1444. */
  1445. #define SDL_HINT_MAC_OPENGL_ASYNC_DISPATCH "SDL_MAC_OPENGL_ASYNC_DISPATCH"
  1446. /**
  1447. * A variable setting the double click radius, in pixels.
  1448. */
  1449. #define SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS "SDL_MOUSE_DOUBLE_CLICK_RADIUS"
  1450. /**
  1451. * A variable setting the double click time, in milliseconds.
  1452. */
  1453. #define SDL_HINT_MOUSE_DOUBLE_CLICK_TIME "SDL_MOUSE_DOUBLE_CLICK_TIME"
  1454. /**
  1455. * Allow mouse click events when clicking to focus an SDL window
  1456. *
  1457. * This variable can be set to the following values:
  1458. *
  1459. * - "0": Ignore mouse clicks that activate a window
  1460. * - "1": Generate events for mouse clicks that activate a window
  1461. *
  1462. * By default SDL will ignore mouse clicks that activate a window
  1463. */
  1464. #define SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH "SDL_MOUSE_FOCUS_CLICKTHROUGH"
  1465. /**
  1466. * A variable setting the speed scale for mouse motion, in floating point,
  1467. * when the mouse is not in relative mode
  1468. */
  1469. #define SDL_HINT_MOUSE_NORMAL_SPEED_SCALE "SDL_MOUSE_NORMAL_SPEED_SCALE"
  1470. /**
  1471. * A variable controlling whether relative mouse mode constrains the mouse to
  1472. * the center of the window
  1473. *
  1474. * This variable can be set to the following values:
  1475. *
  1476. * - "0": Relative mouse mode constrains the mouse to the window
  1477. * - "1": Relative mouse mode constrains the mouse to the center of the window
  1478. *
  1479. * Constraining to the center of the window works better for FPS games and
  1480. * when the application is running over RDP. Constraining to the whole window
  1481. * works better for 2D games and increases the chance that the mouse will be
  1482. * in the correct position when using high DPI mice.
  1483. *
  1484. * By default SDL will constrain the mouse to the center of the window
  1485. */
  1486. #define SDL_HINT_MOUSE_RELATIVE_MODE_CENTER "SDL_MOUSE_RELATIVE_MODE_CENTER"
  1487. /**
  1488. * A variable controlling whether relative mouse mode is implemented using
  1489. * mouse warping
  1490. *
  1491. * This variable can be set to the following values:
  1492. *
  1493. * - "0": Relative mouse mode uses raw input
  1494. * - "1": Relative mouse mode uses mouse warping
  1495. *
  1496. * By default SDL will use raw input for relative mouse mode
  1497. */
  1498. #define SDL_HINT_MOUSE_RELATIVE_MODE_WARP "SDL_MOUSE_RELATIVE_MODE_WARP"
  1499. /**
  1500. * A variable controlling whether relative mouse motion is affected by
  1501. * renderer scaling
  1502. *
  1503. * This variable can be set to the following values:
  1504. *
  1505. * - "0": Relative motion is unaffected by DPI or renderer's logical size
  1506. * - "1": Relative motion is scaled according to DPI scaling and logical size
  1507. *
  1508. * By default relative mouse deltas are affected by DPI and renderer scaling
  1509. */
  1510. #define SDL_HINT_MOUSE_RELATIVE_SCALING "SDL_MOUSE_RELATIVE_SCALING"
  1511. /**
  1512. * A variable setting the scale for mouse motion, in floating point, when the
  1513. * mouse is in relative mode
  1514. */
  1515. #define SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE "SDL_MOUSE_RELATIVE_SPEED_SCALE"
  1516. /**
  1517. * A variable controlling whether the system mouse acceleration curve is used
  1518. * for relative mouse motion.
  1519. *
  1520. * This variable can be set to the following values:
  1521. *
  1522. * - "0": Relative mouse motion will be unscaled (the default)
  1523. * - "1": Relative mouse motion will be scaled using the system mouse
  1524. * acceleration curve.
  1525. *
  1526. * If SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE is set, that will override the
  1527. * system speed scale.
  1528. */
  1529. #define SDL_HINT_MOUSE_RELATIVE_SYSTEM_SCALE "SDL_MOUSE_RELATIVE_SYSTEM_SCALE"
  1530. /**
  1531. * A variable controlling whether a motion event should be generated for mouse
  1532. * warping in relative mode.
  1533. *
  1534. * This variable can be set to the following values:
  1535. *
  1536. * - "0": Warping the mouse will not generate a motion event in relative mode
  1537. * - "1": Warping the mouse will generate a motion event in relative mode
  1538. *
  1539. * By default warping the mouse will not generate motion events in relative
  1540. * mode. This avoids the application having to filter out large relative
  1541. * motion due to warping.
  1542. */
  1543. #define SDL_HINT_MOUSE_RELATIVE_WARP_MOTION "SDL_MOUSE_RELATIVE_WARP_MOTION"
  1544. /**
  1545. * A variable controlling whether the hardware cursor stays visible when
  1546. * relative mode is active.
  1547. *
  1548. * This variable can be set to the following values: "0" - The cursor will be
  1549. * hidden while relative mode is active (default) "1" - The cursor will remain
  1550. * visible while relative mode is active
  1551. *
  1552. * Note that for systems without raw hardware inputs, relative mode is
  1553. * implemented using warping, so the hardware cursor will visibly warp between
  1554. * frames if this is enabled on those systems.
  1555. */
  1556. #define SDL_HINT_MOUSE_RELATIVE_CURSOR_VISIBLE "SDL_MOUSE_RELATIVE_CURSOR_VISIBLE"
  1557. /**
  1558. * A variable controlling whether mouse events should generate synthetic touch
  1559. * events
  1560. *
  1561. * This variable can be set to the following values:
  1562. *
  1563. * - "0": Mouse events will not generate touch events (default for desktop
  1564. * platforms)
  1565. * - "1": Mouse events will generate touch events (default for mobile
  1566. * platforms, such as Android and iOS)
  1567. */
  1568. #define SDL_HINT_MOUSE_TOUCH_EVENTS "SDL_MOUSE_TOUCH_EVENTS"
  1569. /**
  1570. * A variable controlling whether the mouse is captured while mouse buttons
  1571. * are pressed
  1572. *
  1573. * This variable can be set to the following values:
  1574. *
  1575. * - "0": The mouse is not captured while mouse buttons are pressed
  1576. * - "1": The mouse is captured while mouse buttons are pressed
  1577. *
  1578. * By default the mouse is captured while mouse buttons are pressed so if the
  1579. * mouse is dragged outside the window, the application continues to receive
  1580. * mouse events until the button is released.
  1581. */
  1582. #define SDL_HINT_MOUSE_AUTO_CAPTURE "SDL_MOUSE_AUTO_CAPTURE"
  1583. /**
  1584. * Tell SDL not to catch the SIGINT or SIGTERM signals.
  1585. *
  1586. * This hint only applies to Unix-like platforms, and should set before any
  1587. * calls to SDL_Init()
  1588. *
  1589. * The variable can be set to the following values:
  1590. *
  1591. * - "0": SDL will install a SIGINT and SIGTERM handler, and when it catches a
  1592. * signal, convert it into an SDL_QUIT event.
  1593. * - "1": SDL will not install a signal handler at all.
  1594. */
  1595. #define SDL_HINT_NO_SIGNAL_HANDLERS "SDL_NO_SIGNAL_HANDLERS"
  1596. /**
  1597. * A variable controlling what driver to use for OpenGL ES contexts.
  1598. *
  1599. * On some platforms, currently Windows and X11, OpenGL drivers may support
  1600. * creating contexts with an OpenGL ES profile. By default SDL uses these
  1601. * profiles, when available, otherwise it attempts to load an OpenGL ES
  1602. * library, e.g. that provided by the ANGLE project. This variable controls
  1603. * whether SDL follows this default behaviour or will always load an OpenGL ES
  1604. * library.
  1605. *
  1606. * Circumstances where this is useful include - Testing an app with a
  1607. * particular OpenGL ES implementation, e.g ANGLE, or emulator, e.g. those
  1608. * from ARM, Imagination or Qualcomm. - Resolving OpenGL ES function addresses
  1609. * at link time by linking with the OpenGL ES library instead of querying them
  1610. * at run time with SDL_GL_GetProcAddress().
  1611. *
  1612. * Caution: for an application to work with the default behaviour across
  1613. * different OpenGL drivers it must query the OpenGL ES function addresses at
  1614. * run time using SDL_GL_GetProcAddress().
  1615. *
  1616. * This variable is ignored on most platforms because OpenGL ES is native or
  1617. * not supported.
  1618. *
  1619. * This variable can be set to the following values:
  1620. *
  1621. * - "0": Use ES profile of OpenGL, if available. (Default when not set.)
  1622. * - "1": Load OpenGL ES library using the default library names.
  1623. */
  1624. #define SDL_HINT_OPENGL_ES_DRIVER "SDL_OPENGL_ES_DRIVER"
  1625. /**
  1626. * A variable controlling which orientations are allowed on iOS/Android.
  1627. *
  1628. * In some circumstances it is necessary to be able to explicitly control
  1629. * which UI orientations are allowed.
  1630. *
  1631. * This variable is a space delimited list of the following values:
  1632. *
  1633. * - "LandscapeLeft"
  1634. * - "LandscapeRight"
  1635. * - "Portrait"
  1636. * - "PortraitUpsideDown"
  1637. */
  1638. #define SDL_HINT_ORIENTATIONS "SDL_IOS_ORIENTATIONS"
  1639. /**
  1640. * A variable controlling the use of a sentinel event when polling the event
  1641. * queue
  1642. *
  1643. * This variable can be set to the following values:
  1644. *
  1645. * - "0": Disable poll sentinels
  1646. * - "1": Enable poll sentinels
  1647. *
  1648. * When polling for events, SDL_PumpEvents is used to gather new events from
  1649. * devices. If a device keeps producing new events between calls to
  1650. * SDL_PumpEvents, a poll loop will become stuck until the new events stop.
  1651. * This is most noticeable when moving a high frequency mouse.
  1652. *
  1653. * By default, poll sentinels are enabled.
  1654. */
  1655. #define SDL_HINT_POLL_SENTINEL "SDL_POLL_SENTINEL"
  1656. /**
  1657. * Override for SDL_GetPreferredLocales()
  1658. *
  1659. * If set, this will be favored over anything the OS might report for the
  1660. * user's preferred locales. Changing this hint at runtime will not generate a
  1661. * SDL_LOCALECHANGED event (but if you can change the hint, you can push your
  1662. * own event, if you want).
  1663. *
  1664. * The format of this hint is a comma-separated list of language and locale,
  1665. * combined with an underscore, as is a common format: "en_GB". Locale is
  1666. * optional: "en". So you might have a list like this: "en_GB,jp,es_PT"
  1667. */
  1668. #define SDL_HINT_PREFERRED_LOCALES "SDL_PREFERRED_LOCALES"
  1669. /**
  1670. * A variable describing the content orientation on QtWayland-based platforms.
  1671. *
  1672. * On QtWayland platforms, windows are rotated client-side to allow for custom
  1673. * transitions. In order to correctly position overlays (e.g. volume bar) and
  1674. * gestures (e.g. events view, close/minimize gestures), the system needs to
  1675. * know in which orientation the application is currently drawing its
  1676. * contents.
  1677. *
  1678. * This does not cause the window to be rotated or resized, the application
  1679. * needs to take care of drawing the content in the right orientation (the
  1680. * framebuffer is always in portrait mode).
  1681. *
  1682. * This variable can be one of the following values:
  1683. *
  1684. * - "primary" (default)
  1685. * - "portrait"
  1686. * - "landscape"
  1687. * - "inverted-portrait"
  1688. * - "inverted-landscape"
  1689. *
  1690. * Since SDL 2.0.22 this variable accepts a comma-separated list of values
  1691. * above.
  1692. */
  1693. #define SDL_HINT_QTWAYLAND_CONTENT_ORIENTATION "SDL_QTWAYLAND_CONTENT_ORIENTATION"
  1694. /**
  1695. * Flags to set on QtWayland windows to integrate with the native window
  1696. * manager.
  1697. *
  1698. * On QtWayland platforms, this hint controls the flags to set on the windows.
  1699. * For example, on Sailfish OS "OverridesSystemGestures" disables swipe
  1700. * gestures.
  1701. *
  1702. * This variable is a space-separated list of the following values (empty = no
  1703. * flags):
  1704. *
  1705. * - "OverridesSystemGestures"
  1706. * - "StaysOnTop"
  1707. * - "BypassWindowManager"
  1708. */
  1709. #define SDL_HINT_QTWAYLAND_WINDOW_FLAGS "SDL_QTWAYLAND_WINDOW_FLAGS"
  1710. /**
  1711. * A variable controlling whether the 2D render API is compatible or
  1712. * efficient.
  1713. *
  1714. * This variable can be set to the following values:
  1715. *
  1716. * - "0": Don't use batching to make rendering more efficient.
  1717. * - "1": Use batching, but might cause problems if app makes its own direct
  1718. * OpenGL calls.
  1719. *
  1720. * Up to SDL 2.0.9, the render API would draw immediately when requested. Now
  1721. * it batches up draw requests and sends them all to the GPU only when forced
  1722. * to (during SDL_RenderPresent, when changing render targets, by updating a
  1723. * texture that the batch needs, etc). This is significantly more efficient,
  1724. * but it can cause problems for apps that expect to render on top of the
  1725. * render API's output. As such, SDL will disable batching if a specific
  1726. * render backend is requested (since this might indicate that the app is
  1727. * planning to use the underlying graphics API directly). This hint can be
  1728. * used to explicitly request batching in this instance. It is a contract that
  1729. * you will either never use the underlying graphics API directly, or if you
  1730. * do, you will call SDL_RenderFlush() before you do so any current batch goes
  1731. * to the GPU before your work begins. Not following this contract will result
  1732. * in undefined behavior.
  1733. */
  1734. #define SDL_HINT_RENDER_BATCHING "SDL_RENDER_BATCHING"
  1735. /**
  1736. * A variable controlling how the 2D render API renders lines
  1737. *
  1738. * This variable can be set to the following values:
  1739. *
  1740. * - "0": Use the default line drawing method (Bresenham's line algorithm as
  1741. * of SDL 2.0.20)
  1742. * - "1": Use the driver point API using Bresenham's line algorithm (correct,
  1743. * draws many points)
  1744. * - "2": Use the driver line API (occasionally misses line endpoints based on
  1745. * hardware driver quirks, was the default before 2.0.20)
  1746. * - "3": Use the driver geometry API (correct, draws thicker diagonal lines)
  1747. *
  1748. * This variable should be set when the renderer is created.
  1749. */
  1750. #define SDL_HINT_RENDER_LINE_METHOD "SDL_RENDER_LINE_METHOD"
  1751. /**
  1752. * A variable controlling whether to enable Direct3D 11+'s Debug Layer.
  1753. *
  1754. * This variable does not have any effect on the Direct3D 9 based renderer.
  1755. *
  1756. * This variable can be set to the following values:
  1757. *
  1758. * - "0": Disable Debug Layer use
  1759. * - "1": Enable Debug Layer use
  1760. *
  1761. * By default, SDL does not use Direct3D Debug Layer.
  1762. */
  1763. #define SDL_HINT_RENDER_DIRECT3D11_DEBUG "SDL_RENDER_DIRECT3D11_DEBUG"
  1764. /**
  1765. * A variable controlling whether the Direct3D device is initialized for
  1766. * thread-safe operations.
  1767. *
  1768. * This variable can be set to the following values:
  1769. *
  1770. * - "0": Thread-safety is not enabled (faster)
  1771. * - "1": Thread-safety is enabled
  1772. *
  1773. * By default the Direct3D device is created with thread-safety disabled.
  1774. */
  1775. #define SDL_HINT_RENDER_DIRECT3D_THREADSAFE "SDL_RENDER_DIRECT3D_THREADSAFE"
  1776. /**
  1777. * A variable specifying which render driver to use.
  1778. *
  1779. * If the application doesn't pick a specific renderer to use, this variable
  1780. * specifies the name of the preferred renderer. If the preferred renderer
  1781. * can't be initialized, the normal default renderer is used.
  1782. *
  1783. * This variable is case insensitive and can be set to the following values:
  1784. *
  1785. * - "direct3d"
  1786. * - "direct3d11"
  1787. * - "direct3d12"
  1788. * - "opengl"
  1789. * - "opengles2"
  1790. * - "opengles"
  1791. * - "metal"
  1792. * - "software"
  1793. *
  1794. * The default varies by platform, but it's the first one in the list that is
  1795. * available on the current platform.
  1796. */
  1797. #define SDL_HINT_RENDER_DRIVER "SDL_RENDER_DRIVER"
  1798. /**
  1799. * A variable controlling the scaling policy for SDL_RenderSetLogicalSize.
  1800. *
  1801. * This variable can be set to the following values:
  1802. *
  1803. * "0" or "letterbox" - Uses letterbox/sidebars to fit the entire rendering on
  1804. * screen "1" or "overscan" - Will zoom the rendering so it fills the entire
  1805. * screen, allowing edges to be drawn offscreen
  1806. *
  1807. * By default letterbox is used
  1808. */
  1809. #define SDL_HINT_RENDER_LOGICAL_SIZE_MODE "SDL_RENDER_LOGICAL_SIZE_MODE"
  1810. /**
  1811. * A variable controlling whether the OpenGL render driver uses shaders if
  1812. * they are available.
  1813. *
  1814. * This variable can be set to the following values:
  1815. *
  1816. * - "0": Disable shaders
  1817. * - "1": Enable shaders
  1818. *
  1819. * By default shaders are used if OpenGL supports them.
  1820. */
  1821. #define SDL_HINT_RENDER_OPENGL_SHADERS "SDL_RENDER_OPENGL_SHADERS"
  1822. /**
  1823. * A variable controlling the scaling quality
  1824. *
  1825. * This variable can be set to the following values:
  1826. *
  1827. * - "0" or "nearest": Nearest pixel sampling
  1828. * - "1" or "linear": Linear filtering (supported by OpenGL and Direct3D)
  1829. * - "2" or "best": Currently this is the same as "linear"
  1830. *
  1831. * By default nearest pixel sampling is used
  1832. */
  1833. #define SDL_HINT_RENDER_SCALE_QUALITY "SDL_RENDER_SCALE_QUALITY"
  1834. /**
  1835. * A variable controlling whether updates to the SDL screen surface should be
  1836. * synchronized with the vertical refresh, to avoid tearing.
  1837. *
  1838. * This variable can be set to the following values:
  1839. *
  1840. * - "0": Disable vsync
  1841. * - "1": Enable vsync
  1842. *
  1843. * By default SDL does not sync screen surface updates with vertical refresh.
  1844. */
  1845. #define SDL_HINT_RENDER_VSYNC "SDL_RENDER_VSYNC"
  1846. /**
  1847. * A variable controlling whether the Metal render driver select low power
  1848. * device over default one
  1849. *
  1850. * This variable can be set to the following values:
  1851. *
  1852. * - "0": Use the prefered OS device
  1853. * - "1": Select a low power one
  1854. *
  1855. * By default the prefered OS device is used.
  1856. */
  1857. #define SDL_HINT_RENDER_METAL_PREFER_LOW_POWER_DEVICE "SDL_RENDER_METAL_PREFER_LOW_POWER_DEVICE"
  1858. /**
  1859. * A variable containing a list of ROG gamepad capable mice.
  1860. *
  1861. * The format of the string is a comma separated list of USB VID/PID pairs in
  1862. * hexadecimal form, e.g.
  1863. *
  1864. * 0xAAAA/0xBBBB,0xCCCC/0xDDDD
  1865. *
  1866. * The variable can also take the form of @file, in which case the named file
  1867. * will be loaded and interpreted as the value of the variable.
  1868. */
  1869. #define SDL_HINT_ROG_GAMEPAD_MICE "SDL_ROG_GAMEPAD_MICE"
  1870. /**
  1871. * A variable containing a list of devices that are not ROG gamepad capable
  1872. * mice.
  1873. *
  1874. * This will override SDL_HINT_ROG_GAMEPAD_MICE and the built in device list.
  1875. *
  1876. * The format of the string is a comma separated list of USB VID/PID pairs in
  1877. * hexadecimal form, e.g.
  1878. *
  1879. * 0xAAAA/0xBBBB,0xCCCC/0xDDDD
  1880. *
  1881. * The variable can also take the form of @file, in which case the named file
  1882. * will be loaded and interpreted as the value of the variable.
  1883. */
  1884. #define SDL_HINT_ROG_GAMEPAD_MICE_EXCLUDED "SDL_ROG_GAMEPAD_MICE_EXCLUDED"
  1885. /**
  1886. * A variable controlling if VSYNC is automatically disable if doesn't reach
  1887. * the enough FPS
  1888. *
  1889. * This variable can be set to the following values:
  1890. *
  1891. * - "0": It will be using VSYNC as defined in the main flag. Default
  1892. * - "1": If VSYNC was previously enabled, then it will disable VSYNC if
  1893. * doesn't reach enough speed
  1894. *
  1895. * By default SDL does not enable the automatic VSYNC
  1896. */
  1897. #define SDL_HINT_PS2_DYNAMIC_VSYNC "SDL_PS2_DYNAMIC_VSYNC"
  1898. /**
  1899. * A variable to control whether the return key on the soft keyboard should
  1900. * hide the soft keyboard on Android and iOS.
  1901. *
  1902. * The variable can be set to the following values:
  1903. *
  1904. * - "0": The return key will be handled as a key event. This is the behaviour
  1905. * of SDL <= 2.0.3. (default)
  1906. * - "1": The return key will hide the keyboard.
  1907. *
  1908. * The value of this hint is used at runtime, so it can be changed at any
  1909. * time.
  1910. */
  1911. #define SDL_HINT_RETURN_KEY_HIDES_IME "SDL_RETURN_KEY_HIDES_IME"
  1912. /**
  1913. * Tell SDL which Dispmanx layer to use on a Raspberry PI
  1914. *
  1915. * Also known as Z-order. The variable can take a negative or positive value.
  1916. * The default is 10000.
  1917. */
  1918. #define SDL_HINT_RPI_VIDEO_LAYER "SDL_RPI_VIDEO_LAYER"
  1919. /**
  1920. * Specify an "activity name" for screensaver inhibition.
  1921. *
  1922. * Some platforms, notably Linux desktops, list the applications which are
  1923. * inhibiting the screensaver or other power-saving features.
  1924. *
  1925. * This hint lets you specify the "activity name" sent to the OS when
  1926. * SDL_DisableScreenSaver() is used (or the screensaver is automatically
  1927. * disabled). The contents of this hint are used when the screensaver is
  1928. * disabled. You should use a string that describes what your program is doing
  1929. * (and, therefore, why the screensaver is disabled). For example, "Playing a
  1930. * game" or "Watching a video".
  1931. *
  1932. * Setting this to "" or leaving it unset will have SDL use a reasonable
  1933. * default: "Playing a game" or something similar.
  1934. *
  1935. * On targets where this is not supported, this hint does nothing.
  1936. */
  1937. #define SDL_HINT_SCREENSAVER_INHIBIT_ACTIVITY_NAME "SDL_SCREENSAVER_INHIBIT_ACTIVITY_NAME"
  1938. /**
  1939. * Specifies whether SDL_THREAD_PRIORITY_TIME_CRITICAL should be treated as
  1940. * realtime.
  1941. *
  1942. * On some platforms, like Linux, a realtime priority thread may be subject to
  1943. * restrictions that require special handling by the application. This hint
  1944. * exists to let SDL know that the app is prepared to handle said
  1945. * restrictions.
  1946. *
  1947. * On Linux, SDL will apply the following configuration to any thread that
  1948. * becomes realtime:
  1949. *
  1950. * - The SCHED_RESET_ON_FORK bit will be set on the scheduling policy.
  1951. * - An RLIMIT_RTTIME budget will be configured to the rtkit specified limit.
  1952. * - Exceeding this limit will result in the kernel sending SIGKILL to the
  1953. * app.
  1954. *
  1955. * Refer to the man pages for more information.
  1956. *
  1957. * This variable can be set to the following values:
  1958. *
  1959. * - "0": default platform specific behaviour
  1960. * - "1": Force SDL_THREAD_PRIORITY_TIME_CRITICAL to a realtime scheduling
  1961. * policy
  1962. */
  1963. #define SDL_HINT_THREAD_FORCE_REALTIME_TIME_CRITICAL "SDL_THREAD_FORCE_REALTIME_TIME_CRITICAL"
  1964. /**
  1965. * A string specifying additional information to use with
  1966. * SDL_SetThreadPriority.
  1967. *
  1968. * By default SDL_SetThreadPriority will make appropriate system changes in
  1969. * order to apply a thread priority. For example on systems using pthreads the
  1970. * scheduler policy is changed automatically to a policy that works well with
  1971. * a given priority. Code which has specific requirements can override SDL's
  1972. * default behavior with this hint.
  1973. *
  1974. * pthread hint values are "current", "other", "fifo" and "rr". Currently no
  1975. * other platform hint values are defined but may be in the future.
  1976. */
  1977. #define SDL_HINT_THREAD_PRIORITY_POLICY "SDL_THREAD_PRIORITY_POLICY"
  1978. /**
  1979. * A string specifying SDL's threads stack size in bytes or "0" for the
  1980. * backend's default size
  1981. *
  1982. * Use this hint in case you need to set SDL's threads stack size to other
  1983. * than the default. This is specially useful if you build SDL against a non
  1984. * glibc libc library (such as musl) which provides a relatively small default
  1985. * thread stack size (a few kilobytes versus the default 8MB glibc uses).
  1986. * Support for this hint is currently available only in the pthread, Windows,
  1987. * and PSP backend.
  1988. *
  1989. * Instead of this hint, in 2.0.9 and later, you can use
  1990. * SDL_CreateThreadWithStackSize(). This hint only works with the classic
  1991. * SDL_CreateThread().
  1992. */
  1993. #define SDL_HINT_THREAD_STACK_SIZE "SDL_THREAD_STACK_SIZE"
  1994. /**
  1995. * A variable that controls the timer resolution, in milliseconds.
  1996. *
  1997. * The higher resolution the timer, the more frequently the CPU services timer
  1998. * interrupts, and the more precise delays are, but this takes up power and
  1999. * CPU time. This hint is only used on Windows.
  2000. *
  2001. * See this blog post for more information:
  2002. * http://randomascii.wordpress.com/2013/07/08/windows-timer-resolution-megawatts-wasted/
  2003. *
  2004. * If this variable is set to "0", the system timer resolution is not set.
  2005. *
  2006. * The default value is "1". This hint may be set at any time.
  2007. */
  2008. #define SDL_HINT_TIMER_RESOLUTION "SDL_TIMER_RESOLUTION"
  2009. /**
  2010. * A variable controlling whether touch events should generate synthetic mouse
  2011. * events
  2012. *
  2013. * This variable can be set to the following values:
  2014. *
  2015. * - "0": Touch events will not generate mouse events
  2016. * - "1": Touch events will generate mouse events
  2017. *
  2018. * By default SDL will generate mouse events for touch events
  2019. */
  2020. #define SDL_HINT_TOUCH_MOUSE_EVENTS "SDL_TOUCH_MOUSE_EVENTS"
  2021. /**
  2022. * A variable controlling which touchpad should generate synthetic mouse
  2023. * events
  2024. *
  2025. * This variable can be set to the following values:
  2026. *
  2027. * - "0": Only front touchpad should generate mouse events. Default
  2028. * - "1": Only back touchpad should generate mouse events.
  2029. * - "2": Both touchpads should generate mouse events.
  2030. *
  2031. * By default SDL will generate mouse events for all touch devices
  2032. */
  2033. #define SDL_HINT_VITA_TOUCH_MOUSE_DEVICE "SDL_HINT_VITA_TOUCH_MOUSE_DEVICE"
  2034. /**
  2035. * A variable controlling whether the Android / tvOS remotes should be listed
  2036. * as joystick devices, instead of sending keyboard events.
  2037. *
  2038. * This variable can be set to the following values:
  2039. *
  2040. * - "0": Remotes send enter/escape/arrow key events
  2041. * - "1": Remotes are available as 2 axis, 2 button joysticks (the default).
  2042. */
  2043. #define SDL_HINT_TV_REMOTE_AS_JOYSTICK "SDL_TV_REMOTE_AS_JOYSTICK"
  2044. /**
  2045. * A variable controlling whether the screensaver is enabled.
  2046. *
  2047. * This variable can be set to the following values:
  2048. *
  2049. * - "0": Disable screensaver
  2050. * - "1": Enable screensaver
  2051. *
  2052. * By default SDL will disable the screensaver.
  2053. */
  2054. #define SDL_HINT_VIDEO_ALLOW_SCREENSAVER "SDL_VIDEO_ALLOW_SCREENSAVER"
  2055. /**
  2056. * Tell the video driver that we only want a double buffer.
  2057. *
  2058. * By default, most lowlevel 2D APIs will use a triple buffer scheme that
  2059. * wastes no CPU time on waiting for vsync after issuing a flip, but
  2060. * introduces a frame of latency. On the other hand, using a double buffer
  2061. * scheme instead is recommended for cases where low latency is an important
  2062. * factor because we save a whole frame of latency. We do so by waiting for
  2063. * vsync immediately after issuing a flip, usually just after eglSwapBuffers
  2064. * call in the backend's *_SwapWindow function.
  2065. *
  2066. * Since it's driver-specific, it's only supported where possible and
  2067. * implemented. Currently supported the following drivers:
  2068. *
  2069. * - Wayland (wayland)
  2070. * - KMSDRM (kmsdrm)
  2071. * - Raspberry Pi (raspberrypi)
  2072. */
  2073. #define SDL_HINT_VIDEO_DOUBLE_BUFFER "SDL_VIDEO_DOUBLE_BUFFER"
  2074. /**
  2075. * A variable controlling whether the EGL window is allowed to be composited
  2076. * as transparent, rather than opaque.
  2077. *
  2078. * Most window systems will always render windows opaque, even if the surface
  2079. * format has an alpha channel. This is not always true, however, so by
  2080. * default SDL will try to enforce opaque composition. To override this
  2081. * behavior, you can set this hint to "1".
  2082. */
  2083. #define SDL_HINT_VIDEO_EGL_ALLOW_TRANSPARENCY "SDL_VIDEO_EGL_ALLOW_TRANSPARENCY"
  2084. /**
  2085. * A variable controlling whether the graphics context is externally managed.
  2086. *
  2087. * This variable can be set to the following values:
  2088. *
  2089. * - "0": SDL will manage graphics contexts that are attached to windows.
  2090. * - "1": Disable graphics context management on windows.
  2091. *
  2092. * By default SDL will manage OpenGL contexts in certain situations. For
  2093. * example, on Android the context will be automatically saved and restored
  2094. * when pausing the application. Additionally, some platforms will assume
  2095. * usage of OpenGL if Vulkan isn't used. Setting this to "1" will prevent this
  2096. * behavior, which is desireable when the application manages the graphics
  2097. * context, such as an externally managed OpenGL context or attaching a Vulkan
  2098. * surface to the window.
  2099. */
  2100. #define SDL_HINT_VIDEO_EXTERNAL_CONTEXT "SDL_VIDEO_EXTERNAL_CONTEXT"
  2101. /**
  2102. * If set to 1, then do not allow high-DPI windows.
  2103. *
  2104. * ("Retina" on Mac and iOS)
  2105. */
  2106. #define SDL_HINT_VIDEO_HIGHDPI_DISABLED "SDL_VIDEO_HIGHDPI_DISABLED"
  2107. /**
  2108. * A variable that dictates policy for fullscreen Spaces on Mac OS X.
  2109. *
  2110. * This hint only applies to Mac OS X.
  2111. *
  2112. * The variable can be set to the following values:
  2113. *
  2114. * - "0": Disable Spaces support (FULLSCREEN_DESKTOP won't use them and
  2115. * SDL_WINDOW_RESIZABLE windows won't offer the "fullscreen" button on their
  2116. * titlebars).
  2117. * - "1": Enable Spaces support (FULLSCREEN_DESKTOP will use them and
  2118. * SDL_WINDOW_RESIZABLE windows will offer the "fullscreen" button on their
  2119. * titlebars).
  2120. *
  2121. * The default value is "1". This hint must be set before any windows are
  2122. * created.
  2123. */
  2124. #define SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES "SDL_VIDEO_MAC_FULLSCREEN_SPACES"
  2125. /**
  2126. * Minimize your SDL_Window if it loses key focus when in fullscreen mode.
  2127. *
  2128. * Defaults to false.
  2129. */
  2130. #define SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS"
  2131. /**
  2132. * A variable controlling whether the libdecor Wayland backend is allowed to
  2133. * be used.
  2134. *
  2135. * This variable can be set to the following values:
  2136. *
  2137. * - "0": libdecor use is disabled.
  2138. * - "1": libdecor use is enabled (default).
  2139. *
  2140. * libdecor is used over xdg-shell when xdg-decoration protocol is
  2141. * unavailable.
  2142. */
  2143. #define SDL_HINT_VIDEO_WAYLAND_ALLOW_LIBDECOR "SDL_VIDEO_WAYLAND_ALLOW_LIBDECOR"
  2144. /**
  2145. * A variable controlling whether the libdecor Wayland backend is preferred
  2146. * over native decorations.
  2147. *
  2148. * When this hint is set, libdecor will be used to provide window decorations,
  2149. * even if xdg-decoration is available. (Note that, by default, libdecor will
  2150. * use xdg-decoration itself if available).
  2151. *
  2152. * This variable can be set to the following values:
  2153. *
  2154. * - "0": libdecor is enabled only if server-side decorations are unavailable.
  2155. * - "1": libdecor is always enabled if available.
  2156. *
  2157. * libdecor is used over xdg-shell when xdg-decoration protocol is
  2158. * unavailable.
  2159. */
  2160. #define SDL_HINT_VIDEO_WAYLAND_PREFER_LIBDECOR "SDL_VIDEO_WAYLAND_PREFER_LIBDECOR"
  2161. /**
  2162. * A variable controlling whether video mode emulation is enabled under
  2163. * Wayland.
  2164. *
  2165. * When this hint is set, a standard set of emulated CVT video modes will be
  2166. * exposed for use by the application. If it is disabled, the only modes
  2167. * exposed will be the logical desktop size and, in the case of a scaled
  2168. * desktop, the native display resolution.
  2169. *
  2170. * This variable can be set to the following values:
  2171. *
  2172. * - "0": Video mode emulation is disabled.
  2173. * - "1": Video mode emulation is enabled.
  2174. *
  2175. * By default video mode emulation is enabled.
  2176. */
  2177. #define SDL_HINT_VIDEO_WAYLAND_MODE_EMULATION "SDL_VIDEO_WAYLAND_MODE_EMULATION"
  2178. /**
  2179. * Enable or disable mouse pointer warp emulation, needed by some older games.
  2180. *
  2181. * When this hint is set, any SDL will emulate mouse warps using relative
  2182. * mouse mode. This is required for some older games (such as Source engine
  2183. * games), which warp the mouse to the centre of the screen rather than using
  2184. * relative mouse motion. Note that relative mouse mode may have different
  2185. * mouse acceleration behaviour than pointer warps.
  2186. *
  2187. * This variable can be set to the following values:
  2188. *
  2189. * - "0": All mouse warps fail, as mouse warping is not available under
  2190. * wayland.
  2191. * - "1": Some mouse warps will be emulated by forcing relative mouse mode.
  2192. *
  2193. * If not set, this is automatically enabled unless an application uses
  2194. * relative mouse mode directly.
  2195. */
  2196. #define SDL_HINT_VIDEO_WAYLAND_EMULATE_MOUSE_WARP "SDL_VIDEO_WAYLAND_EMULATE_MOUSE_WARP"
  2197. /**
  2198. * A variable that is the address of another SDL_Window* (as a hex string
  2199. * formatted with "%p").
  2200. *
  2201. * If this hint is set before SDL_CreateWindowFrom() and the SDL_Window* it is
  2202. * set to has SDL_WINDOW_OPENGL set (and running on WGL only, currently), then
  2203. * two things will occur on the newly created SDL_Window:
  2204. *
  2205. * 1. Its pixel format will be set to the same pixel format as this
  2206. * SDL_Window. This is needed for example when sharing an OpenGL context
  2207. * across multiple windows.
  2208. *
  2209. * 2. The flag SDL_WINDOW_OPENGL will be set on the new window so it can be
  2210. * used for OpenGL rendering.
  2211. *
  2212. * This variable can be set to the following values: The address (as a string
  2213. * "%p") of the SDL_Window* that new windows created with
  2214. * SDL_CreateWindowFrom() should share a pixel format with.
  2215. */
  2216. #define SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT "SDL_VIDEO_WINDOW_SHARE_PIXEL_FORMAT"
  2217. /**
  2218. * When calling SDL_CreateWindowFrom(), make the window compatible with
  2219. * OpenGL.
  2220. *
  2221. * This variable can be set to the following values:
  2222. *
  2223. * - "0": Don't add any graphics flags to the SDL_WindowFlags
  2224. * - "1": Add SDL_WINDOW_OPENGL to the SDL_WindowFlags
  2225. *
  2226. * By default SDL will not make the foreign window compatible with OpenGL.
  2227. */
  2228. #define SDL_HINT_VIDEO_FOREIGN_WINDOW_OPENGL "SDL_VIDEO_FOREIGN_WINDOW_OPENGL"
  2229. /**
  2230. * When calling SDL_CreateWindowFrom(), make the window compatible with
  2231. * Vulkan.
  2232. *
  2233. * This variable can be set to the following values:
  2234. *
  2235. * - "0": Don't add any graphics flags to the SDL_WindowFlags
  2236. * - "1": Add SDL_WINDOW_VULKAN to the SDL_WindowFlags
  2237. *
  2238. * By default SDL will not make the foreign window compatible with Vulkan.
  2239. */
  2240. #define SDL_HINT_VIDEO_FOREIGN_WINDOW_VULKAN "SDL_VIDEO_FOREIGN_WINDOW_VULKAN"
  2241. /**
  2242. * A variable specifying which shader compiler to preload when using the
  2243. * Chrome ANGLE binaries
  2244. *
  2245. * SDL has EGL and OpenGL ES2 support on Windows via the ANGLE project. It can
  2246. * use two different sets of binaries, those compiled by the user from source
  2247. * or those provided by the Chrome browser. In the later case, these binaries
  2248. * require that SDL loads a DLL providing the shader compiler.
  2249. *
  2250. * This variable can be set to the following values:
  2251. *
  2252. * - "d3dcompiler_46.dll: default, best for Vista or later.
  2253. * - "d3dcompiler_43.dll: for XP support.
  2254. * - "none": do not load any library, useful if you compiled ANGLE from source
  2255. * and included the compiler in your binaries.
  2256. */
  2257. #define SDL_HINT_VIDEO_WIN_D3DCOMPILER "SDL_VIDEO_WIN_D3DCOMPILER"
  2258. /**
  2259. * A variable controlling whether X11 should use GLX or EGL by default
  2260. *
  2261. * This variable can be set to the following values:
  2262. *
  2263. * - "0": Use GLX
  2264. * - "1": Use EGL
  2265. *
  2266. * By default SDL will use GLX when both are present.
  2267. */
  2268. #define SDL_HINT_VIDEO_X11_FORCE_EGL "SDL_VIDEO_X11_FORCE_EGL"
  2269. /**
  2270. * A variable controlling whether the X11 _NET_WM_BYPASS_COMPOSITOR hint
  2271. * should be used.
  2272. *
  2273. * This variable can be set to the following values:
  2274. *
  2275. * - "0": Disable _NET_WM_BYPASS_COMPOSITOR
  2276. * - "1": Enable _NET_WM_BYPASS_COMPOSITOR
  2277. *
  2278. * By default SDL will use _NET_WM_BYPASS_COMPOSITOR
  2279. */
  2280. #define SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR "SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR"
  2281. /**
  2282. * A variable controlling whether the X11 _NET_WM_PING protocol should be
  2283. * supported.
  2284. *
  2285. * This variable can be set to the following values:
  2286. *
  2287. * - "0": Disable _NET_WM_PING
  2288. * - "1": Enable _NET_WM_PING
  2289. *
  2290. * By default SDL will use _NET_WM_PING, but for applications that know they
  2291. * will not always be able to respond to ping requests in a timely manner they
  2292. * can turn it off to avoid the window manager thinking the app is hung. The
  2293. * hint is checked in CreateWindow.
  2294. */
  2295. #define SDL_HINT_VIDEO_X11_NET_WM_PING "SDL_VIDEO_X11_NET_WM_PING"
  2296. /**
  2297. * A variable forcing the visual ID chosen for new X11 windows
  2298. */
  2299. #define SDL_HINT_VIDEO_X11_WINDOW_VISUALID "SDL_VIDEO_X11_WINDOW_VISUALID"
  2300. /**
  2301. * A no-longer-used variable controlling whether the X11 Xinerama extension
  2302. * should be used.
  2303. *
  2304. * Before SDL 2.0.24, this would let apps and users disable Xinerama support
  2305. * on X11. Now SDL never uses Xinerama, and does not check for this hint at
  2306. * all. The preprocessor define is left here for source compatibility.
  2307. */
  2308. #define SDL_HINT_VIDEO_X11_XINERAMA "SDL_VIDEO_X11_XINERAMA"
  2309. /**
  2310. * A variable controlling whether the X11 XRandR extension should be used.
  2311. *
  2312. * This variable can be set to the following values:
  2313. *
  2314. * - "0": Disable XRandR
  2315. * - "1": Enable XRandR
  2316. *
  2317. * By default SDL will use XRandR.
  2318. */
  2319. #define SDL_HINT_VIDEO_X11_XRANDR "SDL_VIDEO_X11_XRANDR"
  2320. /**
  2321. * A no-longer-used variable controlling whether the X11 VidMode extension
  2322. * should be used.
  2323. *
  2324. * Before SDL 2.0.24, this would let apps and users disable XVidMode support
  2325. * on X11. Now SDL never uses XVidMode, and does not check for this hint at
  2326. * all. The preprocessor define is left here for source compatibility.
  2327. */
  2328. #define SDL_HINT_VIDEO_X11_XVIDMODE "SDL_VIDEO_X11_XVIDMODE"
  2329. /**
  2330. * Controls how the fact chunk affects the loading of a WAVE file.
  2331. *
  2332. * The fact chunk stores information about the number of samples of a WAVE
  2333. * file. The Standards Update from Microsoft notes that this value can be used
  2334. * to 'determine the length of the data in seconds'. This is especially useful
  2335. * for compressed formats (for which this is a mandatory chunk) if they
  2336. * produce multiple sample frames per block and truncating the block is not
  2337. * allowed. The fact chunk can exactly specify how many sample frames there
  2338. * should be in this case.
  2339. *
  2340. * Unfortunately, most application seem to ignore the fact chunk and so SDL
  2341. * ignores it by default as well.
  2342. *
  2343. * This variable can be set to the following values:
  2344. *
  2345. * - "truncate": Use the number of samples to truncate the wave data if the
  2346. * fact chunk is present and valid
  2347. * - "strict": Like "truncate", but raise an error if the fact chunk is
  2348. * invalid, not present for non-PCM formats, or if the data chunk doesn't
  2349. * have that many samples
  2350. * - "ignorezero": Like "truncate", but ignore fact chunk if the number of
  2351. * samples is zero
  2352. * - "ignore": Ignore fact chunk entirely (default)
  2353. */
  2354. #define SDL_HINT_WAVE_FACT_CHUNK "SDL_WAVE_FACT_CHUNK"
  2355. /**
  2356. * Controls how the size of the RIFF chunk affects the loading of a WAVE file.
  2357. *
  2358. * The size of the RIFF chunk (which includes all the sub-chunks of the WAVE
  2359. * file) is not always reliable. In case the size is wrong, it's possible to
  2360. * just ignore it and step through the chunks until a fixed limit is reached.
  2361. *
  2362. * Note that files that have trailing data unrelated to the WAVE file or
  2363. * corrupt files may slow down the loading process without a reliable
  2364. * boundary. By default, SDL stops after 10000 chunks to prevent wasting time.
  2365. * Use the environment variable SDL_WAVE_CHUNK_LIMIT to adjust this value.
  2366. *
  2367. * This variable can be set to the following values:
  2368. *
  2369. * - "force": Always use the RIFF chunk size as a boundary for the chunk
  2370. * search
  2371. * - "ignorezero": Like "force", but a zero size searches up to 4 GiB
  2372. * (default)
  2373. * - "ignore": Ignore the RIFF chunk size and always search up to 4 GiB
  2374. * - "maximum": Search for chunks until the end of file (not recommended)
  2375. */
  2376. #define SDL_HINT_WAVE_RIFF_CHUNK_SIZE "SDL_WAVE_RIFF_CHUNK_SIZE"
  2377. /**
  2378. * Controls how a truncated WAVE file is handled.
  2379. *
  2380. * A WAVE file is considered truncated if any of the chunks are incomplete or
  2381. * the data chunk size is not a multiple of the block size. By default, SDL
  2382. * decodes until the first incomplete block, as most applications seem to do.
  2383. *
  2384. * This variable can be set to the following values:
  2385. *
  2386. * - "verystrict": Raise an error if the file is truncated
  2387. * - "strict": Like "verystrict", but the size of the RIFF chunk is ignored
  2388. * - "dropframe": Decode until the first incomplete sample frame
  2389. * - "dropblock": Decode until the first incomplete block (default)
  2390. */
  2391. #define SDL_HINT_WAVE_TRUNCATION "SDL_WAVE_TRUNCATION"
  2392. /**
  2393. * Tell SDL not to name threads on Windows with the 0x406D1388 Exception.
  2394. *
  2395. * The 0x406D1388 Exception is a trick used to inform Visual Studio of a
  2396. * thread's name, but it tends to cause problems with other debuggers, and the
  2397. * .NET runtime. Note that SDL 2.0.6 and later will still use the (safer)
  2398. * SetThreadDescription API, introduced in the Windows 10 Creators Update, if
  2399. * available.
  2400. *
  2401. * The variable can be set to the following values:
  2402. *
  2403. * - "0": SDL will raise the 0x406D1388 Exception to name threads. This is the
  2404. * default behavior of SDL <= 2.0.4.
  2405. * - "1": SDL will not raise this exception, and threads will be unnamed.
  2406. * (default) This is necessary with .NET languages or debuggers that aren't
  2407. * Visual Studio.
  2408. */
  2409. #define SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING "SDL_WINDOWS_DISABLE_THREAD_NAMING"
  2410. /**
  2411. * Controls whether menus can be opened with their keyboard shortcut
  2412. * (Alt+mnemonic).
  2413. *
  2414. * If the mnemonics are enabled, then menus can be opened by pressing the Alt
  2415. * key and the corresponding mnemonic (for example, Alt+F opens the File
  2416. * menu). However, in case an invalid mnemonic is pressed, Windows makes an
  2417. * audible beep to convey that nothing happened. This is true even if the
  2418. * window has no menu at all!
  2419. *
  2420. * Because most SDL applications don't have menus, and some want to use the
  2421. * Alt key for other purposes, SDL disables mnemonics (and the beeping) by
  2422. * default.
  2423. *
  2424. * Note: This also affects keyboard events: with mnemonics enabled, when a
  2425. * menu is opened from the keyboard, you will not receive a KEYUP event for
  2426. * the mnemonic key, and *might* not receive one for Alt.
  2427. *
  2428. * This variable can be set to the following values:
  2429. *
  2430. * - "0": Alt+mnemonic does nothing, no beeping. (default)
  2431. * - "1": Alt+mnemonic opens menus, invalid mnemonics produce a beep.
  2432. */
  2433. #define SDL_HINT_WINDOWS_ENABLE_MENU_MNEMONICS "SDL_WINDOWS_ENABLE_MENU_MNEMONICS"
  2434. /**
  2435. * A variable controlling whether the windows message loop is processed by SDL
  2436. *
  2437. * This variable can be set to the following values:
  2438. *
  2439. * - "0": The window message loop is not run
  2440. * - "1": The window message loop is processed in SDL_PumpEvents()
  2441. *
  2442. * By default SDL will process the windows message loop
  2443. */
  2444. #define SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP "SDL_WINDOWS_ENABLE_MESSAGELOOP"
  2445. /**
  2446. * Force SDL to use Critical Sections for mutexes on Windows.
  2447. *
  2448. * On Windows 7 and newer, Slim Reader/Writer Locks are available. They offer
  2449. * better performance, allocate no kernel resources and use less memory. SDL
  2450. * will fall back to Critical Sections on older OS versions or if forced to by
  2451. * this hint.
  2452. *
  2453. * This variable can be set to the following values:
  2454. *
  2455. * - "0": Use SRW Locks when available. If not, fall back to Critical
  2456. * Sections. (default)
  2457. * - "1": Force the use of Critical Sections in all cases.
  2458. */
  2459. #define SDL_HINT_WINDOWS_FORCE_MUTEX_CRITICAL_SECTIONS "SDL_WINDOWS_FORCE_MUTEX_CRITICAL_SECTIONS"
  2460. /**
  2461. * Force SDL to use Kernel Semaphores on Windows.
  2462. *
  2463. * Kernel Semaphores are inter-process and require a context switch on every
  2464. * interaction. On Windows 8 and newer, the WaitOnAddress API is available.
  2465. * Using that and atomics to implement semaphores increases performance. SDL
  2466. * will fall back to Kernel Objects on older OS versions or if forced to by
  2467. * this hint.
  2468. *
  2469. * This variable can be set to the following values:
  2470. *
  2471. * - "0": Use Atomics and WaitOnAddress API when available. If not, fall back
  2472. * to Kernel Objects. (default)
  2473. * - "1": Force the use of Kernel Objects in all cases.
  2474. */
  2475. #define SDL_HINT_WINDOWS_FORCE_SEMAPHORE_KERNEL "SDL_WINDOWS_FORCE_SEMAPHORE_KERNEL"
  2476. /**
  2477. * A variable to specify custom icon resource id from RC file on Windows
  2478. * platform
  2479. */
  2480. #define SDL_HINT_WINDOWS_INTRESOURCE_ICON "SDL_WINDOWS_INTRESOURCE_ICON"
  2481. /**
  2482. * A variable to specify custom icon resource id from RC file on Windows
  2483. * platform
  2484. */
  2485. #define SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL "SDL_WINDOWS_INTRESOURCE_ICON_SMALL"
  2486. /**
  2487. * Tell SDL not to generate window-close events for Alt+F4 on Windows.
  2488. *
  2489. * The variable can be set to the following values:
  2490. *
  2491. * - "0": SDL will generate a window-close event when it sees Alt+F4.
  2492. * - "1": SDL will only do normal key handling for Alt+F4.
  2493. */
  2494. #define SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4 "SDL_WINDOWS_NO_CLOSE_ON_ALT_F4"
  2495. /**
  2496. * Use the D3D9Ex API introduced in Windows Vista, instead of normal D3D9.
  2497. *
  2498. * Direct3D 9Ex contains changes to state management that can eliminate device
  2499. * loss errors during scenarios like Alt+Tab or UAC prompts. D3D9Ex may
  2500. * require some changes to your application to cope with the new behavior, so
  2501. * this is disabled by default.
  2502. *
  2503. * This hint must be set before initializing the video subsystem.
  2504. *
  2505. * For more information on Direct3D 9Ex, see: -
  2506. * https://docs.microsoft.com/en-us/windows/win32/direct3darticles/graphics-apis-in-windows-vista#direct3d-9ex
  2507. * -
  2508. * https://docs.microsoft.com/en-us/windows/win32/direct3darticles/direct3d-9ex-improvements
  2509. *
  2510. * This variable can be set to the following values:
  2511. *
  2512. * - "0": Use the original Direct3D 9 API (default)
  2513. * - "1": Use the Direct3D 9Ex API on Vista and later (and fall back if D3D9Ex
  2514. * is unavailable)
  2515. */
  2516. #define SDL_HINT_WINDOWS_USE_D3D9EX "SDL_WINDOWS_USE_D3D9EX"
  2517. /**
  2518. * Controls whether SDL will declare the process to be DPI aware.
  2519. *
  2520. * This hint must be set before initializing the video subsystem.
  2521. *
  2522. * The main purpose of declaring DPI awareness is to disable OS bitmap scaling
  2523. * of SDL windows on monitors with a DPI scale factor.
  2524. *
  2525. * This hint is equivalent to requesting DPI awareness via external means
  2526. * (e.g. calling SetProcessDpiAwarenessContext) and does not cause SDL to use
  2527. * a virtualized coordinate system, so it will generally give you 1 SDL
  2528. * coordinate = 1 pixel even on high-DPI displays.
  2529. *
  2530. * For more information, see:
  2531. * https://docs.microsoft.com/en-us/windows/win32/hidpi/high-dpi-desktop-application-development-on-windows
  2532. *
  2533. * This variable can be set to the following values:
  2534. *
  2535. * - "": Do not change the DPI awareness (default).
  2536. * - "unaware": Declare the process as DPI unaware. (Windows 8.1 and later).
  2537. * - "system": Request system DPI awareness. (Vista and later).
  2538. * - "permonitor": Request per-monitor DPI awareness. (Windows 8.1 and later).
  2539. * - "permonitorv2": Request per-monitor V2 DPI awareness. (Windows 10,
  2540. * version 1607 and later). The most visible difference from "permonitor" is
  2541. * that window title bar will be scaled to the visually correct size when
  2542. * dragging between monitors with different scale factors. This is the
  2543. * preferred DPI awareness level.
  2544. *
  2545. * If the requested DPI awareness is not available on the currently running
  2546. * OS, SDL will try to request the best available match.
  2547. */
  2548. #define SDL_HINT_WINDOWS_DPI_AWARENESS "SDL_WINDOWS_DPI_AWARENESS"
  2549. /**
  2550. * Uses DPI-scaled points as the SDL coordinate system on Windows.
  2551. *
  2552. * This changes the SDL coordinate system units to be DPI-scaled points,
  2553. * rather than pixels everywhere. This means windows will be appropriately
  2554. * sized, even when created on high-DPI displays with scaling.
  2555. *
  2556. * e.g. requesting a 640x480 window from SDL, on a display with 125% scaling
  2557. * in Windows display settings, will create a window with an 800x600 client
  2558. * area (in pixels).
  2559. *
  2560. * Setting this to "1" implicitly requests process DPI awareness (setting
  2561. * SDL_WINDOWS_DPI_AWARENESS is unnecessary), and forces
  2562. * SDL_WINDOW_ALLOW_HIGHDPI on all windows.
  2563. *
  2564. * This variable can be set to the following values:
  2565. *
  2566. * - "0": SDL coordinates equal Windows coordinates. No automatic window
  2567. * resizing when dragging between monitors with different scale factors
  2568. * (unless this is performed by Windows itself, which is the case when the
  2569. * process is DPI unaware).
  2570. * - "1": SDL coordinates are in DPI-scaled points. Automatically resize
  2571. * windows as needed on displays with non-100% scale factors.
  2572. */
  2573. #define SDL_HINT_WINDOWS_DPI_SCALING "SDL_WINDOWS_DPI_SCALING"
  2574. /**
  2575. * A variable controlling whether the window frame and title bar are
  2576. * interactive when the cursor is hidden
  2577. *
  2578. * This variable can be set to the following values:
  2579. *
  2580. * - "0": The window frame is not interactive when the cursor is hidden (no
  2581. * move, resize, etc)
  2582. * - "1": The window frame is interactive when the cursor is hidden
  2583. *
  2584. * By default SDL will allow interaction with the window frame when the cursor
  2585. * is hidden
  2586. */
  2587. #define SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN "SDL_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN"
  2588. /**
  2589. * A variable controlling whether the window is activated when the
  2590. * SDL_ShowWindow function is called
  2591. *
  2592. * This variable can be set to the following values:
  2593. *
  2594. * - "0": The window is activated when the SDL_ShowWindow function is called
  2595. * - "1": The window is not activated when the SDL_ShowWindow function is
  2596. * called
  2597. *
  2598. * By default SDL will activate the window when the SDL_ShowWindow function is
  2599. * called
  2600. */
  2601. #define SDL_HINT_WINDOW_NO_ACTIVATION_WHEN_SHOWN "SDL_WINDOW_NO_ACTIVATION_WHEN_SHOWN"
  2602. /** Allows back-button-press events on Windows Phone to be marked as handled
  2603. *
  2604. * Windows Phone devices typically feature a Back button. When pressed,
  2605. * the OS will emit back-button-press events, which apps are expected to
  2606. * handle in an appropriate manner. If apps do not explicitly mark these
  2607. * events as 'Handled', then the OS will invoke its default behavior for
  2608. * unhandled back-button-press events, which on Windows Phone 8 and 8.1 is to
  2609. * terminate the app (and attempt to switch to the previous app, or to the
  2610. * device's home screen).
  2611. *
  2612. * Setting the SDL_HINT_WINRT_HANDLE_BACK_BUTTON hint to "1" will cause SDL
  2613. * to mark back-button-press events as Handled, if and when one is sent to
  2614. * the app.
  2615. *
  2616. * Internally, Windows Phone sends back button events as parameters to
  2617. * special back-button-press callback functions. Apps that need to respond
  2618. * to back-button-press events are expected to register one or more
  2619. * callback functions for such, shortly after being launched (during the
  2620. * app's initialization phase). After the back button is pressed, the OS
  2621. * will invoke these callbacks. If the app's callback(s) do not explicitly
  2622. * mark the event as handled by the time they return, or if the app never
  2623. * registers one of these callback, the OS will consider the event
  2624. * un-handled, and it will apply its default back button behavior (terminate
  2625. * the app).
  2626. *
  2627. * SDL registers its own back-button-press callback with the Windows Phone
  2628. * OS. This callback will emit a pair of SDL key-press events (SDL_KEYDOWN
  2629. * and SDL_KEYUP), each with a scancode of SDL_SCANCODE_AC_BACK, after which
  2630. * it will check the contents of the hint, SDL_HINT_WINRT_HANDLE_BACK_BUTTON.
  2631. * If the hint's value is set to "1", the back button event's Handled
  2632. * property will get set to 'true'. If the hint's value is set to something
  2633. * else, or if it is unset, SDL will leave the event's Handled property
  2634. * alone. (By default, the OS sets this property to 'false', to note.)
  2635. *
  2636. * SDL apps can either set SDL_HINT_WINRT_HANDLE_BACK_BUTTON well before a
  2637. * back button is pressed, or can set it in direct-response to a back button
  2638. * being pressed.
  2639. *
  2640. * In order to get notified when a back button is pressed, SDL apps should
  2641. * register a callback function with SDL_AddEventWatch(), and have it listen
  2642. * for SDL_KEYDOWN events that have a scancode of SDL_SCANCODE_AC_BACK.
  2643. * (Alternatively, SDL_KEYUP events can be listened-for. Listening for
  2644. * either event type is suitable.) Any value of SDL_HINT_WINRT_HANDLE_BACK_BUTTON
  2645. * set by such a callback, will be applied to the OS' current
  2646. * back-button-press event.
  2647. *
  2648. * More details on back button behavior in Windows Phone apps can be found
  2649. * at the following page, on Microsoft's developer site:
  2650. *
  2651. * http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj247550(v=vs.105).aspx
  2652. */
  2653. #define SDL_HINT_WINRT_HANDLE_BACK_BUTTON "SDL_WINRT_HANDLE_BACK_BUTTON"
  2654. /** Label text for a WinRT app's privacy policy link
  2655. *
  2656. * Network-enabled WinRT apps must include a privacy policy. On Windows 8, 8.1, and RT,
  2657. * Microsoft mandates that this policy be available via the Windows Settings charm.
  2658. * SDL provides code to add a link there, with its label text being set via the
  2659. * optional hint, SDL_HINT_WINRT_PRIVACY_POLICY_LABEL.
  2660. *
  2661. * Please note that a privacy policy's contents are not set via this hint. A separate
  2662. * hint, SDL_HINT_WINRT_PRIVACY_POLICY_URL, is used to link to the actual text of the
  2663. * policy.
  2664. *
  2665. * The contents of this hint should be encoded as a UTF8 string.
  2666. *
  2667. * The default value is "Privacy Policy". This hint should only be set during app
  2668. * initialization, preferably before any calls to SDL_Init().
  2669. *
  2670. * For additional information on linking to a privacy policy, see the documentation for
  2671. * SDL_HINT_WINRT_PRIVACY_POLICY_URL.
  2672. */
  2673. #define SDL_HINT_WINRT_PRIVACY_POLICY_LABEL "SDL_WINRT_PRIVACY_POLICY_LABEL"
  2674. /**
  2675. * A URL to a WinRT app's privacy policy
  2676. *
  2677. * All network-enabled WinRT apps must make a privacy policy available to its
  2678. * users. On Windows 8, 8.1, and RT, Microsoft mandates that this policy be be
  2679. * available in the Windows Settings charm, as accessed from within the app.
  2680. * SDL provides code to add a URL-based link there, which can point to the
  2681. * app's privacy policy.
  2682. *
  2683. * To setup a URL to an app's privacy policy, set
  2684. * SDL_HINT_WINRT_PRIVACY_POLICY_URL before calling any SDL_Init() functions.
  2685. * The contents of the hint should be a valid URL. For example,
  2686. * "http://www.example.com".
  2687. *
  2688. * The default value is "", which will prevent SDL from adding a privacy
  2689. * policy link to the Settings charm. This hint should only be set during app
  2690. * init.
  2691. *
  2692. * The label text of an app's "Privacy Policy" link may be customized via
  2693. * another hint, SDL_HINT_WINRT_PRIVACY_POLICY_LABEL.
  2694. *
  2695. * Please note that on Windows Phone, Microsoft does not provide standard UI
  2696. * for displaying a privacy policy link, and as such,
  2697. * SDL_HINT_WINRT_PRIVACY_POLICY_URL will not get used on that platform.
  2698. * Network-enabled phone apps should display their privacy policy through some
  2699. * other, in-app means.
  2700. */
  2701. #define SDL_HINT_WINRT_PRIVACY_POLICY_URL "SDL_WINRT_PRIVACY_POLICY_URL"
  2702. /**
  2703. * Mark X11 windows as override-redirect.
  2704. *
  2705. * If set, this _might_ increase framerate at the expense of the desktop not
  2706. * working as expected. Override-redirect windows aren't noticed by the window
  2707. * manager at all.
  2708. *
  2709. * You should probably only use this for fullscreen windows, and you probably
  2710. * shouldn't even use it for that. But it's here if you want to try!
  2711. */
  2712. #define SDL_HINT_X11_FORCE_OVERRIDE_REDIRECT "SDL_X11_FORCE_OVERRIDE_REDIRECT"
  2713. /**
  2714. * A variable that lets you disable the detection and use of Xinput gamepad
  2715. * devices
  2716. *
  2717. * The variable can be set to the following values:
  2718. *
  2719. * - "0": Disable XInput detection (only uses direct input)
  2720. * - "1": Enable XInput detection (the default)
  2721. */
  2722. #define SDL_HINT_XINPUT_ENABLED "SDL_XINPUT_ENABLED"
  2723. /**
  2724. * A variable that lets you disable the detection and use of DirectInput
  2725. * gamepad devices
  2726. *
  2727. * The variable can be set to the following values:
  2728. *
  2729. * - "0": Disable DirectInput detection (only uses XInput)
  2730. * - "1": Enable DirectInput detection (the default)
  2731. */
  2732. #define SDL_HINT_DIRECTINPUT_ENABLED "SDL_DIRECTINPUT_ENABLED"
  2733. /**
  2734. * A variable that causes SDL to use the old axis and button mapping for
  2735. * XInput devices.
  2736. *
  2737. * This hint is for backwards compatibility only and will be removed in SDL
  2738. * 2.1
  2739. *
  2740. * The default value is "0". This hint must be set before SDL_Init()
  2741. */
  2742. #define SDL_HINT_XINPUT_USE_OLD_JOYSTICK_MAPPING "SDL_XINPUT_USE_OLD_JOYSTICK_MAPPING"
  2743. /**
  2744. * A variable that causes SDL to not ignore audio "monitors"
  2745. *
  2746. * This is currently only used for PulseAudio and ignored elsewhere.
  2747. *
  2748. * By default, SDL ignores audio devices that aren't associated with physical
  2749. * hardware. Changing this hint to "1" will expose anything SDL sees that
  2750. * appears to be an audio source or sink. This will add "devices" to the list
  2751. * that the user probably doesn't want or need, but it can be useful in
  2752. * scenarios where you want to hook up SDL to some sort of virtual device,
  2753. * etc.
  2754. *
  2755. * The default value is "0". This hint must be set before SDL_Init().
  2756. *
  2757. * This hint is available since SDL 2.0.16. Before then, virtual devices are
  2758. * always ignored.
  2759. */
  2760. #define SDL_HINT_AUDIO_INCLUDE_MONITORS "SDL_AUDIO_INCLUDE_MONITORS"
  2761. /**
  2762. * A variable that forces X11 windows to create as a custom type.
  2763. *
  2764. * This is currently only used for X11 and ignored elsewhere.
  2765. *
  2766. * During SDL_CreateWindow, SDL uses the _NET_WM_WINDOW_TYPE X11 property to
  2767. * report to the window manager the type of window it wants to create. This
  2768. * might be set to various things if SDL_WINDOW_TOOLTIP or
  2769. * SDL_WINDOW_POPUP_MENU, etc, were specified. For "normal" windows that
  2770. * haven't set a specific type, this hint can be used to specify a custom
  2771. * type. For example, a dock window might set this to
  2772. * "_NET_WM_WINDOW_TYPE_DOCK".
  2773. *
  2774. * If not set or set to "", this hint is ignored. This hint must be set before
  2775. * the SDL_CreateWindow() call that it is intended to affect.
  2776. *
  2777. * This hint is available since SDL 2.0.22.
  2778. */
  2779. #define SDL_HINT_X11_WINDOW_TYPE "SDL_X11_WINDOW_TYPE"
  2780. /**
  2781. * A variable that decides whether to send SDL_QUIT when closing the final
  2782. * window.
  2783. *
  2784. * By default, SDL sends an SDL_QUIT event when there is only one window and
  2785. * it receives an SDL_WINDOWEVENT_CLOSE event, under the assumption most apps
  2786. * would also take the loss of this window as a signal to terminate the
  2787. * program.
  2788. *
  2789. * However, it's not unreasonable in some cases to have the program continue
  2790. * to live on, perhaps to create new windows later.
  2791. *
  2792. * Changing this hint to "0" will cause SDL to not send an SDL_QUIT event when
  2793. * the final window is requesting to close. Note that in this case, there are
  2794. * still other legitimate reasons one might get an SDL_QUIT event: choosing
  2795. * "Quit" from the macOS menu bar, sending a SIGINT (ctrl-c) on Unix, etc.
  2796. *
  2797. * The default value is "1". This hint can be changed at any time.
  2798. *
  2799. * This hint is available since SDL 2.0.22. Before then, you always get an
  2800. * SDL_QUIT event when closing the final window.
  2801. */
  2802. #define SDL_HINT_QUIT_ON_LAST_WINDOW_CLOSE "SDL_QUIT_ON_LAST_WINDOW_CLOSE"
  2803. /**
  2804. * A variable that decides what video backend to use.
  2805. *
  2806. * By default, SDL will try all available video backends in a reasonable order
  2807. * until it finds one that can work, but this hint allows the app or user to
  2808. * force a specific target, such as "x11" if, say, you are on Wayland but want
  2809. * to try talking to the X server instead.
  2810. *
  2811. * This functionality has existed since SDL 2.0.0 (indeed, before that) but
  2812. * before 2.0.22 this was an environment variable only. In 2.0.22, it was
  2813. * upgraded to a full SDL hint, so you can set the environment variable as
  2814. * usual or programatically set the hint with SDL_SetHint, which won't
  2815. * propagate to child processes.
  2816. *
  2817. * The default value is unset, in which case SDL will try to figure out the
  2818. * best video backend on your behalf. This hint needs to be set before
  2819. * SDL_Init() is called to be useful.
  2820. *
  2821. * This hint is available since SDL 2.0.22. Before then, you could set the
  2822. * environment variable to get the same effect.
  2823. */
  2824. #define SDL_HINT_VIDEODRIVER "SDL_VIDEODRIVER"
  2825. /**
  2826. * A variable that decides what audio backend to use.
  2827. *
  2828. * By default, SDL will try all available audio backends in a reasonable order
  2829. * until it finds one that can work, but this hint allows the app or user to
  2830. * force a specific target, such as "alsa" if, say, you are on PulseAudio but
  2831. * want to try talking to the lower level instead.
  2832. *
  2833. * This functionality has existed since SDL 2.0.0 (indeed, before that) but
  2834. * before 2.0.22 this was an environment variable only. In 2.0.22, it was
  2835. * upgraded to a full SDL hint, so you can set the environment variable as
  2836. * usual or programatically set the hint with SDL_SetHint, which won't
  2837. * propagate to child processes.
  2838. *
  2839. * The default value is unset, in which case SDL will try to figure out the
  2840. * best audio backend on your behalf. This hint needs to be set before
  2841. * SDL_Init() is called to be useful.
  2842. *
  2843. * This hint is available since SDL 2.0.22. Before then, you could set the
  2844. * environment variable to get the same effect.
  2845. */
  2846. #define SDL_HINT_AUDIODRIVER "SDL_AUDIODRIVER"
  2847. /**
  2848. * A variable that decides what KMSDRM device to use.
  2849. *
  2850. * Internally, SDL might open something like "/dev/dri/cardNN" to access
  2851. * KMSDRM functionality, where "NN" is a device index number.
  2852. *
  2853. * SDL makes a guess at the best index to use (usually zero), but the app or
  2854. * user can set this hint to a number between 0 and 99 to force selection.
  2855. *
  2856. * This hint is available since SDL 2.24.0.
  2857. */
  2858. #define SDL_HINT_KMSDRM_DEVICE_INDEX "SDL_KMSDRM_DEVICE_INDEX"
  2859. /**
  2860. * A variable that treats trackpads as touch devices.
  2861. *
  2862. * On macOS (and possibly other platforms in the future), SDL will report
  2863. * touches on a trackpad as mouse input, which is generally what users expect
  2864. * from this device; however, these are often actually full multitouch-capable
  2865. * touch devices, so it might be preferable to some apps to treat them as
  2866. * such.
  2867. *
  2868. * Setting this hint to true will make the trackpad input report as a
  2869. * multitouch device instead of a mouse. The default is false.
  2870. *
  2871. * Note that most platforms don't support this hint. As of 2.24.0, it only
  2872. * supports MacBooks' trackpads on macOS. Others may follow later.
  2873. *
  2874. * This hint is checked during SDL_Init and can not be changed after.
  2875. *
  2876. * This hint is available since SDL 2.24.0.
  2877. */
  2878. #define SDL_HINT_TRACKPAD_IS_TOUCH_ONLY "SDL_TRACKPAD_IS_TOUCH_ONLY"
  2879. /**
  2880. * Cause SDL to call dbus_shutdown() on quit.
  2881. *
  2882. * This is useful as a debug tool to validate memory leaks, but shouldn't ever
  2883. * be set in production applications, as other libraries used by the
  2884. * application might use dbus under the hood and this cause cause crashes if
  2885. * they continue after SDL_Quit().
  2886. *
  2887. * This variable can be set to the following values:
  2888. *
  2889. * - "0": SDL will not call dbus_shutdown() on quit (default)
  2890. * - "1": SDL will call dbus_shutdown() on quit
  2891. *
  2892. * This hint is available since SDL 2.30.0.
  2893. */
  2894. #define SDL_HINT_SHUTDOWN_DBUS_ON_QUIT "SDL_SHUTDOWN_DBUS_ON_QUIT"
  2895. /**
  2896. * Specify if SDL_RWFromFile should use the resource dir on Apple platforms.
  2897. *
  2898. * SDL2 has always done this on Apple platforms, but it can be surprising to
  2899. * try opening a path to discover that SDL adjusts the path to elsewhere, so
  2900. * this hint allows that behavior to be disabled.
  2901. *
  2902. * If running from a App Bundle, this will be MyApp.app/Contents/Resources. If
  2903. * running as a normal Unix-like process, this will be the directory where the
  2904. * running binary lives. Setting this hint to 0 avoids this and just uses the
  2905. * requested path as-is.
  2906. *
  2907. * This variable can be set to the following values:
  2908. *
  2909. * - "0": SDL will not use the app resource directory.
  2910. * - "1": SDL will use the app's resource directory (default).
  2911. *
  2912. * This hint is available since SDL 2.32.0.
  2913. */
  2914. #define SDL_HINT_APPLE_RWFROMFILE_USE_RESOURCES "SDL_APPLE_RWFROMFILE_USE_RESOURCES"
  2915. /**
  2916. * An enumeration of hint priorities
  2917. */
  2918. typedef enum SDL_HintPriority
  2919. {
  2920. SDL_HINT_DEFAULT,
  2921. SDL_HINT_NORMAL,
  2922. SDL_HINT_OVERRIDE
  2923. } SDL_HintPriority;
  2924. /**
  2925. * Set a hint with a specific priority.
  2926. *
  2927. * The priority controls the behavior when setting a hint that already has a
  2928. * value. Hints will replace existing hints of their priority and lower.
  2929. * Environment variables are considered to have override priority.
  2930. *
  2931. * \param name the hint to set.
  2932. * \param value the value of the hint variable.
  2933. * \param priority the SDL_HintPriority level for the hint.
  2934. * \returns SDL_TRUE if the hint was set, SDL_FALSE otherwise.
  2935. *
  2936. * \since This function is available since SDL 2.0.0.
  2937. *
  2938. * \sa SDL_GetHint
  2939. * \sa SDL_SetHint
  2940. */
  2941. extern DECLSPEC SDL_bool SDLCALL SDL_SetHintWithPriority(const char *name,
  2942. const char *value,
  2943. SDL_HintPriority priority);
  2944. /**
  2945. * Set a hint with normal priority.
  2946. *
  2947. * Hints will not be set if there is an existing override hint or environment
  2948. * variable that takes precedence. You can use SDL_SetHintWithPriority() to
  2949. * set the hint with override priority instead.
  2950. *
  2951. * \param name the hint to set.
  2952. * \param value the value of the hint variable.
  2953. * \returns SDL_TRUE if the hint was set, SDL_FALSE otherwise.
  2954. *
  2955. * \since This function is available since SDL 2.0.0.
  2956. *
  2957. * \sa SDL_GetHint
  2958. * \sa SDL_SetHintWithPriority
  2959. */
  2960. extern DECLSPEC SDL_bool SDLCALL SDL_SetHint(const char *name,
  2961. const char *value);
  2962. /**
  2963. * Reset a hint to the default value.
  2964. *
  2965. * This will reset a hint to the value of the environment variable, or NULL if
  2966. * the environment isn't set. Callbacks will be called normally with this
  2967. * change.
  2968. *
  2969. * \param name the hint to set.
  2970. * \returns SDL_TRUE if the hint was set, SDL_FALSE otherwise.
  2971. *
  2972. * \since This function is available since SDL 2.24.0.
  2973. *
  2974. * \sa SDL_GetHint
  2975. * \sa SDL_SetHint
  2976. */
  2977. extern DECLSPEC SDL_bool SDLCALL SDL_ResetHint(const char *name);
  2978. /**
  2979. * Reset all hints to the default values.
  2980. *
  2981. * This will reset all hints to the value of the associated environment
  2982. * variable, or NULL if the environment isn't set. Callbacks will be called
  2983. * normally with this change.
  2984. *
  2985. * \since This function is available since SDL 2.26.0.
  2986. *
  2987. * \sa SDL_GetHint
  2988. * \sa SDL_SetHint
  2989. * \sa SDL_ResetHint
  2990. */
  2991. extern DECLSPEC void SDLCALL SDL_ResetHints(void);
  2992. /**
  2993. * Get the value of a hint.
  2994. *
  2995. * \param name the hint to query.
  2996. * \returns the string value of a hint or NULL if the hint isn't set.
  2997. *
  2998. * \since This function is available since SDL 2.0.0.
  2999. *
  3000. * \sa SDL_SetHint
  3001. * \sa SDL_SetHintWithPriority
  3002. */
  3003. extern DECLSPEC const char * SDLCALL SDL_GetHint(const char *name);
  3004. /**
  3005. * Get the boolean value of a hint variable.
  3006. *
  3007. * \param name the name of the hint to get the boolean value from.
  3008. * \param default_value the value to return if the hint does not exist.
  3009. * \returns the boolean value of a hint or the provided default value if the
  3010. * hint does not exist.
  3011. *
  3012. * \since This function is available since SDL 2.0.5.
  3013. *
  3014. * \sa SDL_GetHint
  3015. * \sa SDL_SetHint
  3016. */
  3017. extern DECLSPEC SDL_bool SDLCALL SDL_GetHintBoolean(const char *name, SDL_bool default_value);
  3018. /**
  3019. * Type definition of the hint callback function.
  3020. *
  3021. * \param userdata what was passed as `userdata` to SDL_AddHintCallback().
  3022. * \param name what was passed as `name` to SDL_AddHintCallback().
  3023. * \param oldValue the previous hint value.
  3024. * \param newValue the new value hint is to be set to.
  3025. */
  3026. typedef void (SDLCALL *SDL_HintCallback)(void *userdata, const char *name, const char *oldValue, const char *newValue);
  3027. /**
  3028. * Add a function to watch a particular hint.
  3029. *
  3030. * \param name the hint to watch.
  3031. * \param callback An SDL_HintCallback function that will be called when the
  3032. * hint value changes.
  3033. * \param userdata a pointer to pass to the callback function.
  3034. *
  3035. * \since This function is available since SDL 2.0.0.
  3036. *
  3037. * \sa SDL_DelHintCallback
  3038. */
  3039. extern DECLSPEC void SDLCALL SDL_AddHintCallback(const char *name,
  3040. SDL_HintCallback callback,
  3041. void *userdata);
  3042. /**
  3043. * Remove a function watching a particular hint.
  3044. *
  3045. * \param name the hint being watched.
  3046. * \param callback An SDL_HintCallback function that will be called when the
  3047. * hint value changes.
  3048. * \param userdata a pointer being passed to the callback function.
  3049. *
  3050. * \since This function is available since SDL 2.0.0.
  3051. *
  3052. * \sa SDL_AddHintCallback
  3053. */
  3054. extern DECLSPEC void SDLCALL SDL_DelHintCallback(const char *name,
  3055. SDL_HintCallback callback,
  3056. void *userdata);
  3057. /**
  3058. * Clear all hints.
  3059. *
  3060. * This function is automatically called during SDL_Quit(), and deletes all
  3061. * callbacks without calling them and frees all memory associated with hints.
  3062. * If you're calling this from application code you probably want to call
  3063. * SDL_ResetHints() instead.
  3064. *
  3065. * This function will be removed from the API the next time we rev the ABI.
  3066. *
  3067. * \since This function is available since SDL 2.0.0.
  3068. *
  3069. * \sa SDL_ResetHints
  3070. */
  3071. extern DECLSPEC void SDLCALL SDL_ClearHints(void);
  3072. /* Ends C function definitions when using C++ */
  3073. #ifdef __cplusplus
  3074. }
  3075. #endif
  3076. #include "close_code.h"
  3077. #endif /* SDL_hints_h_ */
  3078. /* vi: set ts=4 sw=4 expandtab: */