SDL_hints.h 105 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521
  1. /*
  2. Simple DirectMedia Layer
  3. Copyright (C) 1997-2023 Sam Lantinga <[email protected]>
  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. * \file SDL_hints.h
  20. *
  21. * \brief Official documentation for SDL configuration variables
  22. *
  23. * This file contains functions to set and get configuration hints,
  24. * as well as listing each of them alphabetically.
  25. *
  26. * The convention for naming hints is SDL_HINT_X, where "SDL_X" is
  27. * the 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
  30. * supported or applicable on any given platform, but they provide
  31. * a way for an application or user to give the library a hint as
  32. * to how they would like the library to work.
  33. */
  34. #ifndef SDL_hints_h_
  35. #define SDL_hints_h_
  36. #include <SDL3/SDL_stdinc.h>
  37. #include <SDL3/SDL_begin_code.h>
  38. /* Set up for C function definitions, even when using C++ */
  39. #ifdef __cplusplus
  40. extern "C" {
  41. #endif
  42. /**
  43. * \brief A variable controlling whether the Android / iOS built-in
  44. * accelerometer should be listed as a joystick device.
  45. *
  46. * This variable can be set to the following values:
  47. * "0" - The accelerometer is not listed as a joystick
  48. * "1" - The accelerometer is available as a 3 axis joystick (the default).
  49. */
  50. #define SDL_HINT_ACCELEROMETER_AS_JOYSTICK "SDL_ACCELEROMETER_AS_JOYSTICK"
  51. /**
  52. * \brief Specify the behavior of Alt+Tab while the keyboard is grabbed.
  53. *
  54. * By default, SDL emulates Alt+Tab functionality while the keyboard is grabbed
  55. * and your window is full-screen. This prevents the user from getting stuck in
  56. * your application if you've enabled keyboard grab.
  57. *
  58. * The variable can be set to the following values:
  59. * "0" - SDL will not handle Alt+Tab. Your application is responsible
  60. for handling Alt+Tab while the keyboard is grabbed.
  61. * "1" - SDL will minimize your window when Alt+Tab is pressed (default)
  62. */
  63. #define SDL_HINT_ALLOW_ALT_TAB_WHILE_GRABBED "SDL_ALLOW_ALT_TAB_WHILE_GRABBED"
  64. /**
  65. * \brief If set to "0" then never set the top most bit on a SDL Window, even if the video mode expects it.
  66. * This is a debugging aid for developers and not expected to be used by end users. The default is "1"
  67. *
  68. * This variable can be set to the following values:
  69. * "0" - don't allow topmost
  70. * "1" - allow topmost
  71. */
  72. #define SDL_HINT_ALLOW_TOPMOST "SDL_ALLOW_TOPMOST"
  73. /**
  74. * \brief Android APK expansion main file version. Should be a string number like "1", "2" etc.
  75. *
  76. * Must be set together with SDL_HINT_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION.
  77. *
  78. * If both hints were set then SDL_RWFromFile() will look into expansion files
  79. * after a given relative path was not found in the internal storage and assets.
  80. *
  81. * By default this hint is not set and the APK expansion files are not searched.
  82. */
  83. #define SDL_HINT_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION "SDL_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION"
  84. /**
  85. * \brief Android APK expansion patch file version. Should be a string number like "1", "2" etc.
  86. *
  87. * Must be set together with SDL_HINT_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION.
  88. *
  89. * If both hints were set then SDL_RWFromFile() will look into expansion files
  90. * after a given relative path was not found in the internal storage and assets.
  91. *
  92. * By default this hint is not set and the APK expansion files are not searched.
  93. */
  94. #define SDL_HINT_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION "SDL_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION"
  95. /**
  96. * \brief A variable to control whether the event loop will block itself when the app is paused.
  97. *
  98. * The variable can be set to the following values:
  99. * "0" - Non blocking.
  100. * "1" - Blocking. (default)
  101. *
  102. * The value should be set before SDL is initialized.
  103. */
  104. #define SDL_HINT_ANDROID_BLOCK_ON_PAUSE "SDL_ANDROID_BLOCK_ON_PAUSE"
  105. /**
  106. * \brief A variable to control whether SDL will pause audio in background
  107. * (Requires SDL_ANDROID_BLOCK_ON_PAUSE as "Non blocking")
  108. *
  109. * The variable can be set to the following values:
  110. * "0" - Non paused.
  111. * "1" - Paused. (default)
  112. *
  113. * The value should be set before SDL is initialized.
  114. */
  115. #define SDL_HINT_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO "SDL_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO"
  116. /**
  117. * \brief A variable to control whether we trap the Android back button to handle it manually.
  118. * This is necessary for the right mouse button to work on some Android devices, or
  119. * to be able to trap the back button for use in your code reliably. If set to true,
  120. * the back button will show up as an SDL_EVENT_KEY_DOWN / SDL_EVENT_KEY_UP pair with a keycode of
  121. * SDL_SCANCODE_AC_BACK.
  122. *
  123. * The variable can be set to the following values:
  124. * "0" - Back button will be handled as usual for system. (default)
  125. * "1" - Back button will be trapped, allowing you to handle the key press
  126. * manually. (This will also let right mouse click work on systems
  127. * where the right mouse button functions as back.)
  128. *
  129. * The value of this hint is used at runtime, so it can be changed at any time.
  130. */
  131. #define SDL_HINT_ANDROID_TRAP_BACK_BUTTON "SDL_ANDROID_TRAP_BACK_BUTTON"
  132. /**
  133. * \brief A variable to control whether SDL activity is allowed to be re-created.
  134. * If so, java static datas and static datas from native libraries remain with their current values.
  135. * When not allowed, the activity terminates with exit(0) to be fully re-initialized afterward.
  136. *
  137. * The variable can be set to the following values:
  138. * "0" - Not allowed. (default)
  139. * "1" - Allowed.
  140. *
  141. * The value of this hint is used at runtime, so it can be changed at any time.
  142. */
  143. #define SDL_HINT_ANDROID_ALLOW_RECREATE_ACTIVITY "SDL_ANDROID_ALLOW_RECREATE_ACTIVITY"
  144. /**
  145. * \brief Specify an application name.
  146. *
  147. * This hint lets you specify the application name sent to the OS when
  148. * required. For example, this will often appear in volume control applets for
  149. * audio streams, and in lists of applications which are inhibiting the
  150. * screensaver. You should use a string that describes your program ("My Game
  151. * 2: The Revenge")
  152. *
  153. * Setting this to "" or leaving it unset will have SDL use a reasonable
  154. * default: probably the application's name or "SDL Application" if SDL
  155. * doesn't have any better information.
  156. *
  157. * Note that, for audio streams, this can be overridden with
  158. * SDL_HINT_AUDIO_DEVICE_APP_NAME.
  159. *
  160. * On targets where this is not supported, this hint does nothing.
  161. */
  162. #define SDL_HINT_APP_NAME "SDL_APP_NAME"
  163. /**
  164. * \brief A variable controlling whether controllers used with the Apple TV
  165. * generate UI events.
  166. *
  167. * When UI events are generated by controller input, the app will be
  168. * backgrounded when the Apple TV remote's menu button is pressed, and when the
  169. * pause or B buttons on gamepads are pressed.
  170. *
  171. * More information about properly making use of controllers for the Apple TV
  172. * can be found here:
  173. * https://developer.apple.com/tvos/human-interface-guidelines/remote-and-controllers/
  174. *
  175. * This variable can be set to the following values:
  176. * "0" - Controller input does not generate UI events (the default).
  177. * "1" - Controller input generates UI events.
  178. */
  179. #define SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS "SDL_APPLE_TV_CONTROLLER_UI_EVENTS"
  180. /**
  181. * \brief A variable controlling whether the Apple TV remote's joystick axes
  182. * will automatically match the rotation of the remote.
  183. *
  184. * This variable can be set to the following values:
  185. * "0" - Remote orientation does not affect joystick axes (the default).
  186. * "1" - Joystick axes are based on the orientation of the remote.
  187. */
  188. #define SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION "SDL_APPLE_TV_REMOTE_ALLOW_ROTATION"
  189. /**
  190. * \brief A variable controlling the audio category on iOS and macOS
  191. *
  192. * This variable can be set to the following values:
  193. *
  194. * "ambient" - Use the AVAudioSessionCategoryAmbient audio category, will be muted by the phone mute switch (default)
  195. * "playback" - Use the AVAudioSessionCategoryPlayback category
  196. *
  197. * For more information, see Apple's documentation:
  198. * https://developer.apple.com/library/content/documentation/Audio/Conceptual/AudioSessionProgrammingGuide/AudioSessionCategoriesandModes/AudioSessionCategoriesandModes.html
  199. */
  200. #define SDL_HINT_AUDIO_CATEGORY "SDL_AUDIO_CATEGORY"
  201. /**
  202. * \brief Specify an application name for an audio device.
  203. *
  204. * Some audio backends (such as PulseAudio) allow you to describe your audio
  205. * stream. Among other things, this description might show up in a system
  206. * control panel that lets the user adjust the volume on specific audio
  207. * streams instead of using one giant master volume slider.
  208. *
  209. * This hints lets you transmit that information to the OS. The contents of
  210. * this hint are used while opening an audio device. You should use a string
  211. * that describes your program ("My Game 2: The Revenge")
  212. *
  213. * Setting this to "" or leaving it unset will have SDL use a reasonable
  214. * default: this will be the name set with SDL_HINT_APP_NAME, if that hint is
  215. * set. Otherwise, it'll probably the application's name or "SDL Application"
  216. * if SDL doesn't have any better information.
  217. *
  218. * On targets where this is not supported, this hint does nothing.
  219. */
  220. #define SDL_HINT_AUDIO_DEVICE_APP_NAME "SDL_AUDIO_DEVICE_APP_NAME"
  221. /**
  222. * \brief Specify an application name for an audio device.
  223. *
  224. * Some audio backends (such as PulseAudio) allow you to describe your audio
  225. * stream. Among other things, this description might show up in a system
  226. * control panel that lets the user adjust the volume on specific audio
  227. * streams instead of using one giant master volume slider.
  228. *
  229. * This hints lets you transmit that information to the OS. The contents of
  230. * this hint are used while opening an audio device. You should use a string
  231. * that describes your what your program is playing ("audio stream" is
  232. * probably sufficient in many cases, but this could be useful for something
  233. * like "team chat" if you have a headset playing VoIP audio separately).
  234. *
  235. * Setting this to "" or leaving it unset will have SDL use a reasonable
  236. * default: "audio stream" or something similar.
  237. *
  238. * On targets where this is not supported, this hint does nothing.
  239. */
  240. #define SDL_HINT_AUDIO_DEVICE_STREAM_NAME "SDL_AUDIO_DEVICE_STREAM_NAME"
  241. /**
  242. * \brief Specify an application role for an audio device.
  243. *
  244. * Some audio backends (such as Pipewire) allow you to describe the role of
  245. * your audio stream. Among other things, this description might show up in
  246. * a system control panel or software for displaying and manipulating media
  247. * playback/capture graphs.
  248. *
  249. * This hints lets you transmit that information to the OS. The contents of
  250. * this hint are used while opening an audio device. You should use a string
  251. * that describes your what your program is playing (Game, Music, Movie,
  252. * etc...).
  253. *
  254. * Setting this to "" or leaving it unset will have SDL use a reasonable
  255. * default: "Game" or something similar.
  256. *
  257. * On targets where this is not supported, this hint does nothing.
  258. */
  259. #define SDL_HINT_AUDIO_DEVICE_STREAM_ROLE "SDL_AUDIO_DEVICE_STREAM_ROLE"
  260. /**
  261. * \brief A variable controlling speed/quality tradeoff of audio resampling.
  262. *
  263. * SDL may be able to use different approaches to audio resampling, which
  264. * produce different levels of quality, using more CPU.
  265. *
  266. * If this hint isn't specified to a valid setting SDL will use the default.
  267. *
  268. * This hint is currently only checked at audio subsystem initialization.
  269. *
  270. * This variable can be set to the following values:
  271. *
  272. * "0" or "default" - SDL chooses default (probably "medium").
  273. * "1" or "fast" - Use fast, lower-quality resampling, if available
  274. * "2" or "medium" - Use medium quality resampling, if available
  275. * "3" or "best" - Use high quality resampling, if available
  276. */
  277. #define SDL_HINT_AUDIO_RESAMPLING_MODE "SDL_AUDIO_RESAMPLING_MODE"
  278. /**
  279. * \brief A variable controlling whether SDL updates joystick state when getting input events
  280. *
  281. * This variable can be set to the following values:
  282. *
  283. * "0" - You'll call SDL_UpdateJoysticks() manually
  284. * "1" - SDL will automatically call SDL_UpdateJoysticks() (default)
  285. *
  286. * This hint can be toggled on and off at runtime.
  287. */
  288. #define SDL_HINT_AUTO_UPDATE_JOYSTICKS "SDL_AUTO_UPDATE_JOYSTICKS"
  289. /**
  290. * \brief A variable controlling whether SDL updates sensor state when getting input events
  291. *
  292. * This variable can be set to the following values:
  293. *
  294. * "0" - You'll call SDL_UpdateSensors() manually
  295. * "1" - SDL will automatically call SDL_UpdateSensors() (default)
  296. *
  297. * This hint can be toggled on and off at runtime.
  298. */
  299. #define SDL_HINT_AUTO_UPDATE_SENSORS "SDL_AUTO_UPDATE_SENSORS"
  300. /**
  301. * \brief Prevent SDL from using version 4 of the bitmap header when saving BMPs.
  302. *
  303. * The bitmap header version 4 is required for proper alpha channel support and
  304. * SDL will use it when required. Should this not be desired, this hint can
  305. * force the use of the 40 byte header version which is supported everywhere.
  306. *
  307. * The variable can be set to the following values:
  308. * "0" - Surfaces with a colorkey or an alpha channel are saved to a
  309. * 32-bit BMP file with an alpha mask. SDL will use the bitmap
  310. * header version 4 and set the alpha mask accordingly.
  311. * "1" - Surfaces with a colorkey or an alpha channel are saved to a
  312. * 32-bit BMP file without an alpha mask. The alpha channel data
  313. * will be in the file, but applications are going to ignore it.
  314. *
  315. * The default value is "0".
  316. */
  317. #define SDL_HINT_BMP_SAVE_LEGACY_FORMAT "SDL_BMP_SAVE_LEGACY_FORMAT"
  318. /**
  319. * \brief Override for SDL_GetDisplayUsableBounds()
  320. *
  321. * If set, this hint will override the expected results for
  322. * SDL_GetDisplayUsableBounds() for display index 0. Generally you don't want
  323. * to do this, but this allows an embedded system to request that some of the
  324. * screen be reserved for other uses when paired with a well-behaved
  325. * application.
  326. *
  327. * The contents of this hint must be 4 comma-separated integers, the first
  328. * is the bounds x, then y, width and height, in that order.
  329. */
  330. #define SDL_HINT_DISPLAY_USABLE_BOUNDS "SDL_DISPLAY_USABLE_BOUNDS"
  331. /**
  332. * \brief Disable giving back control to the browser automatically
  333. * when running with asyncify
  334. *
  335. * With -s ASYNCIFY, SDL calls emscripten_sleep during operations
  336. * such as refreshing the screen or polling events.
  337. *
  338. * This hint only applies to the emscripten platform
  339. *
  340. * The variable can be set to the following values:
  341. * "0" - Disable emscripten_sleep calls (if you give back browser control manually or use asyncify for other purposes)
  342. * "1" - Enable emscripten_sleep calls (the default)
  343. */
  344. #define SDL_HINT_EMSCRIPTEN_ASYNCIFY "SDL_EMSCRIPTEN_ASYNCIFY"
  345. /**
  346. * \brief Specify the CSS selector used for the "default" window/canvas
  347. *
  348. * This hint only applies to the emscripten platform
  349. *
  350. * The default value is "#canvas"
  351. */
  352. #define SDL_HINT_EMSCRIPTEN_CANVAS_SELECTOR "SDL_EMSCRIPTEN_CANVAS_SELECTOR"
  353. /**
  354. * \brief override the binding element for keyboard inputs for Emscripten builds
  355. *
  356. * This hint only applies to the emscripten platform
  357. *
  358. * The variable can be one of
  359. * "#window" - The javascript window object (this is the default)
  360. * "#document" - The javascript document object
  361. * "#screen" - the javascript window.screen object
  362. * "#canvas" - the WebGL canvas element
  363. * any other string without a leading # sign applies to the element on the page with that ID.
  364. */
  365. #define SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT "SDL_EMSCRIPTEN_KEYBOARD_ELEMENT"
  366. /**
  367. * \brief A variable that controls whether the on-screen keyboard should be shown when text input is active
  368. *
  369. * The variable can be set to the following values:
  370. * "0" - Do not show the on-screen keyboard
  371. * "1" - Show the on-screen keyboard
  372. *
  373. * The default value is "1". This hint must be set before text input is activated.
  374. */
  375. #define SDL_HINT_ENABLE_SCREEN_KEYBOARD "SDL_ENABLE_SCREEN_KEYBOARD"
  376. /**
  377. * \brief A variable that controls whether Steam Controllers should be exposed using the SDL joystick and game controller APIs
  378. *
  379. * The variable can be set to the following values:
  380. * "0" - Do not scan for Steam Controllers
  381. * "1" - Scan for Steam Controllers (the default)
  382. *
  383. * The default value is "1". This hint must be set before initializing the joystick subsystem.
  384. */
  385. #define SDL_HINT_ENABLE_STEAM_CONTROLLERS "SDL_ENABLE_STEAM_CONTROLLERS"
  386. /**
  387. * \brief A variable controlling verbosity of the logging of SDL events pushed onto the internal queue.
  388. *
  389. * This variable can be set to the following values, from least to most verbose:
  390. *
  391. * "0" - Don't log any events (default)
  392. * "1" - Log most events (other than the really spammy ones).
  393. * "2" - Include mouse and finger motion events.
  394. * "3" - Include SDL_SysWMEvent events.
  395. *
  396. * This is generally meant to be used to debug SDL itself, but can be useful
  397. * for application developers that need better visibility into what is going
  398. * on in the event queue. Logged events are sent through SDL_Log(), which
  399. * means by default they appear on stdout on most platforms or maybe
  400. * OutputDebugString() on Windows, and can be funneled by the app with
  401. * SDL_LogSetOutputFunction(), etc.
  402. *
  403. * This hint can be toggled on and off at runtime, if you only need to log
  404. * events for a small subset of program execution.
  405. */
  406. #define SDL_HINT_EVENT_LOGGING "SDL_EVENT_LOGGING"
  407. /**
  408. * \brief A variable controlling whether raising the window should be done more forcefully
  409. *
  410. * This variable can be set to the following values:
  411. * "0" - No forcing (the default)
  412. * "1" - Extra level of forcing
  413. *
  414. * At present, this is only an issue under MS Windows, which makes it nearly impossible to
  415. * programmatically move a window to the foreground, for "security" reasons. See
  416. * http://stackoverflow.com/a/34414846 for a discussion.
  417. */
  418. #define SDL_HINT_FORCE_RAISEWINDOW "SDL_HINT_FORCE_RAISEWINDOW"
  419. /**
  420. * \brief A variable controlling whether the window is activated when the SDL_RaiseWindow function is called
  421. *
  422. * This variable can be set to the following values:
  423. * "0" - The window is not activated when the SDL_RaiseWindow function is called
  424. * "1" - The window is activated when the SDL_RaiseWindow function is called
  425. *
  426. * By default SDL will activate the window when the SDL_RaiseWindow function is called.
  427. * At present this is only available for MS Windows.
  428. */
  429. #define SDL_HINT_WINDOW_ACTIVATE_WHEN_RAISED "SDL_WINDOW_ACTIVATE_WHEN_RAISED"
  430. /**
  431. * \brief A variable controlling how 3D acceleration is used to accelerate the SDL screen surface.
  432. *
  433. * SDL can try to accelerate the SDL screen surface by using streaming
  434. * textures with a 3D rendering engine. This variable controls whether and
  435. * how this is done.
  436. *
  437. * This variable can be set to the following values:
  438. * "0" - Disable 3D acceleration
  439. * "1" - Enable 3D acceleration, using the default renderer.
  440. * "X" - Enable 3D acceleration, using X where X is one of the valid rendering drivers. (e.g. "direct3d", "opengl", etc.)
  441. *
  442. * By default SDL tries to make a best guess for each platform whether
  443. * to use acceleration or not.
  444. */
  445. #define SDL_HINT_FRAMEBUFFER_ACCELERATION "SDL_FRAMEBUFFER_ACCELERATION"
  446. /**
  447. * \brief A variable that lets you manually hint extra gamecontroller db entries.
  448. *
  449. * The variable should be newline delimited rows of gamecontroller config data, see SDL_gamepad.h
  450. *
  451. * This hint must be set before calling SDL_Init(SDL_INIT_GAMEPAD)
  452. * You can update mappings after the system is initialized with SDL_GetGamepadMappingForGUID() and SDL_AddGamepadMapping()
  453. */
  454. #define SDL_HINT_GAMECONTROLLERCONFIG "SDL_GAMECONTROLLERCONFIG"
  455. /**
  456. * \brief A variable that lets you provide a file with extra gamecontroller db entries.
  457. *
  458. * The file should contain lines of gamecontroller config data, see SDL_gamepad.h
  459. *
  460. * This hint must be set before calling SDL_Init(SDL_INIT_GAMEPAD)
  461. * You can update mappings after the system is initialized with SDL_GetGamepadMappingForGUID() and SDL_AddGamepadMapping()
  462. */
  463. #define SDL_HINT_GAMECONTROLLERCONFIG_FILE "SDL_GAMECONTROLLERCONFIG_FILE"
  464. /**
  465. * \brief A variable that overrides the automatic controller type detection
  466. *
  467. * The variable should be comma separated entries, in the form: VID/PID=type
  468. *
  469. * The VID and PID should be hexadecimal with exactly 4 digits, e.g. 0x00fd
  470. *
  471. * The type should be one of:
  472. * Xbox360
  473. * XboxOne
  474. * PS3
  475. * PS4
  476. * PS5
  477. * SwitchPro
  478. *
  479. * This hint affects what driver is used, and must be set before calling SDL_Init(SDL_INIT_GAMEPAD)
  480. */
  481. #define SDL_HINT_GAMECONTROLLERTYPE "SDL_GAMECONTROLLERTYPE"
  482. /**
  483. * \brief A variable containing a list of devices to skip when scanning for game controllers.
  484. *
  485. * The format of the string is a comma separated list of USB VID/PID pairs
  486. * in hexadecimal form, e.g.
  487. *
  488. * 0xAAAA/0xBBBB,0xCCCC/0xDDDD
  489. *
  490. * The variable can also take the form of @file, in which case the named
  491. * file will be loaded and interpreted as the value of the variable.
  492. */
  493. #define SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES "SDL_GAMECONTROLLER_IGNORE_DEVICES"
  494. /**
  495. * \brief If set, all devices will be skipped when scanning for game controllers except for the ones listed in this variable.
  496. *
  497. * The format of the string is a comma separated list of USB VID/PID pairs
  498. * in hexadecimal form, e.g.
  499. *
  500. * 0xAAAA/0xBBBB,0xCCCC/0xDDDD
  501. *
  502. * The variable can also take the form of @file, in which case the named
  503. * file will be loaded and interpreted as the value of the variable.
  504. */
  505. #define SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT "SDL_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT"
  506. /**
  507. * \brief If set, game controller face buttons report their values according to their labels instead of their positional layout.
  508. *
  509. * For example, on Nintendo Switch controllers, normally you'd get:
  510. *
  511. * (Y)
  512. * (X) (B)
  513. * (A)
  514. *
  515. * but if this hint is set, you'll get:
  516. *
  517. * (X)
  518. * (Y) (A)
  519. * (B)
  520. *
  521. * The variable can be set to the following values:
  522. * "0" - Report the face buttons by position, as though they were on an Xbox controller.
  523. * "1" - Report the face buttons by label instead of position
  524. *
  525. * The default value is "1". This hint may be set at any time.
  526. */
  527. #define SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS "SDL_GAMECONTROLLER_USE_BUTTON_LABELS"
  528. /**
  529. * \brief A variable controlling whether grabbing input grabs the keyboard
  530. *
  531. * This variable can be set to the following values:
  532. * "0" - Grab will affect only the mouse
  533. * "1" - Grab will affect mouse and keyboard
  534. *
  535. * By default SDL will not grab the keyboard so system shortcuts still work.
  536. */
  537. #define SDL_HINT_GRAB_KEYBOARD "SDL_GRAB_KEYBOARD"
  538. /**
  539. * \brief A variable containing a list of devices to ignore in SDL_hid_enumerate()
  540. *
  541. * For example, to ignore the Shanwan DS3 controller and any Valve controller, you might
  542. * have the string "0x2563/0x0523,0x28de/0x0000"
  543. */
  544. #define SDL_HINT_HIDAPI_IGNORE_DEVICES "SDL_HIDAPI_IGNORE_DEVICES"
  545. /**
  546. * \brief A variable to control whether certain IMEs should handle text editing internally instead of sending SDL_EVENT_TEXT_EDITING events.
  547. *
  548. * The variable can be set to the following values:
  549. * "0" - SDL_EVENT_TEXT_EDITING events are sent, and it is the application's
  550. * responsibility to render the text from these events and
  551. * differentiate it somehow from committed text. (default)
  552. * "1" - If supported by the IME then SDL_EVENT_TEXT_EDITING events are not sent,
  553. * and text that is being composed will be rendered in its own UI.
  554. */
  555. #define SDL_HINT_IME_INTERNAL_EDITING "SDL_IME_INTERNAL_EDITING"
  556. /**
  557. * \brief A variable to control whether certain IMEs should show native UI components (such as the Candidate List) instead of suppressing them.
  558. *
  559. * The variable can be set to the following values:
  560. * "0" - Native UI components are not display. (default)
  561. * "1" - Native UI components are displayed.
  562. */
  563. #define SDL_HINT_IME_SHOW_UI "SDL_IME_SHOW_UI"
  564. /**
  565. * \brief A variable to control if extended IME text support is enabled.
  566. * If enabled then SDL_TextEditingExtEvent will be issued if the text would be truncated otherwise.
  567. * Additionally SDL_TextInputEvent will be dispatched multiple times so that it is not truncated.
  568. *
  569. * The variable can be set to the following values:
  570. * "0" - Legacy behavior. Text can be truncated, no heap allocations. (default)
  571. * "1" - Modern behavior.
  572. */
  573. #define SDL_HINT_IME_SUPPORT_EXTENDED_TEXT "SDL_IME_SUPPORT_EXTENDED_TEXT"
  574. /**
  575. * \brief A variable controlling whether the home indicator bar on iPhone X
  576. * should be hidden.
  577. *
  578. * This variable can be set to the following values:
  579. * "0" - The indicator bar is not hidden (default for windowed applications)
  580. * "1" - The indicator bar is hidden and is shown when the screen is touched (useful for movie playback applications)
  581. * "2" - The indicator bar is dim and the first swipe makes it visible and the second swipe performs the "home" action (default for fullscreen applications)
  582. */
  583. #define SDL_HINT_IOS_HIDE_HOME_INDICATOR "SDL_IOS_HIDE_HOME_INDICATOR"
  584. /**
  585. * \brief A variable that lets you enable joystick (and gamecontroller) events even when your app is in the background.
  586. *
  587. * The variable can be set to the following values:
  588. * "0" - Disable joystick & gamecontroller input events when the
  589. * application is in the background.
  590. * "1" - Enable joystick & gamecontroller input events when the
  591. * application is in the background.
  592. *
  593. * The default value is "0". This hint may be set at any time.
  594. */
  595. #define SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS "SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS"
  596. /**
  597. * \brief A variable controlling whether the HIDAPI joystick drivers should be used.
  598. *
  599. * This variable can be set to the following values:
  600. * "0" - HIDAPI drivers are not used
  601. * "1" - HIDAPI drivers are used (the default)
  602. *
  603. * This variable is the default for all drivers, but can be overridden by the hints for specific drivers below.
  604. */
  605. #define SDL_HINT_JOYSTICK_HIDAPI "SDL_JOYSTICK_HIDAPI"
  606. /**
  607. * \brief A variable controlling whether the HIDAPI driver for Nintendo GameCube controllers should be used.
  608. *
  609. * This variable can be set to the following values:
  610. * "0" - HIDAPI driver is not used
  611. * "1" - HIDAPI driver is used
  612. *
  613. * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
  614. */
  615. #define SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE "SDL_JOYSTICK_HIDAPI_GAMECUBE"
  616. /**
  617. * \brief A variable controlling whether "low_frequency_rumble" and "high_frequency_rumble" is used to implement
  618. * the GameCube controller's 3 rumble modes, Stop(0), Rumble(1), and StopHard(2)
  619. * this is useful for applications that need full compatibility for things like ADSR envelopes.
  620. * Stop is implemented by setting "low_frequency_rumble" to "0" and "high_frequency_rumble" ">0"
  621. * Rumble is both at any arbitrary value,
  622. * StopHard is implemented by setting both "low_frequency_rumble" and "high_frequency_rumble" to "0"
  623. *
  624. * This variable can be set to the following values:
  625. * "0" - Normal rumble behavior is behavior is used (default)
  626. * "1" - Proper GameCube controller rumble behavior is used
  627. *
  628. */
  629. #define SDL_HINT_JOYSTICK_GAMECUBE_RUMBLE_BRAKE "SDL_JOYSTICK_GAMECUBE_RUMBLE_BRAKE"
  630. /**
  631. * \brief A variable controlling whether the HIDAPI driver for Nintendo Switch Joy-Cons should be used.
  632. *
  633. * This variable can be set to the following values:
  634. * "0" - HIDAPI driver is not used
  635. * "1" - HIDAPI driver is used
  636. *
  637. * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
  638. */
  639. #define SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS "SDL_JOYSTICK_HIDAPI_JOY_CONS"
  640. /**
  641. * \brief A variable controlling whether Nintendo Switch Joy-Con controllers will be combined into a single Pro-like controller when using the HIDAPI driver
  642. *
  643. * This variable can be set to the following values:
  644. * "0" - Left and right Joy-Con controllers will not be combined and each will be a mini-gamepad
  645. * "1" - Left and right Joy-Con controllers will be combined into a single controller (the default)
  646. */
  647. #define SDL_HINT_JOYSTICK_HIDAPI_COMBINE_JOY_CONS "SDL_JOYSTICK_HIDAPI_COMBINE_JOY_CONS"
  648. /**
  649. * \brief A variable controlling whether Nintendo Switch Joy-Con controllers will be in vertical mode when using the HIDAPI driver
  650. *
  651. * This variable can be set to the following values:
  652. * "0" - Left and right Joy-Con controllers will not be in vertical mode (the default)
  653. * "1" - Left and right Joy-Con controllers will be in vertical mode
  654. *
  655. * This hint must be set before calling SDL_Init(SDL_INIT_GAMEPAD)
  656. */
  657. #define SDL_HINT_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS "SDL_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS"
  658. /**
  659. * \brief A variable controlling whether the HIDAPI driver for Amazon Luna controllers connected via Bluetooth should be used.
  660. *
  661. * This variable can be set to the following values:
  662. * "0" - HIDAPI driver is not used
  663. * "1" - HIDAPI driver is used
  664. *
  665. * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
  666. */
  667. #define SDL_HINT_JOYSTICK_HIDAPI_LUNA "SDL_JOYSTICK_HIDAPI_LUNA"
  668. /**
  669. * \brief A variable controlling whether the HIDAPI driver for Nintendo Online classic controllers should be used.
  670. *
  671. * This variable can be set to the following values:
  672. * "0" - HIDAPI driver is not used
  673. * "1" - HIDAPI driver is used
  674. *
  675. * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
  676. */
  677. #define SDL_HINT_JOYSTICK_HIDAPI_NINTENDO_CLASSIC "SDL_JOYSTICK_HIDAPI_NINTENDO_CLASSIC"
  678. /**
  679. * \brief A variable controlling whether the HIDAPI driver for NVIDIA SHIELD controllers should be used.
  680. *
  681. * This variable can be set to the following values:
  682. * "0" - HIDAPI driver is not used
  683. * "1" - HIDAPI driver is used
  684. *
  685. * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
  686. */
  687. #define SDL_HINT_JOYSTICK_HIDAPI_SHIELD "SDL_JOYSTICK_HIDAPI_SHIELD"
  688. /**
  689. * \brief A variable controlling whether the HIDAPI driver for PS3 controllers should be used.
  690. *
  691. * This variable can be set to the following values:
  692. * "0" - HIDAPI driver is not used
  693. * "1" - HIDAPI driver is used
  694. *
  695. * The default is the value of SDL_HINT_JOYSTICK_HIDAPI on macOS, and "0" on other platforms.
  696. *
  697. * It is not possible to use this driver on Windows, due to limitations in the default drivers
  698. * installed. See https://github.com/ViGEm/DsHidMini for an alternative driver on Windows.
  699. */
  700. #define SDL_HINT_JOYSTICK_HIDAPI_PS3 "SDL_JOYSTICK_HIDAPI_PS3"
  701. /**
  702. * \brief A variable controlling whether the HIDAPI driver for PS4 controllers should be used.
  703. *
  704. * This variable can be set to the following values:
  705. * "0" - HIDAPI driver is not used
  706. * "1" - HIDAPI driver is used
  707. *
  708. * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
  709. */
  710. #define SDL_HINT_JOYSTICK_HIDAPI_PS4 "SDL_JOYSTICK_HIDAPI_PS4"
  711. /**
  712. * \brief A variable controlling whether extended input reports should be used for PS4 controllers when using the HIDAPI driver.
  713. *
  714. * This variable can be set to the following values:
  715. * "0" - extended reports are not enabled (the default)
  716. * "1" - extended reports
  717. *
  718. * Extended input reports allow rumble on Bluetooth PS4 controllers, but
  719. * break DirectInput handling for applications that don't use SDL.
  720. *
  721. * Once extended reports are enabled, they can not be disabled without
  722. * power cycling the controller.
  723. *
  724. * For compatibility with applications written for versions of SDL prior
  725. * to the introduction of PS5 controller support, this value will also
  726. * control the state of extended reports on PS5 controllers when the
  727. * SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE hint is not explicitly set.
  728. */
  729. #define SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE "SDL_JOYSTICK_HIDAPI_PS4_RUMBLE"
  730. /**
  731. * \brief A variable controlling whether the HIDAPI driver for PS5 controllers should be used.
  732. *
  733. * This variable can be set to the following values:
  734. * "0" - HIDAPI driver is not used
  735. * "1" - HIDAPI driver is used
  736. *
  737. * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
  738. */
  739. #define SDL_HINT_JOYSTICK_HIDAPI_PS5 "SDL_JOYSTICK_HIDAPI_PS5"
  740. /**
  741. * \brief A variable controlling whether the player LEDs should be lit to indicate which player is associated with a PS5 controller.
  742. *
  743. * This variable can be set to the following values:
  744. * "0" - player LEDs are not enabled
  745. * "1" - player LEDs are enabled (the default)
  746. */
  747. #define SDL_HINT_JOYSTICK_HIDAPI_PS5_PLAYER_LED "SDL_JOYSTICK_HIDAPI_PS5_PLAYER_LED"
  748. /**
  749. * \brief A variable controlling whether extended input reports should be used for PS5 controllers when using the HIDAPI driver.
  750. *
  751. * This variable can be set to the following values:
  752. * "0" - extended reports are not enabled (the default)
  753. * "1" - extended reports
  754. *
  755. * Extended input reports allow rumble on Bluetooth PS5 controllers, but
  756. * break DirectInput handling for applications that don't use SDL.
  757. *
  758. * Once extended reports are enabled, they can not be disabled without
  759. * power cycling the controller.
  760. *
  761. * For compatibility with applications written for versions of SDL prior
  762. * to the introduction of PS5 controller support, this value defaults to
  763. * the value of SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE.
  764. */
  765. #define SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE "SDL_JOYSTICK_HIDAPI_PS5_RUMBLE"
  766. /**
  767. * \brief A variable controlling whether the HIDAPI driver for Google Stadia controllers should be used.
  768. *
  769. * This variable can be set to the following values:
  770. * "0" - HIDAPI driver is not used
  771. * "1" - HIDAPI driver is used
  772. *
  773. * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
  774. */
  775. #define SDL_HINT_JOYSTICK_HIDAPI_STADIA "SDL_JOYSTICK_HIDAPI_STADIA"
  776. /**
  777. * \brief A variable controlling whether the HIDAPI driver for Bluetooth Steam Controllers should be used.
  778. *
  779. * This variable can be set to the following values:
  780. * "0" - HIDAPI driver is not used
  781. * "1" - HIDAPI driver is used for Steam Controllers, which requires Bluetooth access
  782. * and may prompt the user for permission on iOS and Android.
  783. *
  784. * The default is "0"
  785. */
  786. #define SDL_HINT_JOYSTICK_HIDAPI_STEAM "SDL_JOYSTICK_HIDAPI_STEAM"
  787. /**
  788. * \brief A variable controlling whether the HIDAPI driver for Nintendo Switch controllers should be used.
  789. *
  790. * This variable can be set to the following values:
  791. * "0" - HIDAPI driver is not used
  792. * "1" - HIDAPI driver is used
  793. *
  794. * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
  795. */
  796. #define SDL_HINT_JOYSTICK_HIDAPI_SWITCH "SDL_JOYSTICK_HIDAPI_SWITCH"
  797. /**
  798. * \brief A variable controlling whether the Home button LED should be turned on when a Nintendo Switch Pro controller is opened
  799. *
  800. * This variable can be set to the following values:
  801. * "0" - home button LED is turned off
  802. * "1" - home button LED is turned on
  803. *
  804. * By default the Home button LED state is not changed. This hint can also be set to a floating point value between 0.0 and 1.0 which controls the brightness of the Home button LED.
  805. */
  806. #define SDL_HINT_JOYSTICK_HIDAPI_SWITCH_HOME_LED "SDL_JOYSTICK_HIDAPI_SWITCH_HOME_LED"
  807. /**
  808. * \brief A variable controlling whether the Home button LED should be turned on when a Nintendo Switch Joy-Con controller is opened
  809. *
  810. * This variable can be set to the following values:
  811. * "0" - home button LED is turned off
  812. * "1" - home button LED is turned on
  813. *
  814. * By default the Home button LED state is not changed. This hint can also be set to a floating point value between 0.0 and 1.0 which controls the brightness of the Home button LED.
  815. */
  816. #define SDL_HINT_JOYSTICK_HIDAPI_JOYCON_HOME_LED "SDL_JOYSTICK_HIDAPI_JOYCON_HOME_LED"
  817. /**
  818. * \brief A variable controlling whether the player LEDs should be lit to indicate which player is associated with a Nintendo Switch controller.
  819. *
  820. * This variable can be set to the following values:
  821. * "0" - player LEDs are not enabled
  822. * "1" - player LEDs are enabled (the default)
  823. */
  824. #define SDL_HINT_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED "SDL_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED"
  825. /**
  826. * \brief A variable controlling whether the HIDAPI driver for Nintendo Wii and Wii U controllers should be used.
  827. *
  828. * This variable can be set to the following values:
  829. * "0" - HIDAPI driver is not used
  830. * "1" - HIDAPI driver is used
  831. *
  832. * This driver doesn't work with the dolphinbar, so the default is SDL_FALSE for now.
  833. */
  834. #define SDL_HINT_JOYSTICK_HIDAPI_WII "SDL_JOYSTICK_HIDAPI_WII"
  835. /**
  836. * \brief A variable controlling whether the player LEDs should be lit to indicate which player is associated with a Wii controller.
  837. *
  838. * This variable can be set to the following values:
  839. * "0" - player LEDs are not enabled
  840. * "1" - player LEDs are enabled (the default)
  841. */
  842. #define SDL_HINT_JOYSTICK_HIDAPI_WII_PLAYER_LED "SDL_JOYSTICK_HIDAPI_WII_PLAYER_LED"
  843. /**
  844. * \brief A variable controlling whether the HIDAPI driver for XBox controllers should be used.
  845. *
  846. * This variable can be set to the following values:
  847. * "0" - HIDAPI driver is not used
  848. * "1" - HIDAPI driver is used
  849. *
  850. * The default is "0" on Windows, otherwise the value of SDL_HINT_JOYSTICK_HIDAPI
  851. */
  852. #define SDL_HINT_JOYSTICK_HIDAPI_XBOX "SDL_JOYSTICK_HIDAPI_XBOX"
  853. /**
  854. * \brief A variable controlling whether the HIDAPI driver for XBox 360 controllers should be used.
  855. *
  856. * This variable can be set to the following values:
  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_XBOX
  861. */
  862. #define SDL_HINT_JOYSTICK_HIDAPI_XBOX_360 "SDL_JOYSTICK_HIDAPI_XBOX_360"
  863. /**
  864. * \brief A variable controlling whether the player LEDs should be lit to indicate which player is associated with an Xbox 360 controller.
  865. *
  866. * This variable can be set to the following values:
  867. * "0" - player LEDs are not enabled
  868. * "1" - player LEDs are enabled (the default)
  869. */
  870. #define SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED "SDL_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED"
  871. /**
  872. * \brief A variable controlling whether the HIDAPI driver for XBox 360 wireless controllers should be used.
  873. *
  874. * This variable can be set to the following values:
  875. * "0" - HIDAPI driver is not used
  876. * "1" - HIDAPI driver is used
  877. *
  878. * The default is the value of SDL_HINT_JOYSTICK_HIDAPI_XBOX_360
  879. */
  880. #define SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_WIRELESS "SDL_JOYSTICK_HIDAPI_XBOX_360_WIRELESS"
  881. /**
  882. * \brief A variable controlling whether the HIDAPI driver for XBox One controllers should be used.
  883. *
  884. * This variable can be set to the following values:
  885. * "0" - HIDAPI driver is not used
  886. * "1" - HIDAPI driver is used
  887. *
  888. * The default is the value of SDL_HINT_JOYSTICK_HIDAPI_XBOX
  889. */
  890. #define SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE "SDL_JOYSTICK_HIDAPI_XBOX_ONE"
  891. /**
  892. * \brief A variable controlling whether the Home button LED should be turned on when an Xbox One controller is opened
  893. *
  894. * This variable can be set to the following values:
  895. * "0" - home button LED is turned off
  896. * "1" - home button LED is turned on
  897. *
  898. * By default the Home button LED state is not changed. This hint can also be set to a floating point value between 0.0 and 1.0 which controls the brightness of the Home button LED. The default brightness is 0.4.
  899. */
  900. #define SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED "SDL_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED"
  901. /**
  902. * \brief A variable controlling whether the RAWINPUT joystick drivers should be used for better handling XInput-capable devices.
  903. *
  904. * This variable can be set to the following values:
  905. * "0" - RAWINPUT drivers are not used
  906. * "1" - RAWINPUT drivers are used (the default)
  907. */
  908. #define SDL_HINT_JOYSTICK_RAWINPUT "SDL_JOYSTICK_RAWINPUT"
  909. /**
  910. * \brief A variable controlling whether the RAWINPUT driver should pull correlated data from XInput.
  911. *
  912. * This variable can be set to the following values:
  913. * "0" - RAWINPUT driver will only use data from raw input APIs
  914. * "1" - RAWINPUT driver will also pull data from XInput, providing
  915. * better trigger axes, guide button presses, and rumble support
  916. * for Xbox controllers
  917. *
  918. * The default is "1". This hint applies to any joysticks opened after setting the hint.
  919. */
  920. #define SDL_HINT_JOYSTICK_RAWINPUT_CORRELATE_XINPUT "SDL_JOYSTICK_RAWINPUT_CORRELATE_XINPUT"
  921. /**
  922. * \brief A variable controlling whether the ROG Chakram mice should show up as joysticks
  923. *
  924. * This variable can be set to the following values:
  925. * "0" - ROG Chakram mice do not show up as joysticks (the default)
  926. * "1" - ROG Chakram mice show up as joysticks
  927. */
  928. #define SDL_HINT_JOYSTICK_ROG_CHAKRAM "SDL_JOYSTICK_ROG_CHAKRAM"
  929. /**
  930. * \brief A variable controlling whether a separate thread should be used
  931. * for handling joystick detection and raw input messages on Windows
  932. *
  933. * This variable can be set to the following values:
  934. * "0" - A separate thread is not used (the default)
  935. * "1" - A separate thread is used for handling raw input messages
  936. *
  937. */
  938. #define SDL_HINT_JOYSTICK_THREAD "SDL_JOYSTICK_THREAD"
  939. /**
  940. * \brief Determines whether SDL enforces that DRM master is required in order
  941. * to initialize the KMSDRM video backend.
  942. *
  943. * The DRM subsystem has a concept of a "DRM master" which is a DRM client that
  944. * has the ability to set planes, set cursor, etc. When SDL is DRM master, it
  945. * can draw to the screen using the SDL rendering APIs. Without DRM master, SDL
  946. * is still able to process input and query attributes of attached displays,
  947. * but it cannot change display state or draw to the screen directly.
  948. *
  949. * In some cases, it can be useful to have the KMSDRM backend even if it cannot
  950. * be used for rendering. An app may want to use SDL for input processing while
  951. * using another rendering API (such as an MMAL overlay on Raspberry Pi) or
  952. * using its own code to render to DRM overlays that SDL doesn't support.
  953. *
  954. * This hint must be set before initializing the video subsystem.
  955. *
  956. * This variable can be set to the following values:
  957. * "0" - SDL will allow usage of the KMSDRM backend without DRM master
  958. * "1" - SDL Will require DRM master to use the KMSDRM backend (default)
  959. */
  960. #define SDL_HINT_KMSDRM_REQUIRE_DRM_MASTER "SDL_KMSDRM_REQUIRE_DRM_MASTER"
  961. /**
  962. * \brief A comma separated list of devices to open as joysticks
  963. *
  964. * This variable is currently only used by the Linux joystick driver.
  965. */
  966. #define SDL_HINT_JOYSTICK_DEVICE "SDL_JOYSTICK_DEVICE"
  967. /**
  968. * \brief A variable controlling whether joysticks on Linux will always treat 'hat' axis inputs (ABS_HAT0X - ABS_HAT3Y) as 8-way digital hats without checking whether they may be analog.
  969. *
  970. * This variable can be set to the following values:
  971. * "0" - Only map hat axis inputs to digital hat outputs if the input axes appear to actually be digital (the default)
  972. * "1" - Always handle the input axes numbered ABS_HAT0X to ABS_HAT3Y as digital hats
  973. */
  974. #define SDL_HINT_LINUX_DIGITAL_HATS "SDL_LINUX_DIGITAL_HATS"
  975. /**
  976. * \brief A variable controlling whether digital hats on Linux will apply deadzones to their underlying input axes or use unfiltered values.
  977. *
  978. * This variable can be set to the following values:
  979. * "0" - Return digital hat values based on unfiltered input axis values
  980. * "1" - Return digital hat values with deadzones on the input axes taken into account (the default)
  981. */
  982. #define SDL_HINT_LINUX_HAT_DEADZONES "SDL_LINUX_HAT_DEADZONES"
  983. /**
  984. * \brief A variable controlling whether to use the classic /dev/input/js* joystick interface or the newer /dev/input/event* joystick interface on Linux
  985. *
  986. * This variable can be set to the following values:
  987. * "0" - Use /dev/input/event*
  988. * "1" - Use /dev/input/js*
  989. *
  990. * By default the /dev/input/event* interfaces are used
  991. */
  992. #define SDL_HINT_LINUX_JOYSTICK_CLASSIC "SDL_LINUX_JOYSTICK_CLASSIC"
  993. /**
  994. * \brief A variable controlling whether joysticks on Linux adhere to their HID-defined deadzones or return unfiltered values.
  995. *
  996. * This variable can be set to the following values:
  997. * "0" - Return unfiltered joystick axis values (the default)
  998. * "1" - Return axis values with deadzones taken into account
  999. */
  1000. #define SDL_HINT_LINUX_JOYSTICK_DEADZONES "SDL_LINUX_JOYSTICK_DEADZONES"
  1001. /**
  1002. * \brief When set don't force the SDL app to become a foreground process
  1003. *
  1004. * This hint only applies to macOS.
  1005. *
  1006. */
  1007. #define SDL_HINT_MAC_BACKGROUND_APP "SDL_MAC_BACKGROUND_APP"
  1008. /**
  1009. * \brief A variable that determines whether ctrl+click should generate a right-click event on Mac
  1010. *
  1011. * If present, holding ctrl while left clicking will generate a right click
  1012. * event when on Mac.
  1013. */
  1014. #define SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK "SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK"
  1015. /**
  1016. * \brief A variable controlling whether dispatching OpenGL context updates should block the dispatching thread until the main thread finishes processing
  1017. *
  1018. * This variable can be set to the following values:
  1019. * "0" - Dispatching OpenGL context updates will block the dispatching thread until the main thread finishes processing (default).
  1020. * "1" - Dispatching OpenGL context updates will allow the dispatching thread to continue execution.
  1021. *
  1022. * Generally you want the default, but if you have OpenGL code in a background thread on a Mac, and the main thread
  1023. * hangs because it's waiting for that background thread, but that background thread is also hanging because it's
  1024. * waiting for the main thread to do an update, this might fix your issue.
  1025. *
  1026. * This hint only applies to macOS.
  1027. *
  1028. * This hint is available since SDL 2.24.0.
  1029. *
  1030. */
  1031. #define SDL_HINT_MAC_OPENGL_ASYNC_DISPATCH "SDL_MAC_OPENGL_ASYNC_DISPATCH"
  1032. /**
  1033. * \brief A variable setting the double click radius, in pixels.
  1034. */
  1035. #define SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS "SDL_MOUSE_DOUBLE_CLICK_RADIUS"
  1036. /**
  1037. * \brief A variable setting the double click time, in milliseconds.
  1038. */
  1039. #define SDL_HINT_MOUSE_DOUBLE_CLICK_TIME "SDL_MOUSE_DOUBLE_CLICK_TIME"
  1040. /**
  1041. * \brief Allow mouse click events when clicking to focus an SDL window
  1042. *
  1043. * This variable can be set to the following values:
  1044. * "0" - Ignore mouse clicks that activate a window
  1045. * "1" - Generate events for mouse clicks that activate a window
  1046. *
  1047. * By default SDL will ignore mouse clicks that activate a window
  1048. */
  1049. #define SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH "SDL_MOUSE_FOCUS_CLICKTHROUGH"
  1050. /**
  1051. * \brief A variable setting the speed scale for mouse motion, in floating point, when the mouse is not in relative mode
  1052. */
  1053. #define SDL_HINT_MOUSE_NORMAL_SPEED_SCALE "SDL_MOUSE_NORMAL_SPEED_SCALE"
  1054. /**
  1055. * \brief A variable controlling whether relative mouse mode constrains the mouse to the center of the window
  1056. *
  1057. * This variable can be set to the following values:
  1058. * "0" - Relative mouse mode constrains the mouse to the window
  1059. * "1" - Relative mouse mode constrains the mouse to the center of the window
  1060. *
  1061. * Constraining to the center of the window works better for FPS games and when the
  1062. * application is running over RDP. Constraining to the whole window works better
  1063. * for 2D games and increases the chance that the mouse will be in the correct
  1064. * position when using high DPI mice.
  1065. *
  1066. * By default SDL will constrain the mouse to the center of the window
  1067. */
  1068. #define SDL_HINT_MOUSE_RELATIVE_MODE_CENTER "SDL_MOUSE_RELATIVE_MODE_CENTER"
  1069. /**
  1070. * \brief A variable controlling whether relative mouse mode is implemented using mouse warping
  1071. *
  1072. * This variable can be set to the following values:
  1073. * "0" - Relative mouse mode uses raw input
  1074. * "1" - Relative mouse mode uses mouse warping
  1075. *
  1076. * By default SDL will use raw input for relative mouse mode
  1077. */
  1078. #define SDL_HINT_MOUSE_RELATIVE_MODE_WARP "SDL_MOUSE_RELATIVE_MODE_WARP"
  1079. /**
  1080. * \brief A variable setting the scale for mouse motion, in floating point, when the mouse is in relative mode
  1081. */
  1082. #define SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE "SDL_MOUSE_RELATIVE_SPEED_SCALE"
  1083. /**
  1084. * \brief A variable controlling whether the system mouse acceleration curve is used for relative mouse motion.
  1085. *
  1086. * This variable can be set to the following values:
  1087. * "0" - Relative mouse motion will be unscaled (the default)
  1088. * "1" - Relative mouse motion will be scaled using the system mouse acceleration curve.
  1089. *
  1090. * If SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE is set, that will override the system speed scale.
  1091. */
  1092. #define SDL_HINT_MOUSE_RELATIVE_SYSTEM_SCALE "SDL_MOUSE_RELATIVE_SYSTEM_SCALE"
  1093. /**
  1094. * \brief A variable controlling whether a motion event should be generated for mouse warping in relative mode.
  1095. *
  1096. * This variable can be set to the following values:
  1097. * "0" - Warping the mouse will not generate a motion event in relative mode
  1098. * "1" - Warping the mouse will generate a motion event in relative mode
  1099. *
  1100. * By default warping the mouse will not generate motion events in relative mode. This avoids the application having to filter out large relative motion due to warping.
  1101. */
  1102. #define SDL_HINT_MOUSE_RELATIVE_WARP_MOTION "SDL_MOUSE_RELATIVE_WARP_MOTION"
  1103. /**
  1104. * \brief A variable controlling whether mouse events should generate synthetic touch events
  1105. *
  1106. * This variable can be set to the following values:
  1107. * "0" - Mouse events will not generate touch events (default for desktop platforms)
  1108. * "1" - Mouse events will generate touch events (default for mobile platforms, such as Android and iOS)
  1109. */
  1110. #define SDL_HINT_MOUSE_TOUCH_EVENTS "SDL_MOUSE_TOUCH_EVENTS"
  1111. /**
  1112. * \brief A variable controlling whether the mouse is captured while mouse buttons are pressed
  1113. *
  1114. * This variable can be set to the following values:
  1115. * "0" - The mouse is not captured while mouse buttons are pressed
  1116. * "1" - The mouse is captured while mouse buttons are pressed
  1117. *
  1118. * By default the mouse is captured while mouse buttons are pressed so if the mouse is dragged
  1119. * outside the window, the application continues to receive mouse events until the button is
  1120. * released.
  1121. */
  1122. #define SDL_HINT_MOUSE_AUTO_CAPTURE "SDL_MOUSE_AUTO_CAPTURE"
  1123. /**
  1124. * \brief Tell SDL not to catch the SIGINT or SIGTERM signals.
  1125. *
  1126. * This hint only applies to Unix-like platforms, and should set before
  1127. * any calls to SDL_Init()
  1128. *
  1129. * The variable can be set to the following values:
  1130. * "0" - SDL will install a SIGINT and SIGTERM handler, and when it
  1131. * catches a signal, convert it into an SDL_EVENT_QUIT event.
  1132. * "1" - SDL will not install a signal handler at all.
  1133. */
  1134. #define SDL_HINT_NO_SIGNAL_HANDLERS "SDL_NO_SIGNAL_HANDLERS"
  1135. /**
  1136. * \brief A variable controlling what driver to use for OpenGL ES contexts.
  1137. *
  1138. * On some platforms, currently Windows and X11, OpenGL drivers may support
  1139. * creating contexts with an OpenGL ES profile. By default SDL uses these
  1140. * profiles, when available, otherwise it attempts to load an OpenGL ES
  1141. * library, e.g. that provided by the ANGLE project. This variable controls
  1142. * whether SDL follows this default behaviour or will always load an
  1143. * OpenGL ES library.
  1144. *
  1145. * Circumstances where this is useful include
  1146. * - Testing an app with a particular OpenGL ES implementation, e.g ANGLE,
  1147. * or emulator, e.g. those from ARM, Imagination or Qualcomm.
  1148. * - Resolving OpenGL ES function addresses at link time by linking with
  1149. * the OpenGL ES library instead of querying them at run time with
  1150. * SDL_GL_GetProcAddress().
  1151. *
  1152. * Caution: for an application to work with the default behaviour across
  1153. * different OpenGL drivers it must query the OpenGL ES function
  1154. * addresses at run time using SDL_GL_GetProcAddress().
  1155. *
  1156. * This variable is ignored on most platforms because OpenGL ES is native
  1157. * or not supported.
  1158. *
  1159. * This variable can be set to the following values:
  1160. * "0" - Use ES profile of OpenGL, if available. (Default when not set.)
  1161. * "1" - Load OpenGL ES library using the default library names.
  1162. *
  1163. */
  1164. #define SDL_HINT_OPENGL_ES_DRIVER "SDL_OPENGL_ES_DRIVER"
  1165. /**
  1166. * \brief A variable controlling which orientations are allowed on iOS/Android.
  1167. *
  1168. * In some circumstances it is necessary to be able to explicitly control
  1169. * which UI orientations are allowed.
  1170. *
  1171. * This variable is a space delimited list of the following values:
  1172. * "LandscapeLeft", "LandscapeRight", "Portrait" "PortraitUpsideDown"
  1173. */
  1174. #define SDL_HINT_ORIENTATIONS "SDL_IOS_ORIENTATIONS"
  1175. /**
  1176. * \brief A variable controlling the use of a sentinel event when polling the event queue
  1177. *
  1178. * This variable can be set to the following values:
  1179. * "0" - Disable poll sentinels
  1180. * "1" - Enable poll sentinels
  1181. *
  1182. * When polling for events, SDL_PumpEvents is used to gather new events from devices.
  1183. * If a device keeps producing new events between calls to SDL_PumpEvents, a poll loop will
  1184. * become stuck until the new events stop.
  1185. * This is most noticeable when moving a high frequency mouse.
  1186. *
  1187. * By default, poll sentinels are enabled.
  1188. */
  1189. #define SDL_HINT_POLL_SENTINEL "SDL_POLL_SENTINEL"
  1190. /**
  1191. * \brief Override for SDL_GetPreferredLocales()
  1192. *
  1193. * If set, this will be favored over anything the OS might report for the
  1194. * user's preferred locales. Changing this hint at runtime will not generate
  1195. * a SDL_EVENT_LOCALE_CHANGED event (but if you can change the hint, you can push
  1196. * your own event, if you want).
  1197. *
  1198. * The format of this hint is a comma-separated list of language and locale,
  1199. * combined with an underscore, as is a common format: "en_GB". Locale is
  1200. * optional: "en". So you might have a list like this: "en_GB,jp,es_PT"
  1201. */
  1202. #define SDL_HINT_PREFERRED_LOCALES "SDL_PREFERRED_LOCALES"
  1203. /**
  1204. * \brief A variable describing the content orientation on QtWayland-based platforms.
  1205. *
  1206. * On QtWayland platforms, windows are rotated client-side to allow for custom
  1207. * transitions. In order to correctly position overlays (e.g. volume bar) and
  1208. * gestures (e.g. events view, close/minimize gestures), the system needs to
  1209. * know in which orientation the application is currently drawing its contents.
  1210. *
  1211. * This does not cause the window to be rotated or resized, the application
  1212. * needs to take care of drawing the content in the right orientation (the
  1213. * framebuffer is always in portrait mode).
  1214. *
  1215. * This variable can be one of the following values:
  1216. * "primary" (default), "portrait", "landscape", "inverted-portrait", "inverted-landscape"
  1217. */
  1218. #define SDL_HINT_QTWAYLAND_CONTENT_ORIENTATION "SDL_QTWAYLAND_CONTENT_ORIENTATION"
  1219. /**
  1220. * \brief Flags to set on QtWayland windows to integrate with the native window manager.
  1221. *
  1222. * On QtWayland platforms, this hint controls the flags to set on the windows.
  1223. * For example, on Sailfish OS "OverridesSystemGestures" disables swipe gestures.
  1224. *
  1225. * This variable is a space-separated list of the following values (empty = no flags):
  1226. * "OverridesSystemGestures", "StaysOnTop", "BypassWindowManager"
  1227. */
  1228. #define SDL_HINT_QTWAYLAND_WINDOW_FLAGS "SDL_QTWAYLAND_WINDOW_FLAGS"
  1229. /**
  1230. * \brief A variable controlling whether the 2D render API is compatible or efficient.
  1231. *
  1232. * This variable can be set to the following values:
  1233. *
  1234. * "0" - Don't use batching to make rendering more efficient.
  1235. * "1" - Use batching, but might cause problems if app makes its own direct OpenGL calls.
  1236. *
  1237. * Up to SDL 2.0.9, the render API would draw immediately when requested. Now
  1238. * it batches up draw requests and sends them all to the GPU only when forced
  1239. * to (during SDL_RenderPresent, when changing render targets, by updating a
  1240. * texture that the batch needs, etc). This is significantly more efficient,
  1241. * but it can cause problems for apps that expect to render on top of the
  1242. * render API's output. As such, SDL will disable batching if a specific
  1243. * render backend is requested (since this might indicate that the app is
  1244. * planning to use the underlying graphics API directly). This hint can
  1245. * be used to explicitly request batching in this instance. It is a contract
  1246. * that you will either never use the underlying graphics API directly, or
  1247. * if you do, you will call SDL_RenderFlush() before you do so any current
  1248. * batch goes to the GPU before your work begins. Not following this contract
  1249. * will result in undefined behavior.
  1250. */
  1251. #define SDL_HINT_RENDER_BATCHING "SDL_RENDER_BATCHING"
  1252. /**
  1253. * \brief A variable controlling how the 2D render API renders lines
  1254. *
  1255. * This variable can be set to the following values:
  1256. * "0" - Use the default line drawing method (Bresenham's line algorithm as of SDL 2.0.20)
  1257. * "1" - Use the driver point API using Bresenham's line algorithm (correct, draws many points)
  1258. * "2" - Use the driver line API (occasionally misses line endpoints based on hardware driver quirks, was the default before 2.0.20)
  1259. * "3" - Use the driver geometry API (correct, draws thicker diagonal lines)
  1260. *
  1261. * This variable should be set when the renderer is created.
  1262. */
  1263. #define SDL_HINT_RENDER_LINE_METHOD "SDL_RENDER_LINE_METHOD"
  1264. /**
  1265. * \brief A variable controlling whether to enable Direct3D 11+'s Debug Layer.
  1266. *
  1267. * This variable does not have any effect on the Direct3D 9 based renderer.
  1268. *
  1269. * This variable can be set to the following values:
  1270. * "0" - Disable Debug Layer use
  1271. * "1" - Enable Debug Layer use
  1272. *
  1273. * By default, SDL does not use Direct3D Debug Layer.
  1274. */
  1275. #define SDL_HINT_RENDER_DIRECT3D11_DEBUG "SDL_RENDER_DIRECT3D11_DEBUG"
  1276. /**
  1277. * \brief A variable controlling whether the Direct3D device is initialized for thread-safe operations.
  1278. *
  1279. * This variable can be set to the following values:
  1280. * "0" - Thread-safety is not enabled (faster)
  1281. * "1" - Thread-safety is enabled
  1282. *
  1283. * By default the Direct3D device is created with thread-safety disabled.
  1284. */
  1285. #define SDL_HINT_RENDER_DIRECT3D_THREADSAFE "SDL_RENDER_DIRECT3D_THREADSAFE"
  1286. /**
  1287. * \brief A variable specifying which render driver to use.
  1288. *
  1289. * If the application doesn't pick a specific renderer to use, this variable
  1290. * specifies the name of the preferred renderer. If the preferred renderer
  1291. * can't be initialized, the normal default renderer is used.
  1292. *
  1293. * This variable is case insensitive and can be set to the following values:
  1294. * "direct3d"
  1295. * "direct3d11"
  1296. * "direct3d12"
  1297. * "opengl"
  1298. * "opengles2"
  1299. * "opengles"
  1300. * "metal"
  1301. * "software"
  1302. *
  1303. * The default varies by platform, but it's the first one in the list that
  1304. * is available on the current platform.
  1305. */
  1306. #define SDL_HINT_RENDER_DRIVER "SDL_RENDER_DRIVER"
  1307. /**
  1308. * \brief A variable controlling whether the OpenGL render driver uses shaders if they are available.
  1309. *
  1310. * This variable can be set to the following values:
  1311. * "0" - Disable shaders
  1312. * "1" - Enable shaders
  1313. *
  1314. * By default shaders are used if OpenGL supports them.
  1315. */
  1316. #define SDL_HINT_RENDER_OPENGL_SHADERS "SDL_RENDER_OPENGL_SHADERS"
  1317. /**
  1318. * \brief A variable controlling the scaling quality
  1319. *
  1320. * This variable can be set to the following values:
  1321. * "0" or "nearest" - Nearest pixel sampling
  1322. * "1" or "linear" - Linear filtering (supported by OpenGL and Direct3D)
  1323. * "2" or "best" - Currently this is the same as "linear"
  1324. *
  1325. * By default nearest pixel sampling is used
  1326. */
  1327. #define SDL_HINT_RENDER_SCALE_QUALITY "SDL_RENDER_SCALE_QUALITY"
  1328. /**
  1329. * \brief A variable controlling whether updates to the SDL screen surface should be synchronized with the vertical refresh, to avoid tearing.
  1330. *
  1331. * This variable can be set to the following values:
  1332. * "0" - Disable vsync
  1333. * "1" - Enable vsync
  1334. *
  1335. * By default SDL does not sync screen surface updates with vertical refresh.
  1336. */
  1337. #define SDL_HINT_RENDER_VSYNC "SDL_RENDER_VSYNC"
  1338. /**
  1339. * \brief A variable controlling if VSYNC is automatically disable if doesn't reach the enough FPS
  1340. *
  1341. * This variable can be set to the following values:
  1342. * "0" - It will be using VSYNC as defined in the main flag. Default
  1343. * "1" - If VSYNC was previously enabled, then it will disable VSYNC if doesn't reach enough speed
  1344. *
  1345. * By default SDL does not enable the automatic VSYNC
  1346. */
  1347. #define SDL_HINT_PS2_DYNAMIC_VSYNC "SDL_PS2_DYNAMIC_VSYNC"
  1348. /**
  1349. * \brief A variable to control whether the return key on the soft keyboard
  1350. * should hide the soft keyboard on Android and iOS.
  1351. *
  1352. * The variable can be set to the following values:
  1353. * "0" - The return key will be handled as a key event. This is the behaviour of SDL <= 2.0.3. (default)
  1354. * "1" - The return key will hide the keyboard.
  1355. *
  1356. * The value of this hint is used at runtime, so it can be changed at any time.
  1357. */
  1358. #define SDL_HINT_RETURN_KEY_HIDES_IME "SDL_RETURN_KEY_HIDES_IME"
  1359. /**
  1360. * \brief Tell SDL which Dispmanx layer to use on a Raspberry PI
  1361. *
  1362. * Also known as Z-order. The variable can take a negative or positive value.
  1363. * The default is 10000.
  1364. */
  1365. #define SDL_HINT_RPI_VIDEO_LAYER "SDL_RPI_VIDEO_LAYER"
  1366. /**
  1367. * \brief Specify an "activity name" for screensaver inhibition.
  1368. *
  1369. * Some platforms, notably Linux desktops, list the applications which are
  1370. * inhibiting the screensaver or other power-saving features.
  1371. *
  1372. * This hint lets you specify the "activity name" sent to the OS when
  1373. * SDL_DisableScreenSaver() is used (or the screensaver is automatically
  1374. * disabled). The contents of this hint are used when the screensaver is
  1375. * disabled. You should use a string that describes what your program is doing
  1376. * (and, therefore, why the screensaver is disabled). For example, "Playing a
  1377. * game" or "Watching a video".
  1378. *
  1379. * Setting this to "" or leaving it unset will have SDL use a reasonable
  1380. * default: "Playing a game" or something similar.
  1381. *
  1382. * On targets where this is not supported, this hint does nothing.
  1383. */
  1384. #define SDL_HINT_SCREENSAVER_INHIBIT_ACTIVITY_NAME "SDL_SCREENSAVER_INHIBIT_ACTIVITY_NAME"
  1385. /**
  1386. * \brief Specifies whether SDL_THREAD_PRIORITY_TIME_CRITICAL should be treated as realtime.
  1387. *
  1388. * On some platforms, like Linux, a realtime priority thread may be subject to restrictions
  1389. * that require special handling by the application. This hint exists to let SDL know that
  1390. * the app is prepared to handle said restrictions.
  1391. *
  1392. * On Linux, SDL will apply the following configuration to any thread that becomes realtime:
  1393. * * The SCHED_RESET_ON_FORK bit will be set on the scheduling policy,
  1394. * * An RLIMIT_RTTIME budget will be configured to the rtkit specified limit.
  1395. * * Exceeding this limit will result in the kernel sending SIGKILL to the app,
  1396. * * Refer to the man pages for more information.
  1397. *
  1398. * This variable can be set to the following values:
  1399. * "0" - default platform specific behaviour
  1400. * "1" - Force SDL_THREAD_PRIORITY_TIME_CRITICAL to a realtime scheduling policy
  1401. */
  1402. #define SDL_HINT_THREAD_FORCE_REALTIME_TIME_CRITICAL "SDL_THREAD_FORCE_REALTIME_TIME_CRITICAL"
  1403. /**
  1404. * \brief A string specifying additional information to use with SDL_SetThreadPriority.
  1405. *
  1406. * By default SDL_SetThreadPriority will make appropriate system changes in order to
  1407. * apply a thread priority. For example on systems using pthreads the scheduler policy
  1408. * is changed automatically to a policy that works well with a given priority.
  1409. * Code which has specific requirements can override SDL's default behavior with this hint.
  1410. *
  1411. * pthread hint values are "current", "other", "fifo" and "rr".
  1412. * Currently no other platform hint values are defined but may be in the future.
  1413. *
  1414. * \note On Linux, the kernel may send SIGKILL to realtime tasks which exceed the distro
  1415. * configured execution budget for rtkit. This budget can be queried through RLIMIT_RTTIME
  1416. * after calling SDL_SetThreadPriority().
  1417. */
  1418. #define SDL_HINT_THREAD_PRIORITY_POLICY "SDL_THREAD_PRIORITY_POLICY"
  1419. /**
  1420. * \brief A string specifying SDL's threads stack size in bytes or "0" for the backend's default size
  1421. *
  1422. * Use this hint in case you need to set SDL's threads stack size to other than the default.
  1423. * This is specially useful if you build SDL against a non glibc libc library (such as musl) which
  1424. * provides a relatively small default thread stack size (a few kilobytes versus the default 8MB glibc uses).
  1425. * Support for this hint is currently available only in the pthread, Windows, and PSP backend.
  1426. *
  1427. * Instead of this hint, in 2.0.9 and later, you can use
  1428. * SDL_CreateThreadWithStackSize(). This hint only works with the classic
  1429. * SDL_CreateThread().
  1430. */
  1431. #define SDL_HINT_THREAD_STACK_SIZE "SDL_THREAD_STACK_SIZE"
  1432. /**
  1433. * \brief A variable that controls the timer resolution, in milliseconds.
  1434. *
  1435. * The higher resolution the timer, the more frequently the CPU services
  1436. * timer interrupts, and the more precise delays are, but this takes up
  1437. * power and CPU time. This hint is only used on Windows.
  1438. *
  1439. * See this blog post for more information:
  1440. * http://randomascii.wordpress.com/2013/07/08/windows-timer-resolution-megawatts-wasted/
  1441. *
  1442. * If this variable is set to "0", the system timer resolution is not set.
  1443. *
  1444. * The default value is "1". This hint may be set at any time.
  1445. */
  1446. #define SDL_HINT_TIMER_RESOLUTION "SDL_TIMER_RESOLUTION"
  1447. /**
  1448. * \brief A variable controlling whether touch events should generate synthetic mouse events
  1449. *
  1450. * This variable can be set to the following values:
  1451. * "0" - Touch events will not generate mouse events
  1452. * "1" - Touch events will generate mouse events
  1453. *
  1454. * By default SDL will generate mouse events for touch events
  1455. */
  1456. #define SDL_HINT_TOUCH_MOUSE_EVENTS "SDL_TOUCH_MOUSE_EVENTS"
  1457. /**
  1458. * \brief A variable controlling which touchpad should generate synthetic mouse events
  1459. *
  1460. * This variable can be set to the following values:
  1461. * "0" - Only front touchpad should generate mouse events. Default
  1462. * "1" - Only back touchpad should generate mouse events.
  1463. * "2" - Both touchpads should generate mouse events.
  1464. *
  1465. * By default SDL will generate mouse events for all touch devices
  1466. */
  1467. #define SDL_HINT_VITA_TOUCH_MOUSE_DEVICE "SDL_HINT_VITA_TOUCH_MOUSE_DEVICE"
  1468. /**
  1469. * \brief A variable controlling whether the Android / tvOS remotes
  1470. * should be listed as joystick devices, instead of sending keyboard events.
  1471. *
  1472. * This variable can be set to the following values:
  1473. * "0" - Remotes send enter/escape/arrow key events
  1474. * "1" - Remotes are available as 2 axis, 2 button joysticks (the default).
  1475. */
  1476. #define SDL_HINT_TV_REMOTE_AS_JOYSTICK "SDL_TV_REMOTE_AS_JOYSTICK"
  1477. /**
  1478. * \brief A variable controlling whether the screensaver is enabled.
  1479. *
  1480. * This variable can be set to the following values:
  1481. * "0" - Disable screensaver
  1482. * "1" - Enable screensaver
  1483. *
  1484. * By default SDL will disable the screensaver.
  1485. */
  1486. #define SDL_HINT_VIDEO_ALLOW_SCREENSAVER "SDL_VIDEO_ALLOW_SCREENSAVER"
  1487. /**
  1488. * \brief Tell the video driver that we only want a double buffer.
  1489. *
  1490. * By default, most lowlevel 2D APIs will use a triple buffer scheme that
  1491. * wastes no CPU time on waiting for vsync after issuing a flip, but
  1492. * introduces a frame of latency. On the other hand, using a double buffer
  1493. * scheme instead is recommended for cases where low latency is an important
  1494. * factor because we save a whole frame of latency.
  1495. * We do so by waiting for vsync immediately after issuing a flip, usually just
  1496. * after eglSwapBuffers call in the backend's *_SwapWindow function.
  1497. *
  1498. * Since it's driver-specific, it's only supported where possible and
  1499. * implemented. Currently supported the following drivers:
  1500. *
  1501. * - KMSDRM (kmsdrm)
  1502. * - Raspberry Pi (raspberrypi)
  1503. */
  1504. #define SDL_HINT_VIDEO_DOUBLE_BUFFER "SDL_VIDEO_DOUBLE_BUFFER"
  1505. /**
  1506. * \brief If eglGetPlatformDisplay fails, fall back to calling eglGetDisplay.
  1507. *
  1508. * This variable can be set to one of the following values:
  1509. * "0" - Do not fall back to eglGetDisplay
  1510. * "1" - Fall back to eglGetDisplay if eglGetPlatformDisplay fails.
  1511. *
  1512. * By default, SDL will fall back to eglGetDisplay if eglGetPlatformDisplay
  1513. * fails.
  1514. */
  1515. #define SDL_HINT_VIDEO_EGL_ALLOW_GETDISPLAY_FALLBACK "SDL_VIDEO_EGL_GETDISPLAY_FALLBACK"
  1516. /**
  1517. * \brief A variable controlling whether the graphics context is externally managed.
  1518. *
  1519. * This variable can be set to the following values:
  1520. * "0" - SDL will manage graphics contexts that are attached to windows.
  1521. * "1" - Disable graphics context management on windows.
  1522. *
  1523. * By default SDL will manage OpenGL contexts in certain situations. For example, on Android the
  1524. * context will be automatically saved and restored when pausing the application. Additionally, some
  1525. * platforms will assume usage of OpenGL if Vulkan isn't used. Setting this to "1" will prevent this
  1526. * behavior, which is desireable when the application manages the graphics context, such as
  1527. * an externally managed OpenGL context or attaching a Vulkan surface to the window.
  1528. */
  1529. #define SDL_HINT_VIDEO_EXTERNAL_CONTEXT "SDL_VIDEO_EXTERNAL_CONTEXT"
  1530. /**
  1531. * \brief A variable that dictates policy for fullscreen Spaces on macOS.
  1532. *
  1533. * This hint only applies to macOS.
  1534. *
  1535. * The variable can be set to the following values:
  1536. * "0" - Disable Spaces support (FULLSCREEN_DESKTOP won't use them and
  1537. * SDL_WINDOW_RESIZABLE windows won't offer the "fullscreen"
  1538. * button on their titlebars).
  1539. * "1" - Enable Spaces support (FULLSCREEN_DESKTOP will use them and
  1540. * SDL_WINDOW_RESIZABLE windows will offer the "fullscreen"
  1541. * button on their titlebars).
  1542. *
  1543. * The default value is "1". This hint must be set before any windows are created.
  1544. */
  1545. #define SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES "SDL_VIDEO_MAC_FULLSCREEN_SPACES"
  1546. /**
  1547. * \brief Minimize your SDL_Window if it loses key focus when in fullscreen mode. Defaults to false.
  1548. * \warning Before SDL 2.0.14, this defaulted to true! In 2.0.14, we're
  1549. * seeing if "true" causes more problems than it solves in modern times.
  1550. *
  1551. */
  1552. #define SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS"
  1553. /**
  1554. * \brief A variable controlling whether the libdecor Wayland backend is allowed to be used.
  1555. *
  1556. * This variable can be set to the following values:
  1557. * "0" - libdecor use is disabled.
  1558. * "1" - libdecor use is enabled (default).
  1559. *
  1560. * libdecor is used over xdg-shell when xdg-decoration protocol is unavailable.
  1561. */
  1562. #define SDL_HINT_VIDEO_WAYLAND_ALLOW_LIBDECOR "SDL_VIDEO_WAYLAND_ALLOW_LIBDECOR"
  1563. /**
  1564. * \brief A variable controlling whether the libdecor Wayland backend is preferred over native decrations.
  1565. *
  1566. * When this hint is set, libdecor will be used to provide window decorations, even if xdg-decoration is
  1567. * available. (Note that, by default, libdecor will use xdg-decoration itself if available).
  1568. *
  1569. * This variable can be set to the following values:
  1570. * "0" - libdecor is enabled only if server-side decorations are unavailable.
  1571. * "1" - libdecor is always enabled if available.
  1572. *
  1573. * libdecor is used over xdg-shell when xdg-decoration protocol is unavailable.
  1574. */
  1575. #define SDL_HINT_VIDEO_WAYLAND_PREFER_LIBDECOR "SDL_VIDEO_WAYLAND_PREFER_LIBDECOR"
  1576. /**
  1577. * \brief A variable controlling whether video mode emulation is enabled under Wayland.
  1578. *
  1579. * When this hint is set, a standard set of emulated CVT video modes will be exposed for use by the application.
  1580. * If it is disabled, the only modes exposed will be the logical desktop size and, in the case of a scaled
  1581. * desktop, the native display resolution.
  1582. *
  1583. * This variable can be set to the following values:
  1584. * "0" - Video mode emulation is disabled.
  1585. * "1" - Video mode emulation is enabled.
  1586. *
  1587. * By default video mode emulation is enabled.
  1588. */
  1589. #define SDL_HINT_VIDEO_WAYLAND_MODE_EMULATION "SDL_VIDEO_WAYLAND_MODE_EMULATION"
  1590. /**
  1591. * \brief Enable or disable mouse pointer warp emulation, needed by some older games.
  1592. *
  1593. * When this hint is set, any SDL will emulate mouse warps using relative mouse mode.
  1594. * This is required for some older games (such as Source engine games), which warp the
  1595. * mouse to the centre of the screen rather than using relative mouse motion. Note that
  1596. * relative mouse mode may have different mouse acceleration behaviour than pointer warps.
  1597. *
  1598. * This variable can be set to the following values:
  1599. * "0" - All mouse warps fail, as mouse warping is not available under wayland.
  1600. * "1" - Some mouse warps will be emulated by forcing relative mouse mode.
  1601. *
  1602. * If not set, this is automatically enabled unless an application uses relative mouse
  1603. * mode directly.
  1604. */
  1605. #define SDL_HINT_VIDEO_WAYLAND_EMULATE_MOUSE_WARP "SDL_VIDEO_WAYLAND_EMULATE_MOUSE_WARP"
  1606. /**
  1607. * \brief A variable that is the address of another SDL_Window* (as a hex string formatted with "%p").
  1608. *
  1609. * If this hint is set before SDL_CreateWindowFrom() and the SDL_Window* it is set to has
  1610. * SDL_WINDOW_OPENGL set (and running on WGL only, currently), then two things will occur on the newly
  1611. * created SDL_Window:
  1612. *
  1613. * 1. Its pixel format will be set to the same pixel format as this SDL_Window. This is
  1614. * needed for example when sharing an OpenGL context across multiple windows.
  1615. *
  1616. * 2. The flag SDL_WINDOW_OPENGL will be set on the new window so it can be used for
  1617. * OpenGL rendering.
  1618. *
  1619. * This variable can be set to the following values:
  1620. * The address (as a string "%p") of the SDL_Window* that new windows created with SDL_CreateWindowFrom() should
  1621. * share a pixel format with.
  1622. */
  1623. #define SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT "SDL_VIDEO_WINDOW_SHARE_PIXEL_FORMAT"
  1624. /**
  1625. * \brief When calling SDL_CreateWindowFrom(), make the window compatible with OpenGL.
  1626. *
  1627. * This variable can be set to the following values:
  1628. * "0" - Don't add any graphics flags to the SDL_WindowFlags
  1629. * "1" - Add SDL_WINDOW_OPENGL to the SDL_WindowFlags
  1630. *
  1631. * By default SDL will not make the foreign window compatible with OpenGL.
  1632. */
  1633. #define SDL_HINT_VIDEO_FOREIGN_WINDOW_OPENGL "SDL_VIDEO_FOREIGN_WINDOW_OPENGL"
  1634. /**
  1635. * \brief When calling SDL_CreateWindowFrom(), make the window compatible with Vulkan.
  1636. *
  1637. * This variable can be set to the following values:
  1638. * "0" - Don't add any graphics flags to the SDL_WindowFlags
  1639. * "1" - Add SDL_WINDOW_VULKAN to the SDL_WindowFlags
  1640. *
  1641. * By default SDL will not make the foreign window compatible with Vulkan.
  1642. */
  1643. #define SDL_HINT_VIDEO_FOREIGN_WINDOW_VULKAN "SDL_VIDEO_FOREIGN_WINDOW_VULKAN"
  1644. /**
  1645. * \brief A variable specifying which shader compiler to preload when using the Chrome ANGLE binaries
  1646. *
  1647. * SDL has EGL and OpenGL ES2 support on Windows via the ANGLE project. It
  1648. * can use two different sets of binaries, those compiled by the user from source
  1649. * or those provided by the Chrome browser. In the later case, these binaries require
  1650. * that SDL loads a DLL providing the shader compiler.
  1651. *
  1652. * This variable can be set to the following values:
  1653. * "d3dcompiler_46.dll" - default, best for Vista or later.
  1654. * "d3dcompiler_43.dll" - for XP support.
  1655. * "none" - do not load any library, useful if you compiled ANGLE from source and included the compiler in your binaries.
  1656. *
  1657. */
  1658. #define SDL_HINT_VIDEO_WIN_D3DCOMPILER "SDL_VIDEO_WIN_D3DCOMPILER"
  1659. /**
  1660. * \brief A variable controlling whether the OpenGL context should be created
  1661. * with EGL by default
  1662. *
  1663. * This variable can be set to the following values:
  1664. * "0" - Use platform-specific GL context creation API (GLX, WGL, CGL, etc)
  1665. * "1" - Use EGL
  1666. *
  1667. * By default SDL will use the platform-specific GL context API when both are present.
  1668. */
  1669. #define SDL_HINT_VIDEO_FORCE_EGL "SDL_VIDEO_FORCE_EGL"
  1670. /**
  1671. * \brief A variable controlling whether the X11 _NET_WM_BYPASS_COMPOSITOR hint should be used.
  1672. *
  1673. * This variable can be set to the following values:
  1674. * "0" - Disable _NET_WM_BYPASS_COMPOSITOR
  1675. * "1" - Enable _NET_WM_BYPASS_COMPOSITOR
  1676. *
  1677. * By default SDL will use _NET_WM_BYPASS_COMPOSITOR
  1678. *
  1679. */
  1680. #define SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR "SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR"
  1681. /**
  1682. * \brief A variable controlling whether the X11 _NET_WM_PING protocol should be supported.
  1683. *
  1684. * This variable can be set to the following values:
  1685. * "0" - Disable _NET_WM_PING
  1686. * "1" - Enable _NET_WM_PING
  1687. *
  1688. * By default SDL will use _NET_WM_PING, but for applications that know they
  1689. * will not always be able to respond to ping requests in a timely manner they can
  1690. * turn it off to avoid the window manager thinking the app is hung.
  1691. * The hint is checked in CreateWindow.
  1692. */
  1693. #define SDL_HINT_VIDEO_X11_NET_WM_PING "SDL_VIDEO_X11_NET_WM_PING"
  1694. /**
  1695. * \brief A variable forcing the visual ID chosen for new X11 windows
  1696. *
  1697. */
  1698. #define SDL_HINT_VIDEO_X11_WINDOW_VISUALID "SDL_VIDEO_X11_WINDOW_VISUALID"
  1699. /**
  1700. * \brief A variable controlling whether the X11 XRandR extension should be used.
  1701. *
  1702. * This variable can be set to the following values:
  1703. * "0" - Disable XRandR
  1704. * "1" - Enable XRandR
  1705. *
  1706. * By default SDL will use XRandR.
  1707. */
  1708. #define SDL_HINT_VIDEO_X11_XRANDR "SDL_VIDEO_X11_XRANDR"
  1709. /**
  1710. * \brief Controls how the fact chunk affects the loading of a WAVE file.
  1711. *
  1712. * The fact chunk stores information about the number of samples of a WAVE
  1713. * file. The Standards Update from Microsoft notes that this value can be used
  1714. * to 'determine the length of the data in seconds'. This is especially useful
  1715. * for compressed formats (for which this is a mandatory chunk) if they produce
  1716. * multiple sample frames per block and truncating the block is not allowed.
  1717. * The fact chunk can exactly specify how many sample frames there should be
  1718. * in this case.
  1719. *
  1720. * Unfortunately, most application seem to ignore the fact chunk and so SDL
  1721. * ignores it by default as well.
  1722. *
  1723. * This variable can be set to the following values:
  1724. *
  1725. * "truncate" - Use the number of samples to truncate the wave data if
  1726. * the fact chunk is present and valid
  1727. * "strict" - Like "truncate", but raise an error if the fact chunk
  1728. * is invalid, not present for non-PCM formats, or if the
  1729. * data chunk doesn't have that many samples
  1730. * "ignorezero" - Like "truncate", but ignore fact chunk if the number of
  1731. * samples is zero
  1732. * "ignore" - Ignore fact chunk entirely (default)
  1733. */
  1734. #define SDL_HINT_WAVE_FACT_CHUNK "SDL_WAVE_FACT_CHUNK"
  1735. /**
  1736. * \brief Controls how the size of the RIFF chunk affects the loading of a WAVE file.
  1737. *
  1738. * The size of the RIFF chunk (which includes all the sub-chunks of the WAVE
  1739. * file) is not always reliable. In case the size is wrong, it's possible to
  1740. * just ignore it and step through the chunks until a fixed limit is reached.
  1741. *
  1742. * Note that files that have trailing data unrelated to the WAVE file or
  1743. * corrupt files may slow down the loading process without a reliable boundary.
  1744. * By default, SDL stops after 10000 chunks to prevent wasting time. Use the
  1745. * environment variable SDL_WAVE_CHUNK_LIMIT to adjust this value.
  1746. *
  1747. * This variable can be set to the following values:
  1748. *
  1749. * "force" - Always use the RIFF chunk size as a boundary for the chunk search
  1750. * "ignorezero" - Like "force", but a zero size searches up to 4 GiB (default)
  1751. * "ignore" - Ignore the RIFF chunk size and always search up to 4 GiB
  1752. * "maximum" - Search for chunks until the end of file (not recommended)
  1753. */
  1754. #define SDL_HINT_WAVE_RIFF_CHUNK_SIZE "SDL_WAVE_RIFF_CHUNK_SIZE"
  1755. /**
  1756. * \brief Controls how a truncated WAVE file is handled.
  1757. *
  1758. * A WAVE file is considered truncated if any of the chunks are incomplete or
  1759. * the data chunk size is not a multiple of the block size. By default, SDL
  1760. * decodes until the first incomplete block, as most applications seem to do.
  1761. *
  1762. * This variable can be set to the following values:
  1763. *
  1764. * "verystrict" - Raise an error if the file is truncated
  1765. * "strict" - Like "verystrict", but the size of the RIFF chunk is ignored
  1766. * "dropframe" - Decode until the first incomplete sample frame
  1767. * "dropblock" - Decode until the first incomplete block (default)
  1768. */
  1769. #define SDL_HINT_WAVE_TRUNCATION "SDL_WAVE_TRUNCATION"
  1770. /**
  1771. * \brief Tell SDL not to name threads on Windows with the 0x406D1388 Exception.
  1772. * The 0x406D1388 Exception is a trick used to inform Visual Studio of a
  1773. * thread's name, but it tends to cause problems with other debuggers,
  1774. * and the .NET runtime. Note that SDL 2.0.6 and later will still use
  1775. * the (safer) SetThreadDescription API, introduced in the Windows 10
  1776. * Creators Update, if available.
  1777. *
  1778. * The variable can be set to the following values:
  1779. * "0" - SDL will raise the 0x406D1388 Exception to name threads.
  1780. * This is the default behavior of SDL <= 2.0.4.
  1781. * "1" - SDL will not raise this exception, and threads will be unnamed. (default)
  1782. * This is necessary with .NET languages or debuggers that aren't Visual Studio.
  1783. */
  1784. #define SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING "SDL_WINDOWS_DISABLE_THREAD_NAMING"
  1785. /**
  1786. * \brief Controls whether menus can be opened with their keyboard shortcut (Alt+mnemonic).
  1787. *
  1788. * If the mnemonics are enabled, then menus can be opened by pressing the Alt
  1789. * key and the corresponding mnemonic (for example, Alt+F opens the File menu).
  1790. * However, in case an invalid mnemonic is pressed, Windows makes an audible
  1791. * beep to convey that nothing happened. This is true even if the window has
  1792. * no menu at all!
  1793. *
  1794. * Because most SDL applications don't have menus, and some want to use the Alt
  1795. * key for other purposes, SDL disables mnemonics (and the beeping) by default.
  1796. *
  1797. * Note: This also affects keyboard events: with mnemonics enabled, when a
  1798. * menu is opened from the keyboard, you will not receive a KEYUP event for
  1799. * the mnemonic key, and *might* not receive one for Alt.
  1800. *
  1801. * This variable can be set to the following values:
  1802. * "0" - Alt+mnemonic does nothing, no beeping. (default)
  1803. * "1" - Alt+mnemonic opens menus, invalid mnemonics produce a beep.
  1804. */
  1805. #define SDL_HINT_WINDOWS_ENABLE_MENU_MNEMONICS "SDL_WINDOWS_ENABLE_MENU_MNEMONICS"
  1806. /**
  1807. * \brief A variable controlling whether the windows message loop is processed by SDL
  1808. *
  1809. * This variable can be set to the following values:
  1810. * "0" - The window message loop is not run
  1811. * "1" - The window message loop is processed in SDL_PumpEvents()
  1812. *
  1813. * By default SDL will process the windows message loop
  1814. */
  1815. #define SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP "SDL_WINDOWS_ENABLE_MESSAGELOOP"
  1816. /**
  1817. * \brief Force SDL to use Critical Sections for mutexes on Windows.
  1818. * On Windows 7 and newer, Slim Reader/Writer Locks are available.
  1819. * They offer better performance, allocate no kernel ressources and
  1820. * use less memory. SDL will fall back to Critical Sections on older
  1821. * OS versions or if forced to by this hint.
  1822. *
  1823. * This variable can be set to the following values:
  1824. * "0" - Use SRW Locks when available. If not, fall back to Critical Sections. (default)
  1825. * "1" - Force the use of Critical Sections in all cases.
  1826. *
  1827. */
  1828. #define SDL_HINT_WINDOWS_FORCE_MUTEX_CRITICAL_SECTIONS "SDL_WINDOWS_FORCE_MUTEX_CRITICAL_SECTIONS"
  1829. /**
  1830. * \brief Force SDL to use Kernel Semaphores on Windows.
  1831. * Kernel Semaphores are inter-process and require a context
  1832. * switch on every interaction. On Windows 8 and newer, the
  1833. * WaitOnAddress API is available. Using that and atomics to
  1834. * implement semaphores increases performance.
  1835. * SDL will fall back to Kernel Objects on older OS versions
  1836. * or if forced to by this hint.
  1837. *
  1838. * This variable can be set to the following values:
  1839. * "0" - Use Atomics and WaitOnAddress API when available. If not, fall back to Kernel Objects. (default)
  1840. * "1" - Force the use of Kernel Objects in all cases.
  1841. *
  1842. */
  1843. #define SDL_HINT_WINDOWS_FORCE_SEMAPHORE_KERNEL "SDL_WINDOWS_FORCE_SEMAPHORE_KERNEL"
  1844. /**
  1845. * \brief A variable to specify custom icon resource id from RC file on Windows platform
  1846. */
  1847. #define SDL_HINT_WINDOWS_INTRESOURCE_ICON "SDL_WINDOWS_INTRESOURCE_ICON"
  1848. #define SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL "SDL_WINDOWS_INTRESOURCE_ICON_SMALL"
  1849. /**
  1850. * \brief Tell SDL not to generate window-close events for Alt+F4 on Windows.
  1851. *
  1852. * The variable can be set to the following values:
  1853. * "0" - SDL will generate a window-close event when it sees Alt+F4.
  1854. * "1" - SDL will only do normal key handling for Alt+F4.
  1855. */
  1856. #define SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4 "SDL_WINDOWS_NO_CLOSE_ON_ALT_F4"
  1857. /**
  1858. * \brief Use the D3D9Ex API introduced in Windows Vista, instead of normal D3D9.
  1859. * Direct3D 9Ex contains changes to state management that can eliminate device
  1860. * loss errors during scenarios like Alt+Tab or UAC prompts. D3D9Ex may require
  1861. * some changes to your application to cope with the new behavior, so this
  1862. * is disabled by default.
  1863. *
  1864. * This hint must be set before initializing the video subsystem.
  1865. *
  1866. * For more information on Direct3D 9Ex, see:
  1867. * - https://docs.microsoft.com/en-us/windows/win32/direct3darticles/graphics-apis-in-windows-vista#direct3d-9ex
  1868. * - https://docs.microsoft.com/en-us/windows/win32/direct3darticles/direct3d-9ex-improvements
  1869. *
  1870. * This variable can be set to the following values:
  1871. * "0" - Use the original Direct3D 9 API (default)
  1872. * "1" - Use the Direct3D 9Ex API on Vista and later (and fall back if D3D9Ex is unavailable)
  1873. *
  1874. */
  1875. #define SDL_HINT_WINDOWS_USE_D3D9EX "SDL_WINDOWS_USE_D3D9EX"
  1876. /**
  1877. * \brief A variable controlling whether the window frame and title bar are interactive when the cursor is hidden
  1878. *
  1879. * This variable can be set to the following values:
  1880. * "0" - The window frame is not interactive when the cursor is hidden (no move, resize, etc)
  1881. * "1" - The window frame is interactive when the cursor is hidden
  1882. *
  1883. * By default SDL will allow interaction with the window frame when the cursor is hidden
  1884. */
  1885. #define SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN "SDL_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN"
  1886. /**
  1887. * \brief A variable controlling whether the window is activated when the SDL_ShowWindow function is called
  1888. *
  1889. * This variable can be set to the following values:
  1890. * "0" - The window is not activated when the SDL_ShowWindow function is called
  1891. * "1" - The window is activated when the SDL_ShowWindow function is called
  1892. *
  1893. * By default SDL will activate the window when the SDL_ShowWindow function is called
  1894. */
  1895. #define SDL_HINT_WINDOW_ACTIVATE_WHEN_SHOWN "SDL_WINDOW_ACTIVATE_WHEN_SHOWN"
  1896. /** \brief Allows back-button-press events on Windows Phone to be marked as handled
  1897. *
  1898. * Windows Phone devices typically feature a Back button. When pressed,
  1899. * the OS will emit back-button-press events, which apps are expected to
  1900. * handle in an appropriate manner. If apps do not explicitly mark these
  1901. * events as 'Handled', then the OS will invoke its default behavior for
  1902. * unhandled back-button-press events, which on Windows Phone 8 and 8.1 is to
  1903. * terminate the app (and attempt to switch to the previous app, or to the
  1904. * device's home screen).
  1905. *
  1906. * Setting the SDL_HINT_WINRT_HANDLE_BACK_BUTTON hint to "1" will cause SDL
  1907. * to mark back-button-press events as Handled, if and when one is sent to
  1908. * the app.
  1909. *
  1910. * Internally, Windows Phone sends back button events as parameters to
  1911. * special back-button-press callback functions. Apps that need to respond
  1912. * to back-button-press events are expected to register one or more
  1913. * callback functions for such, shortly after being launched (during the
  1914. * app's initialization phase). After the back button is pressed, the OS
  1915. * will invoke these callbacks. If the app's callback(s) do not explicitly
  1916. * mark the event as handled by the time they return, or if the app never
  1917. * registers one of these callback, the OS will consider the event
  1918. * un-handled, and it will apply its default back button behavior (terminate
  1919. * the app).
  1920. *
  1921. * SDL registers its own back-button-press callback with the Windows Phone
  1922. * OS. This callback will emit a pair of SDL key-press events (SDL_EVENT_KEY_DOWN
  1923. * and SDL_EVENT_KEY_UP), each with a scancode of SDL_SCANCODE_AC_BACK, after which
  1924. * it will check the contents of the hint, SDL_HINT_WINRT_HANDLE_BACK_BUTTON.
  1925. * If the hint's value is set to "1", the back button event's Handled
  1926. * property will get set to 'true'. If the hint's value is set to something
  1927. * else, or if it is unset, SDL will leave the event's Handled property
  1928. * alone. (By default, the OS sets this property to 'false', to note.)
  1929. *
  1930. * SDL apps can either set SDL_HINT_WINRT_HANDLE_BACK_BUTTON well before a
  1931. * back button is pressed, or can set it in direct-response to a back button
  1932. * being pressed.
  1933. *
  1934. * In order to get notified when a back button is pressed, SDL apps should
  1935. * register a callback function with SDL_AddEventWatch(), and have it listen
  1936. * for SDL_EVENT_KEY_DOWN events that have a scancode of SDL_SCANCODE_AC_BACK.
  1937. * (Alternatively, SDL_EVENT_KEY_UP events can be listened-for. Listening for
  1938. * either event type is suitable.) Any value of SDL_HINT_WINRT_HANDLE_BACK_BUTTON
  1939. * set by such a callback, will be applied to the OS' current
  1940. * back-button-press event.
  1941. *
  1942. * More details on back button behavior in Windows Phone apps can be found
  1943. * at the following page, on Microsoft's developer site:
  1944. * http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj247550(v=vs.105).aspx
  1945. */
  1946. #define SDL_HINT_WINRT_HANDLE_BACK_BUTTON "SDL_WINRT_HANDLE_BACK_BUTTON"
  1947. /** \brief Label text for a WinRT app's privacy policy link
  1948. *
  1949. * Network-enabled WinRT apps must include a privacy policy. On Windows 8, 8.1, and RT,
  1950. * Microsoft mandates that this policy be available via the Windows Settings charm.
  1951. * SDL provides code to add a link there, with its label text being set via the
  1952. * optional hint, SDL_HINT_WINRT_PRIVACY_POLICY_LABEL.
  1953. *
  1954. * Please note that a privacy policy's contents are not set via this hint. A separate
  1955. * hint, SDL_HINT_WINRT_PRIVACY_POLICY_URL, is used to link to the actual text of the
  1956. * policy.
  1957. *
  1958. * The contents of this hint should be encoded as a UTF8 string.
  1959. *
  1960. * The default value is "Privacy Policy". This hint should only be set during app
  1961. * initialization, preferably before any calls to SDL_Init().
  1962. *
  1963. * For additional information on linking to a privacy policy, see the documentation for
  1964. * SDL_HINT_WINRT_PRIVACY_POLICY_URL.
  1965. */
  1966. #define SDL_HINT_WINRT_PRIVACY_POLICY_LABEL "SDL_WINRT_PRIVACY_POLICY_LABEL"
  1967. /**
  1968. * \brief A URL to a WinRT app's privacy policy
  1969. *
  1970. * All network-enabled WinRT apps must make a privacy policy available to its
  1971. * users. On Windows 8, 8.1, and RT, Microsoft mandates that this policy be
  1972. * be available in the Windows Settings charm, as accessed from within the app.
  1973. * SDL provides code to add a URL-based link there, which can point to the app's
  1974. * privacy policy.
  1975. *
  1976. * To setup a URL to an app's privacy policy, set SDL_HINT_WINRT_PRIVACY_POLICY_URL
  1977. * before calling any SDL_Init() functions. The contents of the hint should
  1978. * be a valid URL. For example, "http://www.example.com".
  1979. *
  1980. * The default value is "", which will prevent SDL from adding a privacy policy
  1981. * link to the Settings charm. This hint should only be set during app init.
  1982. *
  1983. * The label text of an app's "Privacy Policy" link may be customized via another
  1984. * hint, SDL_HINT_WINRT_PRIVACY_POLICY_LABEL.
  1985. *
  1986. * Please note that on Windows Phone, Microsoft does not provide standard UI
  1987. * for displaying a privacy policy link, and as such, SDL_HINT_WINRT_PRIVACY_POLICY_URL
  1988. * will not get used on that platform. Network-enabled phone apps should display
  1989. * their privacy policy through some other, in-app means.
  1990. */
  1991. #define SDL_HINT_WINRT_PRIVACY_POLICY_URL "SDL_WINRT_PRIVACY_POLICY_URL"
  1992. /**
  1993. * \brief Mark X11 windows as override-redirect.
  1994. *
  1995. * If set, this _might_ increase framerate at the expense of the desktop
  1996. * not working as expected. Override-redirect windows aren't noticed by the
  1997. * window manager at all.
  1998. *
  1999. * You should probably only use this for fullscreen windows, and you probably
  2000. * shouldn't even use it for that. But it's here if you want to try!
  2001. */
  2002. #define SDL_HINT_X11_FORCE_OVERRIDE_REDIRECT "SDL_X11_FORCE_OVERRIDE_REDIRECT"
  2003. /**
  2004. * \brief A variable that lets you disable the detection and use of Xinput gamepad devices
  2005. *
  2006. * The variable can be set to the following values:
  2007. * "0" - Disable XInput detection (only uses direct input)
  2008. * "1" - Enable XInput detection (the default)
  2009. */
  2010. #define SDL_HINT_XINPUT_ENABLED "SDL_XINPUT_ENABLED"
  2011. /**
  2012. * \brief A variable that lets you disable the detection and use of DirectInput gamepad devices
  2013. *
  2014. * The variable can be set to the following values:
  2015. * "0" - Disable DirectInput detection (only uses XInput)
  2016. * "1" - Enable DirectInput detection (the default)
  2017. */
  2018. #define SDL_HINT_DIRECTINPUT_ENABLED "SDL_DIRECTINPUT_ENABLED"
  2019. /**
  2020. * \brief A variable that causes SDL to use the old axis and button mapping for XInput devices.
  2021. *
  2022. * This hint is for backwards compatibility only and will be removed in SDL 2.1
  2023. *
  2024. * The default value is "0". This hint must be set before SDL_Init()
  2025. */
  2026. #define SDL_HINT_XINPUT_USE_OLD_JOYSTICK_MAPPING "SDL_XINPUT_USE_OLD_JOYSTICK_MAPPING"
  2027. /**
  2028. * \brief A variable that causes SDL to not ignore audio "monitors"
  2029. *
  2030. * This is currently only used for PulseAudio and ignored elsewhere.
  2031. *
  2032. * By default, SDL ignores audio devices that aren't associated with physical
  2033. * hardware. Changing this hint to "1" will expose anything SDL sees that
  2034. * appears to be an audio source or sink. This will add "devices" to the list
  2035. * that the user probably doesn't want or need, but it can be useful in
  2036. * scenarios where you want to hook up SDL to some sort of virtual device,
  2037. * etc.
  2038. *
  2039. * The default value is "0". This hint must be set before SDL_Init().
  2040. *
  2041. * This hint is available since SDL 2.0.16. Before then, virtual devices are
  2042. * always ignored.
  2043. */
  2044. #define SDL_HINT_AUDIO_INCLUDE_MONITORS "SDL_AUDIO_INCLUDE_MONITORS"
  2045. /**
  2046. * \brief A variable that forces X11 windows to create as a custom type.
  2047. *
  2048. * This is currently only used for X11 and ignored elsewhere.
  2049. *
  2050. * During SDL_CreateWindow, SDL uses the _NET_WM_WINDOW_TYPE X11 property
  2051. * to report to the window manager the type of window it wants to create.
  2052. * This might be set to various things if SDL_WINDOW_TOOLTIP or
  2053. * SDL_WINDOW_POPUP_MENU, etc, were specified. For "normal" windows that
  2054. * haven't set a specific type, this hint can be used to specify a custom
  2055. * type. For example, a dock window might set this to
  2056. * "_NET_WM_WINDOW_TYPE_DOCK".
  2057. *
  2058. * If not set or set to "", this hint is ignored. This hint must be set
  2059. * before the SDL_CreateWindow() call that it is intended to affect.
  2060. *
  2061. * This hint is available since SDL 2.0.22.
  2062. */
  2063. #define SDL_HINT_X11_WINDOW_TYPE "SDL_X11_WINDOW_TYPE"
  2064. /**
  2065. * \brief A variable that decides whether to send SDL_EVENT_QUIT when closing the final window.
  2066. *
  2067. * By default, SDL sends an SDL_EVENT_QUIT event when there is only one window
  2068. * and it receives an SDL_EVENT_WINDOW_CLOSE_REQUESTED event, under the assumption most
  2069. * apps would also take the loss of this window as a signal to terminate the
  2070. * program.
  2071. *
  2072. * However, it's not unreasonable in some cases to have the program continue
  2073. * to live on, perhaps to create new windows later.
  2074. *
  2075. * Changing this hint to "0" will cause SDL to not send an SDL_EVENT_QUIT event
  2076. * when the final window is requesting to close. Note that in this case,
  2077. * there are still other legitimate reasons one might get an SDL_EVENT_QUIT
  2078. * event: choosing "Quit" from the macOS menu bar, sending a SIGINT (ctrl-c)
  2079. * on Unix, etc.
  2080. *
  2081. * The default value is "1". This hint can be changed at any time.
  2082. *
  2083. * This hint is available since SDL 2.0.22. Before then, you always get
  2084. * an SDL_EVENT_QUIT event when closing the final window.
  2085. */
  2086. #define SDL_HINT_QUIT_ON_LAST_WINDOW_CLOSE "SDL_QUIT_ON_LAST_WINDOW_CLOSE"
  2087. /**
  2088. * \brief A variable that decides what video backend to use.
  2089. *
  2090. * By default, SDL will try all available video backends in a reasonable
  2091. * order until it finds one that can work, but this hint allows the app
  2092. * or user to force a specific target, such as "x11" if, say, you are
  2093. * on Wayland but want to try talking to the X server instead.
  2094. *
  2095. * This functionality has existed since SDL 2.0.0 (indeed, before that)
  2096. * but before 2.0.22 this was an environment variable only. In 2.0.22,
  2097. * it was upgraded to a full SDL hint, so you can set the environment
  2098. * variable as usual or programatically set the hint with SDL_SetHint,
  2099. * which won't propagate to child processes.
  2100. *
  2101. * The default value is unset, in which case SDL will try to figure out
  2102. * the best video backend on your behalf. This hint needs to be set
  2103. * before SDL_Init() is called to be useful.
  2104. *
  2105. * This hint is available since SDL 2.0.22. Before then, you could set
  2106. * the environment variable to get the same effect.
  2107. */
  2108. #define SDL_HINT_VIDEO_DRIVER "SDL_VIDEO_DRIVER"
  2109. /**
  2110. * \brief A variable that decides what audio backend to use.
  2111. *
  2112. * By default, SDL will try all available audio backends in a reasonable
  2113. * order until it finds one that can work, but this hint allows the app
  2114. * or user to force a specific target, such as "alsa" if, say, you are
  2115. * on PulseAudio but want to try talking to the lower level instead.
  2116. *
  2117. * This functionality has existed since SDL 2.0.0 (indeed, before that)
  2118. * but before 2.0.22 this was an environment variable only. In 2.0.22,
  2119. * it was upgraded to a full SDL hint, so you can set the environment
  2120. * variable as usual or programatically set the hint with SDL_SetHint,
  2121. * which won't propagate to child processes.
  2122. *
  2123. * The default value is unset, in which case SDL will try to figure out
  2124. * the best audio backend on your behalf. This hint needs to be set
  2125. * before SDL_Init() is called to be useful.
  2126. *
  2127. * This hint is available since SDL 2.0.22. Before then, you could set
  2128. * the environment variable to get the same effect.
  2129. */
  2130. #define SDL_HINT_AUDIO_DRIVER "SDL_AUDIO_DRIVER"
  2131. /**
  2132. * \brief A variable that decides what KMSDRM device to use.
  2133. *
  2134. * Internally, SDL might open something like "/dev/dri/cardNN" to
  2135. * access KMSDRM functionality, where "NN" is a device index number.
  2136. *
  2137. * SDL makes a guess at the best index to use (usually zero), but the
  2138. * app or user can set this hint to a number between 0 and 99 to
  2139. * force selection.
  2140. *
  2141. * This hint is available since SDL 2.24.0.
  2142. */
  2143. #define SDL_HINT_KMSDRM_DEVICE_INDEX "SDL_KMSDRM_DEVICE_INDEX"
  2144. /**
  2145. * \brief A variable that treats trackpads as touch devices.
  2146. *
  2147. * On macOS (and possibly other platforms in the future), SDL will report
  2148. * touches on a trackpad as mouse input, which is generally what users
  2149. * expect from this device; however, these are often actually full
  2150. * multitouch-capable touch devices, so it might be preferable to some apps
  2151. * to treat them as such.
  2152. *
  2153. * Setting this hint to true will make the trackpad input report as a
  2154. * multitouch device instead of a mouse. The default is false.
  2155. *
  2156. * Note that most platforms don't support this hint. As of 2.24.0, it
  2157. * only supports MacBooks' trackpads on macOS. Others may follow later.
  2158. *
  2159. * This hint is checked during SDL_Init and can not be changed after.
  2160. *
  2161. * This hint is available since SDL 2.24.0.
  2162. */
  2163. #define SDL_HINT_TRACKPAD_IS_TOUCH_ONLY "SDL_TRACKPAD_IS_TOUCH_ONLY"
  2164. /**
  2165. * \brief An enumeration of hint priorities
  2166. */
  2167. typedef enum
  2168. {
  2169. SDL_HINT_DEFAULT,
  2170. SDL_HINT_NORMAL,
  2171. SDL_HINT_OVERRIDE
  2172. } SDL_HintPriority;
  2173. /**
  2174. * Set a hint with a specific priority.
  2175. *
  2176. * The priority controls the behavior when setting a hint that already has a
  2177. * value. Hints will replace existing hints of their priority and lower.
  2178. * Environment variables are considered to have override priority.
  2179. *
  2180. * \param name the hint to set
  2181. * \param value the value of the hint variable
  2182. * \param priority the SDL_HintPriority level for the hint
  2183. * \returns SDL_TRUE if the hint was set, SDL_FALSE otherwise.
  2184. *
  2185. * \since This function is available since SDL 3.0.0.
  2186. *
  2187. * \sa SDL_GetHint
  2188. * \sa SDL_SetHint
  2189. */
  2190. extern DECLSPEC SDL_bool SDLCALL SDL_SetHintWithPriority(const char *name,
  2191. const char *value,
  2192. SDL_HintPriority priority);
  2193. /**
  2194. * Set a hint with normal priority.
  2195. *
  2196. * Hints will not be set if there is an existing override hint or environment
  2197. * variable that takes precedence. You can use SDL_SetHintWithPriority() to
  2198. * set the hint with override priority instead.
  2199. *
  2200. * \param name the hint to set
  2201. * \param value the value of the hint variable
  2202. * \returns SDL_TRUE if the hint was set, SDL_FALSE otherwise.
  2203. *
  2204. * \since This function is available since SDL 3.0.0.
  2205. *
  2206. * \sa SDL_GetHint
  2207. * \sa SDL_SetHintWithPriority
  2208. */
  2209. extern DECLSPEC SDL_bool SDLCALL SDL_SetHint(const char *name,
  2210. const char *value);
  2211. /**
  2212. * Reset a hint to the default value.
  2213. *
  2214. * This will reset a hint to the value of the environment variable, or NULL if
  2215. * the environment isn't set. Callbacks will be called normally with this
  2216. * change.
  2217. *
  2218. * \param name the hint to set
  2219. * \returns SDL_TRUE if the hint was set, SDL_FALSE otherwise.
  2220. *
  2221. * \since This function is available since SDL 3.0.0.
  2222. *
  2223. * \sa SDL_GetHint
  2224. * \sa SDL_SetHint
  2225. */
  2226. extern DECLSPEC SDL_bool SDLCALL SDL_ResetHint(const char *name);
  2227. /**
  2228. * Reset all hints to the default values.
  2229. *
  2230. * This will reset all hints to the value of the associated environment
  2231. * variable, or NULL if the environment isn't set. Callbacks will be called
  2232. * normally with this change.
  2233. *
  2234. * \since This function is available since SDL 3.0.0.
  2235. *
  2236. * \sa SDL_GetHint
  2237. * \sa SDL_SetHint
  2238. * \sa SDL_ResetHint
  2239. */
  2240. extern DECLSPEC void SDLCALL SDL_ResetHints(void);
  2241. /**
  2242. * Get the value of a hint.
  2243. *
  2244. * \param name the hint to query
  2245. * \returns the string value of a hint or NULL if the hint isn't set.
  2246. *
  2247. * \since This function is available since SDL 3.0.0.
  2248. *
  2249. * \sa SDL_SetHint
  2250. * \sa SDL_SetHintWithPriority
  2251. */
  2252. extern DECLSPEC const char * SDLCALL SDL_GetHint(const char *name);
  2253. /**
  2254. * Get the boolean value of a hint variable.
  2255. *
  2256. * \param name the name of the hint to get the boolean value from
  2257. * \param default_value the value to return if the hint does not exist
  2258. * \returns the boolean value of a hint or the provided default value if the
  2259. * hint does not exist.
  2260. *
  2261. * \since This function is available since SDL 3.0.0.
  2262. *
  2263. * \sa SDL_GetHint
  2264. * \sa SDL_SetHint
  2265. */
  2266. extern DECLSPEC SDL_bool SDLCALL SDL_GetHintBoolean(const char *name, SDL_bool default_value);
  2267. /**
  2268. * Type definition of the hint callback function.
  2269. *
  2270. * \param userdata what was passed as `userdata` to SDL_AddHintCallback()
  2271. * \param name what was passed as `name` to SDL_AddHintCallback()
  2272. * \param oldValue the previous hint value
  2273. * \param newValue the new value hint is to be set to
  2274. */
  2275. typedef void (SDLCALL *SDL_HintCallback)(void *userdata, const char *name, const char *oldValue, const char *newValue);
  2276. /**
  2277. * Add a function to watch a particular hint.
  2278. *
  2279. * \param name the hint to watch
  2280. * \param callback An SDL_HintCallback function that will be called when the
  2281. * hint value changes
  2282. * \param userdata a pointer to pass to the callback function
  2283. * \returns 0 on success or a negative error code on failure; call
  2284. * SDL_GetError() for more information.
  2285. *
  2286. * \since This function is available since SDL 3.0.0.
  2287. *
  2288. * \sa SDL_DelHintCallback
  2289. */
  2290. extern DECLSPEC int SDLCALL SDL_AddHintCallback(const char *name,
  2291. SDL_HintCallback callback,
  2292. void *userdata);
  2293. /**
  2294. * Remove a function watching a particular hint.
  2295. *
  2296. * \param name the hint being watched
  2297. * \param callback An SDL_HintCallback function that will be called when the
  2298. * hint value changes
  2299. * \param userdata a pointer being passed to the callback function
  2300. *
  2301. * \since This function is available since SDL 3.0.0.
  2302. *
  2303. * \sa SDL_AddHintCallback
  2304. */
  2305. extern DECLSPEC void SDLCALL SDL_DelHintCallback(const char *name,
  2306. SDL_HintCallback callback,
  2307. void *userdata);
  2308. /**
  2309. * Clear all hints.
  2310. *
  2311. * This function is automatically called during SDL_Quit(), and deletes all
  2312. * callbacks without calling them and frees all memory associated with hints.
  2313. * If you're calling this from application code you probably want to call
  2314. * SDL_ResetHints() instead.
  2315. *
  2316. * This function will be removed from the API the next time we rev the ABI.
  2317. *
  2318. * \since This function is available since SDL 3.0.0.
  2319. *
  2320. * \sa SDL_ResetHints
  2321. */
  2322. extern DECLSPEC void SDLCALL SDL_ClearHints(void);
  2323. /* Ends C function definitions when using C++ */
  2324. #ifdef __cplusplus
  2325. }
  2326. #endif
  2327. #include <SDL3/SDL_close_code.h>
  2328. #endif /* SDL_hints_h_ */