SDL_hints.h 147 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448
  1. /*
  2. Simple DirectMedia Layer
  3. Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
  4. This software is provided 'as-is', without any express or implied
  5. warranty. In no event will the authors be held liable for any damages
  6. arising from the use of this software.
  7. Permission is granted to anyone to use this software for any purpose,
  8. including commercial applications, and to alter it and redistribute it
  9. freely, subject to the following restrictions:
  10. 1. The origin of this software must not be misrepresented; you must not
  11. claim that you wrote the original software. If you use this software
  12. in a product, an acknowledgment in the product documentation would be
  13. appreciated but is not required.
  14. 2. Altered source versions must be plainly marked as such, and must not be
  15. misrepresented as being the original software.
  16. 3. This notice may not be removed or altered from any source distribution.
  17. */
  18. /**
  19. * # CategoryHints
  20. *
  21. * This file contains functions to set and get configuration hints, as well as
  22. * listing each of them alphabetically.
  23. *
  24. * The convention for naming hints is SDL_HINT_X, where "SDL_X" is the
  25. * environment variable that can be used to override the default.
  26. *
  27. * In general these hints are just that - they may or may not be supported or
  28. * applicable on any given platform, but they provide a way for an application
  29. * or user to give the library a hint as to how they would like the library to
  30. * work.
  31. */
  32. #ifndef SDL_hints_h_
  33. #define SDL_hints_h_
  34. #include <SDL3/SDL_error.h>
  35. #include <SDL3/SDL_stdinc.h>
  36. #include <SDL3/SDL_begin_code.h>
  37. /* Set up for C function definitions, even when using C++ */
  38. #ifdef __cplusplus
  39. extern "C" {
  40. #endif
  41. /**
  42. * Specify the behavior of Alt+Tab while the keyboard is grabbed.
  43. *
  44. * By default, SDL emulates Alt+Tab functionality while the keyboard is
  45. * grabbed and your window is full-screen. This prevents the user from getting
  46. * stuck in your application if you've enabled keyboard grab.
  47. *
  48. * The variable can be set to the following values:
  49. *
  50. * - "0": SDL will not handle Alt+Tab. Your application is responsible for
  51. * handling Alt+Tab while the keyboard is grabbed.
  52. * - "1": SDL will minimize your window when Alt+Tab is pressed (default)
  53. *
  54. * This hint can be set anytime.
  55. *
  56. * \since This hint is available since SDL 3.2.0.
  57. */
  58. #define SDL_HINT_ALLOW_ALT_TAB_WHILE_GRABBED "SDL_ALLOW_ALT_TAB_WHILE_GRABBED"
  59. /**
  60. * A variable to control whether the SDL activity is allowed to be re-created.
  61. *
  62. * If this hint is true, the activity can be recreated on demand by the OS,
  63. * and Java static data and C++ static data remain with their current values.
  64. * If this hint is false, then SDL will call exit() when you return from your
  65. * main function and the application will be terminated and then started fresh
  66. * each time.
  67. *
  68. * The variable can be set to the following values:
  69. *
  70. * - "0": The application starts fresh at each launch. (default)
  71. * - "1": The application activity can be recreated by the OS.
  72. *
  73. * This hint can be set anytime.
  74. *
  75. * \since This hint is available since SDL 3.2.0.
  76. */
  77. #define SDL_HINT_ANDROID_ALLOW_RECREATE_ACTIVITY "SDL_ANDROID_ALLOW_RECREATE_ACTIVITY"
  78. /**
  79. * A variable to control whether the event loop will block itself when the app
  80. * is paused.
  81. *
  82. * The variable can be set to the following values:
  83. *
  84. * - "0": Non blocking.
  85. * - "1": Blocking. (default)
  86. *
  87. * This hint should be set before SDL is initialized.
  88. *
  89. * \since This hint is available since SDL 3.2.0.
  90. */
  91. #define SDL_HINT_ANDROID_BLOCK_ON_PAUSE "SDL_ANDROID_BLOCK_ON_PAUSE"
  92. /**
  93. * A variable to control whether low latency audio should be enabled.
  94. *
  95. * Some devices have poor quality output when this is enabled, but this is
  96. * usually an improvement in audio latency.
  97. *
  98. * The variable can be set to the following values:
  99. *
  100. * - "0": Low latency audio is not enabled.
  101. * - "1": Low latency audio is enabled. (default)
  102. *
  103. * This hint should be set before SDL audio is initialized.
  104. *
  105. * \since This hint is available since SDL 3.2.0.
  106. */
  107. #define SDL_HINT_ANDROID_LOW_LATENCY_AUDIO "SDL_ANDROID_LOW_LATENCY_AUDIO"
  108. /**
  109. * A variable to control whether we trap the Android back button to handle it
  110. * manually.
  111. *
  112. * This is necessary for the right mouse button to work on some Android
  113. * devices, or to be able to trap the back button for use in your code
  114. * reliably. If this hint is true, the back button will show up as an
  115. * SDL_EVENT_KEY_DOWN / SDL_EVENT_KEY_UP pair with a keycode of
  116. * SDL_SCANCODE_AC_BACK.
  117. *
  118. * The variable can be set to the following values:
  119. *
  120. * - "0": Back button will be handled as usual for system. (default)
  121. * - "1": Back button will be trapped, allowing you to handle the key press
  122. * manually. (This will also let right mouse click work on systems where the
  123. * right mouse button functions as back.)
  124. *
  125. * This hint can be set anytime.
  126. *
  127. * \since This hint is available since SDL 3.2.0.
  128. */
  129. #define SDL_HINT_ANDROID_TRAP_BACK_BUTTON "SDL_ANDROID_TRAP_BACK_BUTTON"
  130. /**
  131. * A variable setting the app ID string.
  132. *
  133. * This string is used by desktop compositors to identify and group windows
  134. * together, as well as match applications with associated desktop settings
  135. * and icons.
  136. *
  137. * This will override SDL_PROP_APP_METADATA_IDENTIFIER_STRING, if set by the
  138. * application.
  139. *
  140. * This hint should be set before SDL is initialized.
  141. *
  142. * \since This hint is available since SDL 3.2.0.
  143. */
  144. #define SDL_HINT_APP_ID "SDL_APP_ID"
  145. /**
  146. * A variable setting the application name.
  147. *
  148. * This hint lets you specify the application name sent to the OS when
  149. * required. For example, this will often appear in volume control applets for
  150. * audio streams, and in lists of applications which are inhibiting the
  151. * screensaver. You should use a string that describes your program ("My Game
  152. * 2: The Revenge")
  153. *
  154. * This will override SDL_PROP_APP_METADATA_NAME_STRING, if set by the
  155. * application.
  156. *
  157. * This hint should be set before SDL is initialized.
  158. *
  159. * \since This hint is available since SDL 3.2.0.
  160. */
  161. #define SDL_HINT_APP_NAME "SDL_APP_NAME"
  162. /**
  163. * A variable controlling whether controllers used with the Apple TV generate
  164. * UI events.
  165. *
  166. * When UI events are generated by controller input, the app will be
  167. * backgrounded when the Apple TV remote's menu button is pressed, and when
  168. * the pause or B buttons on gamepads are pressed.
  169. *
  170. * More information about properly making use of controllers for the Apple TV
  171. * can be found here:
  172. * https://developer.apple.com/tvos/human-interface-guidelines/remote-and-controllers/
  173. *
  174. * The variable can be set to the following values:
  175. *
  176. * - "0": Controller input does not generate UI events. (default)
  177. * - "1": Controller input generates UI events.
  178. *
  179. * This hint can be set anytime.
  180. *
  181. * \since This hint is available since SDL 3.2.0.
  182. */
  183. #define SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS "SDL_APPLE_TV_CONTROLLER_UI_EVENTS"
  184. /**
  185. * A variable controlling whether the Apple TV remote's joystick axes will
  186. * automatically match the rotation of the remote.
  187. *
  188. * The variable can be set to the following values:
  189. *
  190. * - "0": Remote orientation does not affect joystick axes. (default)
  191. * - "1": Joystick axes are based on the orientation of the remote.
  192. *
  193. * This hint can be set anytime.
  194. *
  195. * \since This hint is available since SDL 3.2.0.
  196. */
  197. #define SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION "SDL_APPLE_TV_REMOTE_ALLOW_ROTATION"
  198. /**
  199. * Specify the default ALSA audio device name.
  200. *
  201. * This variable is a specific audio device to open when the "default" audio
  202. * device is used.
  203. *
  204. * This hint will be ignored when opening the default playback device if
  205. * SDL_HINT_AUDIO_ALSA_DEFAULT_PLAYBACK_DEVICE is set, or when opening the
  206. * default recording device if SDL_HINT_AUDIO_ALSA_DEFAULT_RECORDING_DEVICE is
  207. * set.
  208. *
  209. * This hint should be set before an audio device is opened.
  210. *
  211. * \since This hint is available since SDL 3.2.0.
  212. *
  213. * \sa SDL_HINT_AUDIO_ALSA_DEFAULT_PLAYBACK_DEVICE
  214. * \sa SDL_HINT_AUDIO_ALSA_DEFAULT_RECORDING_DEVICE
  215. */
  216. #define SDL_HINT_AUDIO_ALSA_DEFAULT_DEVICE "SDL_AUDIO_ALSA_DEFAULT_DEVICE"
  217. /**
  218. * Specify the default ALSA audio playback device name.
  219. *
  220. * This variable is a specific audio device to open for playback, when the
  221. * "default" audio device is used.
  222. *
  223. * If this hint isn't set, SDL will check SDL_HINT_AUDIO_ALSA_DEFAULT_DEVICE
  224. * before choosing a reasonable default.
  225. *
  226. * This hint should be set before an audio device is opened.
  227. *
  228. * \since This hint is available since SDL 3.2.0.
  229. *
  230. * \sa SDL_HINT_AUDIO_ALSA_DEFAULT_RECORDING_DEVICE
  231. * \sa SDL_HINT_AUDIO_ALSA_DEFAULT_DEVICE
  232. */
  233. #define SDL_HINT_AUDIO_ALSA_DEFAULT_PLAYBACK_DEVICE "SDL_AUDIO_ALSA_DEFAULT_PLAYBACK_DEVICE"
  234. /**
  235. * Specify the default ALSA audio recording device name.
  236. *
  237. * This variable is a specific audio device to open for recording, when the
  238. * "default" audio device is used.
  239. *
  240. * If this hint isn't set, SDL will check SDL_HINT_AUDIO_ALSA_DEFAULT_DEVICE
  241. * before choosing a reasonable default.
  242. *
  243. * This hint should be set before an audio device is opened.
  244. *
  245. * \since This hint is available since SDL 3.2.0.
  246. *
  247. * \sa SDL_HINT_AUDIO_ALSA_DEFAULT_PLAYBACK_DEVICE
  248. * \sa SDL_HINT_AUDIO_ALSA_DEFAULT_DEVICE
  249. */
  250. #define SDL_HINT_AUDIO_ALSA_DEFAULT_RECORDING_DEVICE "SDL_AUDIO_ALSA_DEFAULT_RECORDING_DEVICE"
  251. /**
  252. * A variable controlling the audio category on iOS and macOS.
  253. *
  254. * The variable can be set to the following values:
  255. *
  256. * - "ambient": Use the AVAudioSessionCategoryAmbient audio category, will be
  257. * muted by the phone mute switch (default)
  258. * - "playback": Use the AVAudioSessionCategoryPlayback category.
  259. *
  260. * For more information, see Apple's documentation:
  261. * https://developer.apple.com/library/content/documentation/Audio/Conceptual/AudioSessionProgrammingGuide/AudioSessionCategoriesandModes/AudioSessionCategoriesandModes.html
  262. *
  263. * This hint should be set before an audio device is opened.
  264. *
  265. * \since This hint is available since SDL 3.2.0.
  266. */
  267. #define SDL_HINT_AUDIO_CATEGORY "SDL_AUDIO_CATEGORY"
  268. /**
  269. * A variable controlling the default audio channel count.
  270. *
  271. * If the application doesn't specify the audio channel count when opening the
  272. * device, this hint can be used to specify a default channel count that will
  273. * be used. This defaults to "1" for recording and "2" for playback devices.
  274. *
  275. * This hint should be set before an audio device is opened.
  276. *
  277. * \since This hint is available since SDL 3.2.0.
  278. */
  279. #define SDL_HINT_AUDIO_CHANNELS "SDL_AUDIO_CHANNELS"
  280. /**
  281. * Specify an application icon name for an audio device.
  282. *
  283. * Some audio backends (such as Pulseaudio and Pipewire) allow you to set an
  284. * XDG icon name for your application. Among other things, this icon might
  285. * show up in a system control panel that lets the user adjust the volume on
  286. * specific audio streams instead of using one giant master volume slider.
  287. * Note that this is unrelated to the icon used by the windowing system, which
  288. * may be set with SDL_SetWindowIcon (or via desktop file on Wayland).
  289. *
  290. * Setting this to "" or leaving it unset will have SDL use a reasonable
  291. * default, "applications-games", which is likely to be installed. See
  292. * https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html
  293. * and
  294. * https://specifications.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html
  295. * for the relevant XDG icon specs.
  296. *
  297. * This hint should be set before an audio device is opened.
  298. *
  299. * \since This hint is available since SDL 3.2.0.
  300. */
  301. #define SDL_HINT_AUDIO_DEVICE_APP_ICON_NAME "SDL_AUDIO_DEVICE_APP_ICON_NAME"
  302. /**
  303. * A variable controlling device buffer size.
  304. *
  305. * This hint is an integer > 0, that represents the size of the device's
  306. * buffer in sample frames (stereo audio data in 16-bit format is 4 bytes per
  307. * sample frame, for example).
  308. *
  309. * SDL3 generally decides this value on behalf of the app, but if for some
  310. * reason the app needs to dictate this (because they want either lower
  311. * latency or higher throughput AND ARE WILLING TO DEAL WITH what that might
  312. * require of the app), they can specify it.
  313. *
  314. * SDL will try to accommodate this value, but there is no promise you'll get
  315. * the buffer size requested. Many platforms won't honor this request at all,
  316. * or might adjust it.
  317. *
  318. * This hint should be set before an audio device is opened.
  319. *
  320. * \since This hint is available since SDL 3.2.0.
  321. */
  322. #define SDL_HINT_AUDIO_DEVICE_SAMPLE_FRAMES "SDL_AUDIO_DEVICE_SAMPLE_FRAMES"
  323. /**
  324. * Specify an audio stream name for an audio device.
  325. *
  326. * Some audio backends (such as PulseAudio) allow you to describe your audio
  327. * stream. Among other things, this description might show up in a system
  328. * control panel that lets the user adjust the volume on specific audio
  329. * streams instead of using one giant master volume slider.
  330. *
  331. * This hints lets you transmit that information to the OS. The contents of
  332. * this hint are used while opening an audio device. You should use a string
  333. * that describes your what your program is playing ("audio stream" is
  334. * probably sufficient in many cases, but this could be useful for something
  335. * like "team chat" if you have a headset playing VoIP audio separately).
  336. *
  337. * Setting this to "" or leaving it unset will have SDL use a reasonable
  338. * default: "audio stream" or something similar.
  339. *
  340. * Note that while this talks about audio streams, this is an OS-level
  341. * concept, so it applies to a physical audio device in this case, and not an
  342. * SDL_AudioStream, nor an SDL logical audio device.
  343. *
  344. * This hint should be set before an audio device is opened.
  345. *
  346. * \since This hint is available since SDL 3.2.0.
  347. */
  348. #define SDL_HINT_AUDIO_DEVICE_STREAM_NAME "SDL_AUDIO_DEVICE_STREAM_NAME"
  349. /**
  350. * Specify an application role for an audio device.
  351. *
  352. * Some audio backends (such as Pipewire) allow you to describe the role of
  353. * your audio stream. Among other things, this description might show up in a
  354. * system control panel or software for displaying and manipulating media
  355. * playback/recording graphs.
  356. *
  357. * This hints lets you transmit that information to the OS. The contents of
  358. * this hint are used while opening an audio device. You should use a string
  359. * that describes your what your program is playing (Game, Music, Movie,
  360. * etc...).
  361. *
  362. * Setting this to "" or leaving it unset will have SDL use a reasonable
  363. * default: "Game" or something similar.
  364. *
  365. * Note that while this talks about audio streams, this is an OS-level
  366. * concept, so it applies to a physical audio device in this case, and not an
  367. * SDL_AudioStream, nor an SDL logical audio device.
  368. *
  369. * This hint should be set before an audio device is opened.
  370. *
  371. * \since This hint is available since SDL 3.2.0.
  372. */
  373. #define SDL_HINT_AUDIO_DEVICE_STREAM_ROLE "SDL_AUDIO_DEVICE_STREAM_ROLE"
  374. /**
  375. * Specify the input file when recording audio using the disk audio driver.
  376. *
  377. * This defaults to "sdlaudio-in.raw"
  378. *
  379. * This hint should be set before an audio device is opened.
  380. *
  381. * \since This hint is available since SDL 3.2.0.
  382. */
  383. #define SDL_HINT_AUDIO_DISK_INPUT_FILE "SDL_AUDIO_DISK_INPUT_FILE"
  384. /**
  385. * Specify the output file when playing audio using the disk audio driver.
  386. *
  387. * This defaults to "sdlaudio.raw"
  388. *
  389. * This hint should be set before an audio device is opened.
  390. *
  391. * \since This hint is available since SDL 3.2.0.
  392. */
  393. #define SDL_HINT_AUDIO_DISK_OUTPUT_FILE "SDL_AUDIO_DISK_OUTPUT_FILE"
  394. /**
  395. * A variable controlling the audio rate when using the disk audio driver.
  396. *
  397. * The disk audio driver normally simulates real-time for the audio rate that
  398. * was specified, but you can use this variable to adjust this rate higher or
  399. * lower down to 0. The default value is "1.0".
  400. *
  401. * This hint should be set before an audio device is opened.
  402. *
  403. * \since This hint is available since SDL 3.2.0.
  404. */
  405. #define SDL_HINT_AUDIO_DISK_TIMESCALE "SDL_AUDIO_DISK_TIMESCALE"
  406. /**
  407. * A variable that specifies an audio backend to use.
  408. *
  409. * By default, SDL will try all available audio backends in a reasonable order
  410. * until it finds one that can work, but this hint allows the app or user to
  411. * force a specific driver, such as "pipewire" if, say, you are on PulseAudio
  412. * but want to try talking to the lower level instead.
  413. *
  414. * This hint should be set before SDL is initialized.
  415. *
  416. * \since This hint is available since SDL 3.2.0.
  417. */
  418. #define SDL_HINT_AUDIO_DRIVER "SDL_AUDIO_DRIVER"
  419. /**
  420. * A variable controlling the audio rate when using the dummy audio driver.
  421. *
  422. * The dummy audio driver normally simulates real-time for the audio rate that
  423. * was specified, but you can use this variable to adjust this rate higher or
  424. * lower down to 0. The default value is "1.0".
  425. *
  426. * This hint should be set before an audio device is opened.
  427. *
  428. * \since This hint is available since SDL 3.2.0.
  429. */
  430. #define SDL_HINT_AUDIO_DUMMY_TIMESCALE "SDL_AUDIO_DUMMY_TIMESCALE"
  431. /**
  432. * A variable controlling the default audio format.
  433. *
  434. * If the application doesn't specify the audio format when opening the
  435. * device, this hint can be used to specify a default format that will be
  436. * used.
  437. *
  438. * The variable can be set to the following values:
  439. *
  440. * - "U8": Unsigned 8-bit audio
  441. * - "S8": Signed 8-bit audio
  442. * - "S16LE": Signed 16-bit little-endian audio
  443. * - "S16BE": Signed 16-bit big-endian audio
  444. * - "S16": Signed 16-bit native-endian audio (default)
  445. * - "S32LE": Signed 32-bit little-endian audio
  446. * - "S32BE": Signed 32-bit big-endian audio
  447. * - "S32": Signed 32-bit native-endian audio
  448. * - "F32LE": Floating point little-endian audio
  449. * - "F32BE": Floating point big-endian audio
  450. * - "F32": Floating point native-endian audio
  451. *
  452. * This hint should be set before an audio device is opened.
  453. *
  454. * \since This hint is available since SDL 3.2.0.
  455. */
  456. #define SDL_HINT_AUDIO_FORMAT "SDL_AUDIO_FORMAT"
  457. /**
  458. * A variable controlling the default audio frequency.
  459. *
  460. * If the application doesn't specify the audio frequency when opening the
  461. * device, this hint can be used to specify a default frequency that will be
  462. * used. This defaults to "44100".
  463. *
  464. * This hint should be set before an audio device is opened.
  465. *
  466. * \since This hint is available since SDL 3.2.0.
  467. */
  468. #define SDL_HINT_AUDIO_FREQUENCY "SDL_AUDIO_FREQUENCY"
  469. /**
  470. * A variable that causes SDL to not ignore audio "monitors".
  471. *
  472. * This is currently only used by the PulseAudio driver.
  473. *
  474. * By default, SDL ignores audio devices that aren't associated with physical
  475. * hardware. Changing this hint to "1" will expose anything SDL sees that
  476. * appears to be an audio source or sink. This will add "devices" to the list
  477. * that the user probably doesn't want or need, but it can be useful in
  478. * scenarios where you want to hook up SDL to some sort of virtual device,
  479. * etc.
  480. *
  481. * The variable can be set to the following values:
  482. *
  483. * - "0": Audio monitor devices will be ignored. (default)
  484. * - "1": Audio monitor devices will show up in the device list.
  485. *
  486. * This hint should be set before SDL is initialized.
  487. *
  488. * \since This hint is available since SDL 3.2.0.
  489. */
  490. #define SDL_HINT_AUDIO_INCLUDE_MONITORS "SDL_AUDIO_INCLUDE_MONITORS"
  491. /**
  492. * A variable controlling whether SDL updates joystick state when getting
  493. * input events.
  494. *
  495. * The variable can be set to the following values:
  496. *
  497. * - "0": You'll call SDL_UpdateJoysticks() manually.
  498. * - "1": SDL will automatically call SDL_UpdateJoysticks(). (default)
  499. *
  500. * This hint can be set anytime.
  501. *
  502. * \since This hint is available since SDL 3.2.0.
  503. */
  504. #define SDL_HINT_AUTO_UPDATE_JOYSTICKS "SDL_AUTO_UPDATE_JOYSTICKS"
  505. /**
  506. * A variable controlling whether SDL updates sensor state when getting input
  507. * events.
  508. *
  509. * The variable can be set to the following values:
  510. *
  511. * - "0": You'll call SDL_UpdateSensors() manually.
  512. * - "1": SDL will automatically call SDL_UpdateSensors(). (default)
  513. *
  514. * This hint can be set anytime.
  515. *
  516. * \since This hint is available since SDL 3.2.0.
  517. */
  518. #define SDL_HINT_AUTO_UPDATE_SENSORS "SDL_AUTO_UPDATE_SENSORS"
  519. /**
  520. * Prevent SDL from using version 4 of the bitmap header when saving BMPs.
  521. *
  522. * The bitmap header version 4 is required for proper alpha channel support
  523. * and SDL will use it when required. Should this not be desired, this hint
  524. * can force the use of the 40 byte header version which is supported
  525. * everywhere.
  526. *
  527. * The variable can be set to the following values:
  528. *
  529. * - "0": Surfaces with a colorkey or an alpha channel are saved to a 32-bit
  530. * BMP file with an alpha mask. SDL will use the bitmap header version 4 and
  531. * set the alpha mask accordingly. (default)
  532. * - "1": Surfaces with a colorkey or an alpha channel are saved to a 32-bit
  533. * BMP file without an alpha mask. The alpha channel data will be in the
  534. * file, but applications are going to ignore it.
  535. *
  536. * This hint can be set anytime.
  537. *
  538. * \since This hint is available since SDL 3.2.0.
  539. */
  540. #define SDL_HINT_BMP_SAVE_LEGACY_FORMAT "SDL_BMP_SAVE_LEGACY_FORMAT"
  541. /**
  542. * A variable that decides what camera backend to use.
  543. *
  544. * By default, SDL will try all available camera backends in a reasonable
  545. * order until it finds one that can work, but this hint allows the app or
  546. * user to force a specific target, such as "directshow" if, say, you are on
  547. * Windows Media Foundations but want to try DirectShow instead.
  548. *
  549. * The default value is unset, in which case SDL will try to figure out the
  550. * best camera backend on your behalf. This hint needs to be set before
  551. * SDL_Init() is called to be useful.
  552. *
  553. * \since This hint is available since SDL 3.2.0.
  554. */
  555. #define SDL_HINT_CAMERA_DRIVER "SDL_CAMERA_DRIVER"
  556. /**
  557. * A variable that limits what CPU features are available.
  558. *
  559. * By default, SDL marks all features the current CPU supports as available.
  560. * This hint allows to limit these to a subset.
  561. *
  562. * When the hint is unset, or empty, SDL will enable all detected CPU
  563. * features.
  564. *
  565. * The variable can be set to a comma separated list containing the following
  566. * items:
  567. *
  568. * - "all"
  569. * - "altivec"
  570. * - "sse"
  571. * - "sse2"
  572. * - "sse3"
  573. * - "sse41"
  574. * - "sse42"
  575. * - "avx"
  576. * - "avx2"
  577. * - "avx512f"
  578. * - "arm-simd"
  579. * - "neon"
  580. * - "lsx"
  581. * - "lasx"
  582. *
  583. * The items can be prefixed by '+'/'-' to add/remove features.
  584. *
  585. * \since This hint is available since SDL 3.2.0.
  586. */
  587. #define SDL_HINT_CPU_FEATURE_MASK "SDL_CPU_FEATURE_MASK"
  588. /**
  589. * A variable controlling whether DirectInput should be used for controllers.
  590. *
  591. * The variable can be set to the following values:
  592. *
  593. * - "0": Disable DirectInput detection.
  594. * - "1": Enable DirectInput detection. (default)
  595. *
  596. * This hint should be set before SDL is initialized.
  597. *
  598. * \since This hint is available since SDL 3.2.0.
  599. */
  600. #define SDL_HINT_JOYSTICK_DIRECTINPUT "SDL_JOYSTICK_DIRECTINPUT"
  601. /**
  602. * A variable that specifies a dialog backend to use.
  603. *
  604. * By default, SDL will try all available dialog backends in a reasonable
  605. * order until it finds one that can work, but this hint allows the app or
  606. * user to force a specific target.
  607. *
  608. * If the specified target does not exist or is not available, the
  609. * dialog-related function calls will fail.
  610. *
  611. * This hint currently only applies to platforms using the generic "Unix"
  612. * dialog implementation, but may be extended to more platforms in the future.
  613. * Note that some Unix and Unix-like platforms have their own implementation,
  614. * such as macOS and Haiku.
  615. *
  616. * The variable can be set to the following values:
  617. *
  618. * - NULL: Select automatically (default, all platforms)
  619. * - "portal": Use XDG Portals through DBus (Unix only)
  620. * - "zenity": Use the Zenity program (Unix only)
  621. *
  622. * More options may be added in the future.
  623. *
  624. * This hint can be set anytime.
  625. *
  626. * \since This hint is available since SDL 3.2.0.
  627. */
  628. #define SDL_HINT_FILE_DIALOG_DRIVER "SDL_FILE_DIALOG_DRIVER"
  629. /**
  630. * Override for SDL_GetDisplayUsableBounds().
  631. *
  632. * If set, this hint will override the expected results for
  633. * SDL_GetDisplayUsableBounds() for display index 0. Generally you don't want
  634. * to do this, but this allows an embedded system to request that some of the
  635. * screen be reserved for other uses when paired with a well-behaved
  636. * application.
  637. *
  638. * The contents of this hint must be 4 comma-separated integers, the first is
  639. * the bounds x, then y, width and height, in that order.
  640. *
  641. * This hint can be set anytime.
  642. *
  643. * \since This hint is available since SDL 3.2.0.
  644. */
  645. #define SDL_HINT_DISPLAY_USABLE_BOUNDS "SDL_DISPLAY_USABLE_BOUNDS"
  646. /**
  647. * Disable giving back control to the browser automatically when running with
  648. * asyncify.
  649. *
  650. * With -s ASYNCIFY, SDL calls emscripten_sleep during operations such as
  651. * refreshing the screen or polling events.
  652. *
  653. * This hint only applies to the emscripten platform.
  654. *
  655. * The variable can be set to the following values:
  656. *
  657. * - "0": Disable emscripten_sleep calls (if you give back browser control
  658. * manually or use asyncify for other purposes).
  659. * - "1": Enable emscripten_sleep calls. (default)
  660. *
  661. * This hint can be set anytime.
  662. *
  663. * \since This hint is available since SDL 3.2.0.
  664. */
  665. #define SDL_HINT_EMSCRIPTEN_ASYNCIFY "SDL_EMSCRIPTEN_ASYNCIFY"
  666. /**
  667. * Specify the CSS selector used for the "default" window/canvas.
  668. *
  669. * This hint only applies to the emscripten platform.
  670. *
  671. * The default value is "#canvas"
  672. *
  673. * This hint should be set before creating a window.
  674. *
  675. * \since This hint is available since SDL 3.2.0.
  676. */
  677. #define SDL_HINT_EMSCRIPTEN_CANVAS_SELECTOR "SDL_EMSCRIPTEN_CANVAS_SELECTOR"
  678. /**
  679. * Override the binding element for keyboard inputs for Emscripten builds.
  680. *
  681. * This hint only applies to the emscripten platform.
  682. *
  683. * The variable can be one of:
  684. *
  685. * - "#window": the javascript window object (default)
  686. * - "#document": the javascript document object
  687. * - "#screen": the javascript window.screen object
  688. * - "#canvas": the WebGL canvas element
  689. * - "#none": Don't bind anything at all
  690. * - any other string without a leading # sign applies to the element on the
  691. * page with that ID.
  692. *
  693. * This hint should be set before creating a window.
  694. *
  695. * \since This hint is available since SDL 3.2.0.
  696. */
  697. #define SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT "SDL_EMSCRIPTEN_KEYBOARD_ELEMENT"
  698. /**
  699. * A variable that controls whether the on-screen keyboard should be shown
  700. * when text input is active.
  701. *
  702. * The variable can be set to the following values:
  703. *
  704. * - "auto": The on-screen keyboard will be shown if there is no physical
  705. * keyboard attached. (default)
  706. * - "0": Do not show the on-screen keyboard.
  707. * - "1": Show the on-screen keyboard, if available.
  708. *
  709. * This hint must be set before SDL_StartTextInput() is called
  710. *
  711. * \since This hint is available since SDL 3.2.0.
  712. */
  713. #define SDL_HINT_ENABLE_SCREEN_KEYBOARD "SDL_ENABLE_SCREEN_KEYBOARD"
  714. /**
  715. * A variable containing a list of evdev devices to use if udev is not
  716. * available.
  717. *
  718. * The list of devices is in the form:
  719. *
  720. * deviceclass:path[,deviceclass:path[,...]]
  721. *
  722. * where device class is an integer representing the SDL_UDEV_deviceclass and
  723. * path is the full path to the event device.
  724. *
  725. * This hint should be set before SDL is initialized.
  726. *
  727. * \since This hint is available since SDL 3.2.0.
  728. */
  729. #define SDL_HINT_EVDEV_DEVICES "SDL_EVDEV_DEVICES"
  730. /**
  731. * A variable controlling verbosity of the logging of SDL events pushed onto
  732. * the internal queue.
  733. *
  734. * The variable can be set to the following values, from least to most
  735. * verbose:
  736. *
  737. * - "0": Don't log any events. (default)
  738. * - "1": Log most events (other than the really spammy ones).
  739. * - "2": Include mouse and finger motion events.
  740. *
  741. * This is generally meant to be used to debug SDL itself, but can be useful
  742. * for application developers that need better visibility into what is going
  743. * on in the event queue. Logged events are sent through SDL_Log(), which
  744. * means by default they appear on stdout on most platforms or maybe
  745. * OutputDebugString() on Windows, and can be funneled by the app with
  746. * SDL_SetLogOutputFunction(), etc.
  747. *
  748. * This hint can be set anytime.
  749. *
  750. * \since This hint is available since SDL 3.2.0.
  751. */
  752. #define SDL_HINT_EVENT_LOGGING "SDL_EVENT_LOGGING"
  753. /**
  754. * A variable controlling whether raising the window should be done more
  755. * forcefully.
  756. *
  757. * The variable can be set to the following values:
  758. *
  759. * - "0": Honor the OS policy for raising windows. (default)
  760. * - "1": Force the window to be raised, overriding any OS policy.
  761. *
  762. * At present, this is only an issue under MS Windows, which makes it nearly
  763. * impossible to programmatically move a window to the foreground, for
  764. * "security" reasons. See http://stackoverflow.com/a/34414846 for a
  765. * discussion.
  766. *
  767. * This hint can be set anytime.
  768. *
  769. * \since This hint is available since SDL 3.2.0.
  770. */
  771. #define SDL_HINT_FORCE_RAISEWINDOW "SDL_FORCE_RAISEWINDOW"
  772. /**
  773. * A variable controlling how 3D acceleration is used to accelerate the SDL
  774. * screen surface.
  775. *
  776. * SDL can try to accelerate the SDL screen surface by using streaming
  777. * textures with a 3D rendering engine. This variable controls whether and how
  778. * this is done.
  779. *
  780. * The variable can be set to the following values:
  781. *
  782. * - "0": Disable 3D acceleration
  783. * - "1": Enable 3D acceleration, using the default renderer. (default)
  784. * - "X": Enable 3D acceleration, using X where X is one of the valid
  785. * rendering drivers. (e.g. "direct3d", "opengl", etc.)
  786. *
  787. * This hint should be set before calling SDL_GetWindowSurface()
  788. *
  789. * \since This hint is available since SDL 3.2.0.
  790. */
  791. #define SDL_HINT_FRAMEBUFFER_ACCELERATION "SDL_FRAMEBUFFER_ACCELERATION"
  792. /**
  793. * A variable that lets you manually hint extra gamecontroller db entries.
  794. *
  795. * The variable should be newline delimited rows of gamecontroller config
  796. * data, see SDL_gamepad.h
  797. *
  798. * You can update mappings after SDL is initialized with
  799. * SDL_GetGamepadMappingForGUID() and SDL_AddGamepadMapping()
  800. *
  801. * This hint should be set before SDL is initialized.
  802. *
  803. * \since This hint is available since SDL 3.2.0.
  804. */
  805. #define SDL_HINT_GAMECONTROLLERCONFIG "SDL_GAMECONTROLLERCONFIG"
  806. /**
  807. * A variable that lets you provide a file with extra gamecontroller db
  808. * entries.
  809. *
  810. * The file should contain lines of gamecontroller config data, see
  811. * SDL_gamepad.h
  812. *
  813. * You can update mappings after SDL is initialized with
  814. * SDL_GetGamepadMappingForGUID() and SDL_AddGamepadMapping()
  815. *
  816. * This hint should be set before SDL is initialized.
  817. *
  818. * \since This hint is available since SDL 3.2.0.
  819. */
  820. #define SDL_HINT_GAMECONTROLLERCONFIG_FILE "SDL_GAMECONTROLLERCONFIG_FILE"
  821. /**
  822. * A variable that overrides the automatic controller type detection.
  823. *
  824. * The variable should be comma separated entries, in the form: VID/PID=type
  825. *
  826. * The VID and PID should be hexadecimal with exactly 4 digits, e.g. 0x00fd
  827. *
  828. * This hint affects what low level protocol is used with the HIDAPI driver.
  829. *
  830. * The variable can be set to the following values:
  831. *
  832. * - "Xbox360"
  833. * - "XboxOne"
  834. * - "PS3"
  835. * - "PS4"
  836. * - "PS5"
  837. * - "SwitchPro"
  838. *
  839. * This hint should be set before SDL is initialized.
  840. *
  841. * \since This hint is available since SDL 3.2.0.
  842. */
  843. #define SDL_HINT_GAMECONTROLLERTYPE "SDL_GAMECONTROLLERTYPE"
  844. /**
  845. * A variable containing a list of devices to skip when scanning for game
  846. * controllers.
  847. *
  848. * The format of the string is a comma separated list of USB VID/PID pairs in
  849. * hexadecimal form, e.g.
  850. *
  851. * 0xAAAA/0xBBBB,0xCCCC/0xDDDD
  852. *
  853. * The variable can also take the form of "@file", in which case the named
  854. * file will be loaded and interpreted as the value of the variable.
  855. *
  856. * This hint can be set anytime.
  857. *
  858. * \since This hint is available since SDL 3.2.0.
  859. */
  860. #define SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES "SDL_GAMECONTROLLER_IGNORE_DEVICES"
  861. /**
  862. * If set, all devices will be skipped when scanning for game controllers
  863. * except for the ones listed in this variable.
  864. *
  865. * The format of the string is a comma separated list of USB VID/PID pairs in
  866. * hexadecimal form, e.g.
  867. *
  868. * 0xAAAA/0xBBBB,0xCCCC/0xDDDD
  869. *
  870. * The variable can also take the form of "@file", in which case the named
  871. * file will be loaded and interpreted as the value of the variable.
  872. *
  873. * This hint can be set anytime.
  874. *
  875. * \since This hint is available since SDL 3.2.0.
  876. */
  877. #define SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT "SDL_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT"
  878. /**
  879. * A variable that controls whether the device's built-in accelerometer and
  880. * gyro should be used as sensors for gamepads.
  881. *
  882. * The variable can be set to the following values:
  883. *
  884. * - "0": Sensor fusion is disabled
  885. * - "1": Sensor fusion is enabled for all controllers that lack sensors
  886. *
  887. * Or the variable can be a comma separated list of USB VID/PID pairs in
  888. * hexadecimal form, e.g.
  889. *
  890. * 0xAAAA/0xBBBB,0xCCCC/0xDDDD
  891. *
  892. * The variable can also take the form of "@file", in which case the named
  893. * file will be loaded and interpreted as the value of the variable.
  894. *
  895. * This hint should be set before a gamepad is opened.
  896. *
  897. * \since This hint is available since SDL 3.2.0.
  898. */
  899. #define SDL_HINT_GAMECONTROLLER_SENSOR_FUSION "SDL_GAMECONTROLLER_SENSOR_FUSION"
  900. /**
  901. * This variable sets the default text of the TextInput window on GDK
  902. * platforms.
  903. *
  904. * This hint is available only if SDL_GDK_TEXTINPUT defined.
  905. *
  906. * This hint should be set before calling SDL_StartTextInput()
  907. *
  908. * \since This hint is available since SDL 3.2.0.
  909. */
  910. #define SDL_HINT_GDK_TEXTINPUT_DEFAULT_TEXT "SDL_GDK_TEXTINPUT_DEFAULT_TEXT"
  911. /**
  912. * This variable sets the description of the TextInput window on GDK
  913. * platforms.
  914. *
  915. * This hint is available only if SDL_GDK_TEXTINPUT defined.
  916. *
  917. * This hint should be set before calling SDL_StartTextInput()
  918. *
  919. * \since This hint is available since SDL 3.2.0.
  920. */
  921. #define SDL_HINT_GDK_TEXTINPUT_DESCRIPTION "SDL_GDK_TEXTINPUT_DESCRIPTION"
  922. /**
  923. * This variable sets the maximum input length of the TextInput window on GDK
  924. * platforms.
  925. *
  926. * The value must be a stringified integer, for example "10" to allow for up
  927. * to 10 characters of text input.
  928. *
  929. * This hint is available only if SDL_GDK_TEXTINPUT defined.
  930. *
  931. * This hint should be set before calling SDL_StartTextInput()
  932. *
  933. * \since This hint is available since SDL 3.2.0.
  934. */
  935. #define SDL_HINT_GDK_TEXTINPUT_MAX_LENGTH "SDL_GDK_TEXTINPUT_MAX_LENGTH"
  936. /**
  937. * This variable sets the input scope of the TextInput window on GDK
  938. * platforms.
  939. *
  940. * Set this hint to change the XGameUiTextEntryInputScope value that will be
  941. * passed to the window creation function. The value must be a stringified
  942. * integer, for example "0" for XGameUiTextEntryInputScope::Default.
  943. *
  944. * This hint is available only if SDL_GDK_TEXTINPUT defined.
  945. *
  946. * This hint should be set before calling SDL_StartTextInput()
  947. *
  948. * \since This hint is available since SDL 3.2.0.
  949. */
  950. #define SDL_HINT_GDK_TEXTINPUT_SCOPE "SDL_GDK_TEXTINPUT_SCOPE"
  951. /**
  952. * This variable sets the title of the TextInput window on GDK platforms.
  953. *
  954. * This hint is available only if SDL_GDK_TEXTINPUT defined.
  955. *
  956. * This hint should be set before calling SDL_StartTextInput()
  957. *
  958. * \since This hint is available since SDL 3.2.0.
  959. */
  960. #define SDL_HINT_GDK_TEXTINPUT_TITLE "SDL_GDK_TEXTINPUT_TITLE"
  961. /**
  962. * A variable to control whether HIDAPI uses libusb for device access.
  963. *
  964. * By default libusb will only be used for a few devices that require direct
  965. * USB access, and this can be controlled with
  966. * SDL_HINT_HIDAPI_LIBUSB_WHITELIST.
  967. *
  968. * The variable can be set to the following values:
  969. *
  970. * - "0": HIDAPI will not use libusb for device access.
  971. * - "1": HIDAPI will use libusb for device access if available. (default)
  972. *
  973. * This hint should be set before SDL is initialized.
  974. *
  975. * \since This hint is available since SDL 3.2.0.
  976. */
  977. #define SDL_HINT_HIDAPI_LIBUSB "SDL_HIDAPI_LIBUSB"
  978. /**
  979. * A variable to control whether HIDAPI uses libusb only for whitelisted
  980. * devices.
  981. *
  982. * By default libusb will only be used for a few devices that require direct
  983. * USB access.
  984. *
  985. * The variable can be set to the following values:
  986. *
  987. * - "0": HIDAPI will use libusb for all device access.
  988. * - "1": HIDAPI will use libusb only for whitelisted devices. (default)
  989. *
  990. * This hint should be set before SDL is initialized.
  991. *
  992. * \since This hint is available since SDL 3.2.0.
  993. */
  994. #define SDL_HINT_HIDAPI_LIBUSB_WHITELIST "SDL_HIDAPI_LIBUSB_WHITELIST"
  995. /**
  996. * A variable to control whether HIDAPI uses udev for device detection.
  997. *
  998. * The variable can be set to the following values:
  999. *
  1000. * - "0": HIDAPI will poll for device changes.
  1001. * - "1": HIDAPI will use udev for device detection. (default)
  1002. *
  1003. * This hint should be set before SDL is initialized.
  1004. *
  1005. * \since This hint is available since SDL 3.2.0.
  1006. */
  1007. #define SDL_HINT_HIDAPI_UDEV "SDL_HIDAPI_UDEV"
  1008. /**
  1009. * A variable that specifies a GPU backend to use.
  1010. *
  1011. * By default, SDL will try all available GPU backends in a reasonable order
  1012. * until it finds one that can work, but this hint allows the app or user to
  1013. * force a specific target, such as "direct3d11" if, say, your hardware
  1014. * supports D3D12 but want to try using D3D11 instead.
  1015. *
  1016. * This hint should be set before any GPU functions are called.
  1017. *
  1018. * \since This hint is available since SDL 3.2.0.
  1019. */
  1020. #define SDL_HINT_GPU_DRIVER "SDL_GPU_DRIVER"
  1021. /**
  1022. * A variable to control whether SDL_hid_enumerate() enumerates all HID
  1023. * devices or only controllers.
  1024. *
  1025. * The variable can be set to the following values:
  1026. *
  1027. * - "0": SDL_hid_enumerate() will enumerate all HID devices.
  1028. * - "1": SDL_hid_enumerate() will only enumerate controllers. (default)
  1029. *
  1030. * By default SDL will only enumerate controllers, to reduce risk of hanging
  1031. * or crashing on devices with bad drivers and avoiding macOS keyboard capture
  1032. * permission prompts.
  1033. *
  1034. * This hint can be set anytime.
  1035. *
  1036. * \since This hint is available since SDL 3.2.0.
  1037. */
  1038. #define SDL_HINT_HIDAPI_ENUMERATE_ONLY_CONTROLLERS "SDL_HIDAPI_ENUMERATE_ONLY_CONTROLLERS"
  1039. /**
  1040. * A variable containing a list of devices to ignore in SDL_hid_enumerate().
  1041. *
  1042. * The format of the string is a comma separated list of USB VID/PID pairs in
  1043. * hexadecimal form, e.g.
  1044. *
  1045. * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
  1046. *
  1047. * For example, to ignore the Shanwan DS3 controller and any Valve controller,
  1048. * you might use the string "0x2563/0x0523,0x28de/0x0000"
  1049. *
  1050. * This hint can be set anytime.
  1051. *
  1052. * \since This hint is available since SDL 3.2.0.
  1053. */
  1054. #define SDL_HINT_HIDAPI_IGNORE_DEVICES "SDL_HIDAPI_IGNORE_DEVICES"
  1055. /**
  1056. * A variable describing what IME UI elements the application can display.
  1057. *
  1058. * By default IME UI is handled using native components by the OS where
  1059. * possible, however this can interfere with or not be visible when exclusive
  1060. * fullscreen mode is used.
  1061. *
  1062. * The variable can be set to a comma separated list containing the following
  1063. * items:
  1064. *
  1065. * - "none" or "0": The application can't render any IME elements, and native
  1066. * UI should be used. (default)
  1067. * - "composition": The application handles SDL_EVENT_TEXT_EDITING events and
  1068. * can render the composition text.
  1069. * - "candidates": The application handles SDL_EVENT_TEXT_EDITING_CANDIDATES
  1070. * and can render the candidate list.
  1071. *
  1072. * This hint should be set before SDL is initialized.
  1073. *
  1074. * \since This hint is available since SDL 3.2.0.
  1075. */
  1076. #define SDL_HINT_IME_IMPLEMENTED_UI "SDL_IME_IMPLEMENTED_UI"
  1077. /**
  1078. * A variable controlling whether the home indicator bar on iPhone X should be
  1079. * hidden.
  1080. *
  1081. * The variable can be set to the following values:
  1082. *
  1083. * - "0": The indicator bar is not hidden. (default for windowed applications)
  1084. * - "1": The indicator bar is hidden and is shown when the screen is touched
  1085. * (useful for movie playback applications).
  1086. * - "2": The indicator bar is dim and the first swipe makes it visible and
  1087. * the second swipe performs the "home" action. (default for fullscreen
  1088. * applications)
  1089. *
  1090. * This hint can be set anytime.
  1091. *
  1092. * \since This hint is available since SDL 3.2.0.
  1093. */
  1094. #define SDL_HINT_IOS_HIDE_HOME_INDICATOR "SDL_IOS_HIDE_HOME_INDICATOR"
  1095. /**
  1096. * A variable that lets you enable joystick (and gamecontroller) events even
  1097. * when your app is in the background.
  1098. *
  1099. * The variable can be set to the following values:
  1100. *
  1101. * - "0": Disable joystick & gamecontroller input events when the application
  1102. * is in the background. (default)
  1103. * - "1": Enable joystick & gamecontroller input events when the application
  1104. * is in the background.
  1105. *
  1106. * This hint can be set anytime.
  1107. *
  1108. * \since This hint is available since SDL 3.2.0.
  1109. */
  1110. #define SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS "SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS"
  1111. /**
  1112. * A variable containing a list of arcade stick style controllers.
  1113. *
  1114. * The format of the string is a comma separated list of USB VID/PID pairs in
  1115. * hexadecimal form, e.g.
  1116. *
  1117. * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
  1118. *
  1119. * The variable can also take the form of "@file", in which case the named
  1120. * file will be loaded and interpreted as the value of the variable.
  1121. *
  1122. * This hint can be set anytime.
  1123. *
  1124. * \since This hint is available since SDL 3.2.0.
  1125. */
  1126. #define SDL_HINT_JOYSTICK_ARCADESTICK_DEVICES "SDL_JOYSTICK_ARCADESTICK_DEVICES"
  1127. /**
  1128. * A variable containing a list of devices that are not arcade stick style
  1129. * controllers.
  1130. *
  1131. * This will override SDL_HINT_JOYSTICK_ARCADESTICK_DEVICES and the built in
  1132. * device list.
  1133. *
  1134. * The format of the string is a comma separated list of USB VID/PID pairs in
  1135. * hexadecimal form, e.g.
  1136. *
  1137. * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
  1138. *
  1139. * The variable can also take the form of "@file", in which case the named
  1140. * file will be loaded and interpreted as the value of the variable.
  1141. *
  1142. * This hint can be set anytime.
  1143. *
  1144. * \since This hint is available since SDL 3.2.0.
  1145. */
  1146. #define SDL_HINT_JOYSTICK_ARCADESTICK_DEVICES_EXCLUDED "SDL_JOYSTICK_ARCADESTICK_DEVICES_EXCLUDED"
  1147. /**
  1148. * A variable containing a list of devices that should not be considered
  1149. * joysticks.
  1150. *
  1151. * The format of the string is a comma separated list of USB VID/PID pairs in
  1152. * hexadecimal form, e.g.
  1153. *
  1154. * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
  1155. *
  1156. * The variable can also take the form of "@file", in which case the named
  1157. * file will be loaded and interpreted as the value of the variable.
  1158. *
  1159. * This hint can be set anytime.
  1160. *
  1161. * \since This hint is available since SDL 3.2.0.
  1162. */
  1163. #define SDL_HINT_JOYSTICK_BLACKLIST_DEVICES "SDL_JOYSTICK_BLACKLIST_DEVICES"
  1164. /**
  1165. * A variable containing a list of devices that should be considered
  1166. * joysticks.
  1167. *
  1168. * This will override SDL_HINT_JOYSTICK_BLACKLIST_DEVICES and the built in
  1169. * device list.
  1170. *
  1171. * The format of the string is a comma separated list of USB VID/PID pairs in
  1172. * hexadecimal form, e.g.
  1173. *
  1174. * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
  1175. *
  1176. * The variable can also take the form of "@file", in which case the named
  1177. * file will be loaded and interpreted as the value of the variable.
  1178. *
  1179. * This hint can be set anytime.
  1180. *
  1181. * \since This hint is available since SDL 3.2.0.
  1182. */
  1183. #define SDL_HINT_JOYSTICK_BLACKLIST_DEVICES_EXCLUDED "SDL_JOYSTICK_BLACKLIST_DEVICES_EXCLUDED"
  1184. /**
  1185. * A variable containing a comma separated list of devices to open as
  1186. * joysticks.
  1187. *
  1188. * This variable is currently only used by the Linux joystick driver.
  1189. *
  1190. * \since This hint is available since SDL 3.2.0.
  1191. */
  1192. #define SDL_HINT_JOYSTICK_DEVICE "SDL_JOYSTICK_DEVICE"
  1193. /**
  1194. * A variable controlling whether enhanced reports should be used for
  1195. * controllers when using the HIDAPI driver.
  1196. *
  1197. * Enhanced reports allow rumble and effects on Bluetooth PlayStation
  1198. * controllers and gyro on Nintendo Switch controllers, but break Windows
  1199. * DirectInput for other applications that don't use SDL.
  1200. *
  1201. * Once enhanced reports are enabled, they can't be disabled on PlayStation
  1202. * controllers without power cycling the controller.
  1203. *
  1204. * The variable can be set to the following values:
  1205. *
  1206. * - "0": enhanced reports are not enabled.
  1207. * - "1": enhanced reports are enabled. (default)
  1208. * - "auto": enhanced features are advertised to the application, but SDL
  1209. * doesn't change the controller report mode unless the application uses
  1210. * them.
  1211. *
  1212. * This hint can be enabled anytime.
  1213. *
  1214. * \since This hint is available since SDL 3.2.0.
  1215. */
  1216. #define SDL_HINT_JOYSTICK_ENHANCED_REPORTS "SDL_JOYSTICK_ENHANCED_REPORTS"
  1217. /**
  1218. * A variable containing a list of flightstick style controllers.
  1219. *
  1220. * The format of the string is a comma separated list of USB VID/PID pairs in
  1221. * hexadecimal form, e.g.
  1222. *
  1223. * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
  1224. *
  1225. * The variable can also take the form of @file, in which case the named file
  1226. * will be loaded and interpreted as the value of the variable.
  1227. *
  1228. * This hint can be set anytime.
  1229. *
  1230. * \since This hint is available since SDL 3.2.0.
  1231. */
  1232. #define SDL_HINT_JOYSTICK_FLIGHTSTICK_DEVICES "SDL_JOYSTICK_FLIGHTSTICK_DEVICES"
  1233. /**
  1234. * A variable containing a list of devices that are not flightstick style
  1235. * controllers.
  1236. *
  1237. * This will override SDL_HINT_JOYSTICK_FLIGHTSTICK_DEVICES and the built in
  1238. * device list.
  1239. *
  1240. * The format of the string is a comma separated list of USB VID/PID pairs in
  1241. * hexadecimal form, e.g.
  1242. *
  1243. * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
  1244. *
  1245. * The variable can also take the form of "@file", in which case the named
  1246. * file will be loaded and interpreted as the value of the variable.
  1247. *
  1248. * This hint can be set anytime.
  1249. *
  1250. * \since This hint is available since SDL 3.2.0.
  1251. */
  1252. #define SDL_HINT_JOYSTICK_FLIGHTSTICK_DEVICES_EXCLUDED "SDL_JOYSTICK_FLIGHTSTICK_DEVICES_EXCLUDED"
  1253. /**
  1254. * A variable controlling whether GameInput should be used for controller
  1255. * handling on Windows.
  1256. *
  1257. * The variable can be set to the following values:
  1258. *
  1259. * - "0": GameInput is not used.
  1260. * - "1": GameInput is used.
  1261. *
  1262. * The default is "1" on GDK platforms, and "0" otherwise.
  1263. *
  1264. * This hint should be set before SDL is initialized.
  1265. *
  1266. * \since This hint is available since SDL 3.2.0.
  1267. */
  1268. #define SDL_HINT_JOYSTICK_GAMEINPUT "SDL_JOYSTICK_GAMEINPUT"
  1269. /**
  1270. * A variable containing a list of devices known to have a GameCube form
  1271. * factor.
  1272. *
  1273. * The format of the string is a comma separated list of USB VID/PID pairs in
  1274. * hexadecimal form, e.g.
  1275. *
  1276. * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
  1277. *
  1278. * The variable can also take the form of "@file", in which case the named
  1279. * file will be loaded and interpreted as the value of the variable.
  1280. *
  1281. * This hint can be set anytime.
  1282. *
  1283. * \since This hint is available since SDL 3.2.0.
  1284. */
  1285. #define SDL_HINT_JOYSTICK_GAMECUBE_DEVICES "SDL_JOYSTICK_GAMECUBE_DEVICES"
  1286. /**
  1287. * A variable containing a list of devices known not to have a GameCube form
  1288. * factor.
  1289. *
  1290. * This will override SDL_HINT_JOYSTICK_GAMECUBE_DEVICES and the built in
  1291. * device list.
  1292. *
  1293. * The format of the string is a comma separated list of USB VID/PID pairs in
  1294. * hexadecimal form, e.g.
  1295. *
  1296. * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
  1297. *
  1298. * The variable can also take the form of "@file", in which case the named
  1299. * file will be loaded and interpreted as the value of the variable.
  1300. *
  1301. * This hint can be set anytime.
  1302. *
  1303. * \since This hint is available since SDL 3.2.0.
  1304. */
  1305. #define SDL_HINT_JOYSTICK_GAMECUBE_DEVICES_EXCLUDED "SDL_JOYSTICK_GAMECUBE_DEVICES_EXCLUDED"
  1306. /**
  1307. * A variable controlling whether the HIDAPI joystick drivers should be used.
  1308. *
  1309. * The variable can be set to the following values:
  1310. *
  1311. * - "0": HIDAPI drivers are not used.
  1312. * - "1": HIDAPI drivers are used. (default)
  1313. *
  1314. * This variable is the default for all drivers, but can be overridden by the
  1315. * hints for specific drivers below.
  1316. *
  1317. * This hint should be set before initializing joysticks and gamepads.
  1318. *
  1319. * \since This hint is available since SDL 3.2.0.
  1320. */
  1321. #define SDL_HINT_JOYSTICK_HIDAPI "SDL_JOYSTICK_HIDAPI"
  1322. /**
  1323. * A variable controlling whether Nintendo Switch Joy-Con controllers will be
  1324. * combined into a single Pro-like controller when using the HIDAPI driver.
  1325. *
  1326. * The variable can be set to the following values:
  1327. *
  1328. * - "0": Left and right Joy-Con controllers will not be combined and each
  1329. * will be a mini-gamepad.
  1330. * - "1": Left and right Joy-Con controllers will be combined into a single
  1331. * controller. (default)
  1332. *
  1333. * This hint should be set before initializing joysticks and gamepads.
  1334. *
  1335. * \since This hint is available since SDL 3.2.0.
  1336. */
  1337. #define SDL_HINT_JOYSTICK_HIDAPI_COMBINE_JOY_CONS "SDL_JOYSTICK_HIDAPI_COMBINE_JOY_CONS"
  1338. /**
  1339. * A variable controlling whether the HIDAPI driver for Nintendo GameCube
  1340. * controllers should be used.
  1341. *
  1342. * The variable can be set to the following values:
  1343. *
  1344. * - "0": HIDAPI driver is not used.
  1345. * - "1": HIDAPI driver is used.
  1346. *
  1347. * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
  1348. *
  1349. * This hint should be set before initializing joysticks and gamepads.
  1350. *
  1351. * \since This hint is available since SDL 3.2.0.
  1352. */
  1353. #define SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE "SDL_JOYSTICK_HIDAPI_GAMECUBE"
  1354. /**
  1355. * A variable controlling whether rumble is used to implement the GameCube
  1356. * controller's 3 rumble modes, Stop(0), Rumble(1), and StopHard(2).
  1357. *
  1358. * This is useful for applications that need full compatibility for things
  1359. * like ADSR envelopes. - Stop is implemented by setting low_frequency_rumble
  1360. * to 0 and high_frequency_rumble >0 - Rumble is both at any arbitrary value -
  1361. * StopHard is implemented by setting both low_frequency_rumble and
  1362. * high_frequency_rumble to 0
  1363. *
  1364. * The variable can be set to the following values:
  1365. *
  1366. * - "0": Normal rumble behavior is behavior is used. (default)
  1367. * - "1": Proper GameCube controller rumble behavior is used.
  1368. *
  1369. * This hint can be set anytime.
  1370. *
  1371. * \since This hint is available since SDL 3.2.0.
  1372. */
  1373. #define SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE_RUMBLE_BRAKE "SDL_JOYSTICK_HIDAPI_GAMECUBE_RUMBLE_BRAKE"
  1374. /**
  1375. * A variable controlling whether the HIDAPI driver for Nintendo Switch
  1376. * Joy-Cons should be used.
  1377. *
  1378. * The variable can be set to the following values:
  1379. *
  1380. * - "0": HIDAPI driver is not used.
  1381. * - "1": HIDAPI driver is used.
  1382. *
  1383. * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
  1384. *
  1385. * This hint should be set before initializing joysticks and gamepads.
  1386. *
  1387. * \since This hint is available since SDL 3.2.0.
  1388. */
  1389. #define SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS "SDL_JOYSTICK_HIDAPI_JOY_CONS"
  1390. /**
  1391. * A variable controlling whether the Home button LED should be turned on when
  1392. * a Nintendo Switch Joy-Con controller is opened.
  1393. *
  1394. * The variable can be set to the following values:
  1395. *
  1396. * - "0": home button LED is turned off
  1397. * - "1": home button LED is turned on
  1398. *
  1399. * By default the Home button LED state is not changed. This hint can also be
  1400. * set to a floating point value between 0.0 and 1.0 which controls the
  1401. * brightness of the Home button LED.
  1402. *
  1403. * This hint can be set anytime.
  1404. *
  1405. * \since This hint is available since SDL 3.2.0.
  1406. */
  1407. #define SDL_HINT_JOYSTICK_HIDAPI_JOYCON_HOME_LED "SDL_JOYSTICK_HIDAPI_JOYCON_HOME_LED"
  1408. /**
  1409. * A variable controlling whether the HIDAPI driver for Amazon Luna
  1410. * controllers connected via Bluetooth should be used.
  1411. *
  1412. * The variable can be set to the following values:
  1413. *
  1414. * - "0": HIDAPI driver is not used.
  1415. * - "1": HIDAPI driver is used.
  1416. *
  1417. * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
  1418. *
  1419. * This hint should be set before initializing joysticks and gamepads.
  1420. *
  1421. * \since This hint is available since SDL 3.2.0.
  1422. */
  1423. #define SDL_HINT_JOYSTICK_HIDAPI_LUNA "SDL_JOYSTICK_HIDAPI_LUNA"
  1424. /**
  1425. * A variable controlling whether the HIDAPI driver for Nintendo Online
  1426. * classic controllers should be used.
  1427. *
  1428. * The variable can be set to the following values:
  1429. *
  1430. * - "0": HIDAPI driver is not used.
  1431. * - "1": HIDAPI driver is used.
  1432. *
  1433. * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
  1434. *
  1435. * This hint should be set before initializing joysticks and gamepads.
  1436. *
  1437. * \since This hint is available since SDL 3.2.0.
  1438. */
  1439. #define SDL_HINT_JOYSTICK_HIDAPI_NINTENDO_CLASSIC "SDL_JOYSTICK_HIDAPI_NINTENDO_CLASSIC"
  1440. /**
  1441. * A variable controlling whether the HIDAPI driver for PS3 controllers should
  1442. * be used.
  1443. *
  1444. * The variable can be set to the following values:
  1445. *
  1446. * - "0": HIDAPI driver is not used.
  1447. * - "1": HIDAPI driver is used.
  1448. *
  1449. * The default is the value of SDL_HINT_JOYSTICK_HIDAPI on macOS, and "0" on
  1450. * other platforms.
  1451. *
  1452. * For official Sony driver (sixaxis.sys) use
  1453. * SDL_HINT_JOYSTICK_HIDAPI_PS3_SIXAXIS_DRIVER. See
  1454. * https://github.com/ViGEm/DsHidMini for an alternative driver on Windows.
  1455. *
  1456. * This hint should be set before initializing joysticks and gamepads.
  1457. *
  1458. * \since This hint is available since SDL 3.2.0.
  1459. */
  1460. #define SDL_HINT_JOYSTICK_HIDAPI_PS3 "SDL_JOYSTICK_HIDAPI_PS3"
  1461. /**
  1462. * A variable controlling whether the Sony driver (sixaxis.sys) for PS3
  1463. * controllers (Sixaxis/DualShock 3) should be used.
  1464. *
  1465. * The variable can be set to the following values:
  1466. *
  1467. * - "0": Sony driver (sixaxis.sys) is not used.
  1468. * - "1": Sony driver (sixaxis.sys) is used.
  1469. *
  1470. * The default value is 0.
  1471. *
  1472. * This hint should be set before initializing joysticks and gamepads.
  1473. *
  1474. * \since This hint is available since SDL 3.2.0.
  1475. */
  1476. #define SDL_HINT_JOYSTICK_HIDAPI_PS3_SIXAXIS_DRIVER "SDL_JOYSTICK_HIDAPI_PS3_SIXAXIS_DRIVER"
  1477. /**
  1478. * A variable controlling whether the HIDAPI driver for PS4 controllers should
  1479. * be used.
  1480. *
  1481. * The variable can be set to the following values:
  1482. *
  1483. * - "0": HIDAPI driver is not used.
  1484. * - "1": HIDAPI driver is used.
  1485. *
  1486. * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
  1487. *
  1488. * This hint should be set before initializing joysticks and gamepads.
  1489. *
  1490. * \since This hint is available since SDL 3.2.0.
  1491. */
  1492. #define SDL_HINT_JOYSTICK_HIDAPI_PS4 "SDL_JOYSTICK_HIDAPI_PS4"
  1493. /**
  1494. * A variable controlling the update rate of the PS4 controller over Bluetooth
  1495. * when using the HIDAPI driver.
  1496. *
  1497. * This defaults to 4 ms, to match the behavior over USB, and to be more
  1498. * friendly to other Bluetooth devices and older Bluetooth hardware on the
  1499. * computer. It can be set to "1" (1000Hz), "2" (500Hz) and "4" (250Hz)
  1500. *
  1501. * This hint can be set anytime, but only takes effect when extended input
  1502. * reports are enabled.
  1503. *
  1504. * \since This hint is available since SDL 3.2.0.
  1505. */
  1506. #define SDL_HINT_JOYSTICK_HIDAPI_PS4_REPORT_INTERVAL "SDL_JOYSTICK_HIDAPI_PS4_REPORT_INTERVAL"
  1507. /**
  1508. * A variable controlling whether the HIDAPI driver for PS5 controllers should
  1509. * be used.
  1510. *
  1511. * The variable can be set to the following values:
  1512. *
  1513. * - "0": HIDAPI driver is not used.
  1514. * - "1": HIDAPI driver is used.
  1515. *
  1516. * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
  1517. *
  1518. * This hint should be set before initializing joysticks and gamepads.
  1519. *
  1520. * \since This hint is available since SDL 3.2.0.
  1521. */
  1522. #define SDL_HINT_JOYSTICK_HIDAPI_PS5 "SDL_JOYSTICK_HIDAPI_PS5"
  1523. /**
  1524. * A variable controlling whether the player LEDs should be lit to indicate
  1525. * which player is associated with a PS5 controller.
  1526. *
  1527. * The variable can be set to the following values:
  1528. *
  1529. * - "0": player LEDs are not enabled.
  1530. * - "1": player LEDs are enabled. (default)
  1531. *
  1532. * \since This hint is available since SDL 3.2.0.
  1533. */
  1534. #define SDL_HINT_JOYSTICK_HIDAPI_PS5_PLAYER_LED "SDL_JOYSTICK_HIDAPI_PS5_PLAYER_LED"
  1535. /**
  1536. * A variable controlling whether the HIDAPI driver for NVIDIA SHIELD
  1537. * controllers should be used.
  1538. *
  1539. * The variable can be set to the following values:
  1540. *
  1541. * - "0": HIDAPI driver is not used.
  1542. * - "1": HIDAPI driver is used.
  1543. *
  1544. * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
  1545. *
  1546. * This hint should be set before initializing joysticks and gamepads.
  1547. *
  1548. * \since This hint is available since SDL 3.2.0.
  1549. */
  1550. #define SDL_HINT_JOYSTICK_HIDAPI_SHIELD "SDL_JOYSTICK_HIDAPI_SHIELD"
  1551. /**
  1552. * A variable controlling whether the HIDAPI driver for Google Stadia
  1553. * controllers should be used.
  1554. *
  1555. * The variable can be set to the following values:
  1556. *
  1557. * - "0": HIDAPI driver is not used.
  1558. * - "1": HIDAPI driver is used.
  1559. *
  1560. * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
  1561. *
  1562. * \since This hint is available since SDL 3.2.0.
  1563. */
  1564. #define SDL_HINT_JOYSTICK_HIDAPI_STADIA "SDL_JOYSTICK_HIDAPI_STADIA"
  1565. /**
  1566. * A variable controlling whether the HIDAPI driver for Bluetooth Steam
  1567. * Controllers should be used.
  1568. *
  1569. * The variable can be set to the following values:
  1570. *
  1571. * - "0": HIDAPI driver is not used. (default)
  1572. * - "1": HIDAPI driver is used for Steam Controllers, which requires
  1573. * Bluetooth access and may prompt the user for permission on iOS and
  1574. * Android.
  1575. *
  1576. * This hint should be set before initializing joysticks and gamepads.
  1577. *
  1578. * \since This hint is available since SDL 3.2.0.
  1579. */
  1580. #define SDL_HINT_JOYSTICK_HIDAPI_STEAM "SDL_JOYSTICK_HIDAPI_STEAM"
  1581. /**
  1582. * A variable controlling whether the Steam button LED should be turned on
  1583. * when a Steam controller is opened.
  1584. *
  1585. * The variable can be set to the following values:
  1586. *
  1587. * - "0": Steam button LED is turned off.
  1588. * - "1": Steam button LED is turned on.
  1589. *
  1590. * By default the Steam button LED state is not changed. This hint can also be
  1591. * set to a floating point value between 0.0 and 1.0 which controls the
  1592. * brightness of the Steam button LED.
  1593. *
  1594. * This hint can be set anytime.
  1595. *
  1596. * \since This hint is available since SDL 3.2.0.
  1597. */
  1598. #define SDL_HINT_JOYSTICK_HIDAPI_STEAM_HOME_LED "SDL_JOYSTICK_HIDAPI_STEAM_HOME_LED"
  1599. /**
  1600. * A variable controlling whether the HIDAPI driver for the Steam Deck builtin
  1601. * controller should be used.
  1602. *
  1603. * The variable can be set to the following values:
  1604. *
  1605. * - "0": HIDAPI driver is not used.
  1606. * - "1": HIDAPI driver is used.
  1607. *
  1608. * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
  1609. *
  1610. * This hint should be set before initializing joysticks and gamepads.
  1611. *
  1612. * \since This hint is available since SDL 3.2.0.
  1613. */
  1614. #define SDL_HINT_JOYSTICK_HIDAPI_STEAMDECK "SDL_JOYSTICK_HIDAPI_STEAMDECK"
  1615. /**
  1616. * A variable controlling whether the HIDAPI driver for HORI licensed Steam
  1617. * controllers should be used.
  1618. *
  1619. * This variable can be set to the following values: "0" - HIDAPI driver is
  1620. * not used "1" - HIDAPI driver is used
  1621. *
  1622. * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
  1623. */
  1624. #define SDL_HINT_JOYSTICK_HIDAPI_STEAM_HORI "SDL_JOYSTICK_HIDAPI_STEAM_HORI"
  1625. /**
  1626. * A variable controlling whether the HIDAPI driver for Nintendo Switch
  1627. * controllers should be used.
  1628. *
  1629. * The variable can be set to the following values:
  1630. *
  1631. * - "0": HIDAPI driver is not used.
  1632. * - "1": HIDAPI driver is used.
  1633. *
  1634. * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
  1635. *
  1636. * This hint should be set before initializing joysticks and gamepads.
  1637. *
  1638. * \since This hint is available since SDL 3.2.0.
  1639. */
  1640. #define SDL_HINT_JOYSTICK_HIDAPI_SWITCH "SDL_JOYSTICK_HIDAPI_SWITCH"
  1641. /**
  1642. * A variable controlling whether the Home button LED should be turned on when
  1643. * a Nintendo Switch Pro controller is opened.
  1644. *
  1645. * The variable can be set to the following values:
  1646. *
  1647. * - "0": Home button LED is turned off.
  1648. * - "1": Home button LED is turned on.
  1649. *
  1650. * By default the Home button LED state is not changed. This hint can also be
  1651. * set to a floating point value between 0.0 and 1.0 which controls the
  1652. * brightness of the Home button LED.
  1653. *
  1654. * This hint can be set anytime.
  1655. *
  1656. * \since This hint is available since SDL 3.2.0.
  1657. */
  1658. #define SDL_HINT_JOYSTICK_HIDAPI_SWITCH_HOME_LED "SDL_JOYSTICK_HIDAPI_SWITCH_HOME_LED"
  1659. /**
  1660. * A variable controlling whether the player LEDs should be lit to indicate
  1661. * which player is associated with a Nintendo Switch controller.
  1662. *
  1663. * The variable can be set to the following values:
  1664. *
  1665. * - "0": Player LEDs are not enabled.
  1666. * - "1": Player LEDs are enabled. (default)
  1667. *
  1668. * This hint can be set anytime.
  1669. *
  1670. * \since This hint is available since SDL 3.2.0.
  1671. */
  1672. #define SDL_HINT_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED "SDL_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED"
  1673. /**
  1674. * A variable controlling whether Nintendo Switch Joy-Con controllers will be
  1675. * in vertical mode when using the HIDAPI driver.
  1676. *
  1677. * The variable can be set to the following values:
  1678. *
  1679. * - "0": Left and right Joy-Con controllers will not be in vertical mode.
  1680. * (default)
  1681. * - "1": Left and right Joy-Con controllers will be in vertical mode.
  1682. *
  1683. * This hint should be set before opening a Joy-Con controller.
  1684. *
  1685. * \since This hint is available since SDL 3.2.0.
  1686. */
  1687. #define SDL_HINT_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS "SDL_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS"
  1688. /**
  1689. * A variable controlling whether the HIDAPI driver for Nintendo Wii and Wii U
  1690. * controllers should be used.
  1691. *
  1692. * The variable can be set to the following values:
  1693. *
  1694. * - "0": HIDAPI driver is not used.
  1695. * - "1": HIDAPI driver is used.
  1696. *
  1697. * This driver doesn't work with the dolphinbar, so the default is false for
  1698. * now.
  1699. *
  1700. * This hint should be set before initializing joysticks and gamepads.
  1701. *
  1702. * \since This hint is available since SDL 3.2.0.
  1703. */
  1704. #define SDL_HINT_JOYSTICK_HIDAPI_WII "SDL_JOYSTICK_HIDAPI_WII"
  1705. /**
  1706. * A variable controlling whether the player LEDs should be lit to indicate
  1707. * which player is associated with a Wii controller.
  1708. *
  1709. * The variable can be set to the following values:
  1710. *
  1711. * - "0": Player LEDs are not enabled.
  1712. * - "1": Player LEDs are enabled. (default)
  1713. *
  1714. * This hint can be set anytime.
  1715. *
  1716. * \since This hint is available since SDL 3.2.0.
  1717. */
  1718. #define SDL_HINT_JOYSTICK_HIDAPI_WII_PLAYER_LED "SDL_JOYSTICK_HIDAPI_WII_PLAYER_LED"
  1719. /**
  1720. * A variable controlling whether the HIDAPI driver for XBox controllers
  1721. * should be used.
  1722. *
  1723. * The variable can be set to the following values:
  1724. *
  1725. * - "0": HIDAPI driver is not used.
  1726. * - "1": HIDAPI driver is used.
  1727. *
  1728. * The default is "0" on Windows, otherwise the value of
  1729. * SDL_HINT_JOYSTICK_HIDAPI
  1730. *
  1731. * This hint should be set before initializing joysticks and gamepads.
  1732. *
  1733. * \since This hint is available since SDL 3.2.0.
  1734. */
  1735. #define SDL_HINT_JOYSTICK_HIDAPI_XBOX "SDL_JOYSTICK_HIDAPI_XBOX"
  1736. /**
  1737. * A variable controlling whether the HIDAPI driver for XBox 360 controllers
  1738. * should be used.
  1739. *
  1740. * The variable can be set to the following values:
  1741. *
  1742. * - "0": HIDAPI driver is not used.
  1743. * - "1": HIDAPI driver is used.
  1744. *
  1745. * The default is the value of SDL_HINT_JOYSTICK_HIDAPI_XBOX
  1746. *
  1747. * This hint should be set before initializing joysticks and gamepads.
  1748. *
  1749. * \since This hint is available since SDL 3.2.0.
  1750. */
  1751. #define SDL_HINT_JOYSTICK_HIDAPI_XBOX_360 "SDL_JOYSTICK_HIDAPI_XBOX_360"
  1752. /**
  1753. * A variable controlling whether the player LEDs should be lit to indicate
  1754. * which player is associated with an Xbox 360 controller.
  1755. *
  1756. * The variable can be set to the following values:
  1757. *
  1758. * - "0": Player LEDs are not enabled.
  1759. * - "1": Player LEDs are enabled. (default)
  1760. *
  1761. * This hint can be set anytime.
  1762. *
  1763. * \since This hint is available since SDL 3.2.0.
  1764. */
  1765. #define SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED "SDL_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED"
  1766. /**
  1767. * A variable controlling whether the HIDAPI driver for XBox 360 wireless
  1768. * controllers should be used.
  1769. *
  1770. * The variable can be set to the following values:
  1771. *
  1772. * - "0": HIDAPI driver is not used.
  1773. * - "1": HIDAPI driver is used.
  1774. *
  1775. * The default is the value of SDL_HINT_JOYSTICK_HIDAPI_XBOX_360
  1776. *
  1777. * This hint should be set before initializing joysticks and gamepads.
  1778. *
  1779. * \since This hint is available since SDL 3.2.0.
  1780. */
  1781. #define SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_WIRELESS "SDL_JOYSTICK_HIDAPI_XBOX_360_WIRELESS"
  1782. /**
  1783. * A variable controlling whether the HIDAPI driver for XBox One controllers
  1784. * should be used.
  1785. *
  1786. * The variable can be set to the following values:
  1787. *
  1788. * - "0": HIDAPI driver is not used.
  1789. * - "1": HIDAPI driver is used.
  1790. *
  1791. * The default is the value of SDL_HINT_JOYSTICK_HIDAPI_XBOX.
  1792. *
  1793. * This hint should be set before initializing joysticks and gamepads.
  1794. *
  1795. * \since This hint is available since SDL 3.2.0.
  1796. */
  1797. #define SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE "SDL_JOYSTICK_HIDAPI_XBOX_ONE"
  1798. /**
  1799. * A variable controlling whether the Home button LED should be turned on when
  1800. * an Xbox One controller is opened.
  1801. *
  1802. * The variable can be set to the following values:
  1803. *
  1804. * - "0": Home button LED is turned off.
  1805. * - "1": Home button LED is turned on.
  1806. *
  1807. * By default the Home button LED state is not changed. This hint can also be
  1808. * set to a floating point value between 0.0 and 1.0 which controls the
  1809. * brightness of the Home button LED. The default brightness is 0.4.
  1810. *
  1811. * This hint can be set anytime.
  1812. *
  1813. * \since This hint is available since SDL 3.2.0.
  1814. */
  1815. #define SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED "SDL_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED"
  1816. /**
  1817. * A variable controlling whether IOKit should be used for controller
  1818. * handling.
  1819. *
  1820. * The variable can be set to the following values:
  1821. *
  1822. * - "0": IOKit is not used.
  1823. * - "1": IOKit is used. (default)
  1824. *
  1825. * This hint should be set before SDL is initialized.
  1826. *
  1827. * \since This hint is available since SDL 3.2.0.
  1828. */
  1829. #define SDL_HINT_JOYSTICK_IOKIT "SDL_JOYSTICK_IOKIT"
  1830. /**
  1831. * A variable controlling whether to use the classic /dev/input/js* joystick
  1832. * interface or the newer /dev/input/event* joystick interface on Linux.
  1833. *
  1834. * The variable can be set to the following values:
  1835. *
  1836. * - "0": Use /dev/input/event* (default)
  1837. * - "1": Use /dev/input/js*
  1838. *
  1839. * This hint should be set before SDL is initialized.
  1840. *
  1841. * \since This hint is available since SDL 3.2.0.
  1842. */
  1843. #define SDL_HINT_JOYSTICK_LINUX_CLASSIC "SDL_JOYSTICK_LINUX_CLASSIC"
  1844. /**
  1845. * A variable controlling whether joysticks on Linux adhere to their
  1846. * HID-defined deadzones or return unfiltered values.
  1847. *
  1848. * The variable can be set to the following values:
  1849. *
  1850. * - "0": Return unfiltered joystick axis values. (default)
  1851. * - "1": Return axis values with deadzones taken into account.
  1852. *
  1853. * This hint should be set before a controller is opened.
  1854. *
  1855. * \since This hint is available since SDL 3.2.0.
  1856. */
  1857. #define SDL_HINT_JOYSTICK_LINUX_DEADZONES "SDL_JOYSTICK_LINUX_DEADZONES"
  1858. /**
  1859. * A variable controlling whether joysticks on Linux will always treat 'hat'
  1860. * axis inputs (ABS_HAT0X - ABS_HAT3Y) as 8-way digital hats without checking
  1861. * whether they may be analog.
  1862. *
  1863. * The variable can be set to the following values:
  1864. *
  1865. * - "0": Only map hat axis inputs to digital hat outputs if the input axes
  1866. * appear to actually be digital. (default)
  1867. * - "1": Always handle the input axes numbered ABS_HAT0X to ABS_HAT3Y as
  1868. * digital hats.
  1869. *
  1870. * This hint should be set before a controller is opened.
  1871. *
  1872. * \since This hint is available since SDL 3.2.0.
  1873. */
  1874. #define SDL_HINT_JOYSTICK_LINUX_DIGITAL_HATS "SDL_JOYSTICK_LINUX_DIGITAL_HATS"
  1875. /**
  1876. * A variable controlling whether digital hats on Linux will apply deadzones
  1877. * to their underlying input axes or use unfiltered values.
  1878. *
  1879. * The variable can be set to the following values:
  1880. *
  1881. * - "0": Return digital hat values based on unfiltered input axis values.
  1882. * - "1": Return digital hat values with deadzones on the input axes taken
  1883. * into account. (default)
  1884. *
  1885. * This hint should be set before a controller is opened.
  1886. *
  1887. * \since This hint is available since SDL 3.2.0.
  1888. */
  1889. #define SDL_HINT_JOYSTICK_LINUX_HAT_DEADZONES "SDL_JOYSTICK_LINUX_HAT_DEADZONES"
  1890. /**
  1891. * A variable controlling whether GCController should be used for controller
  1892. * handling.
  1893. *
  1894. * The variable can be set to the following values:
  1895. *
  1896. * - "0": GCController is not used.
  1897. * - "1": GCController is used. (default)
  1898. *
  1899. * This hint should be set before SDL is initialized.
  1900. *
  1901. * \since This hint is available since SDL 3.2.0.
  1902. */
  1903. #define SDL_HINT_JOYSTICK_MFI "SDL_JOYSTICK_MFI"
  1904. /**
  1905. * A variable controlling whether the RAWINPUT joystick drivers should be used
  1906. * for better handling XInput-capable devices.
  1907. *
  1908. * The variable can be set to the following values:
  1909. *
  1910. * - "0": RAWINPUT drivers are not used.
  1911. * - "1": RAWINPUT drivers are used. (default)
  1912. *
  1913. * This hint should be set before SDL is initialized.
  1914. *
  1915. * \since This hint is available since SDL 3.2.0.
  1916. */
  1917. #define SDL_HINT_JOYSTICK_RAWINPUT "SDL_JOYSTICK_RAWINPUT"
  1918. /**
  1919. * A variable controlling whether the RAWINPUT driver should pull correlated
  1920. * data from XInput.
  1921. *
  1922. * The variable can be set to the following values:
  1923. *
  1924. * - "0": RAWINPUT driver will only use data from raw input APIs.
  1925. * - "1": RAWINPUT driver will also pull data from XInput and
  1926. * Windows.Gaming.Input, providing better trigger axes, guide button
  1927. * presses, and rumble support for Xbox controllers. (default)
  1928. *
  1929. * This hint should be set before a gamepad is opened.
  1930. *
  1931. * \since This hint is available since SDL 3.2.0.
  1932. */
  1933. #define SDL_HINT_JOYSTICK_RAWINPUT_CORRELATE_XINPUT "SDL_JOYSTICK_RAWINPUT_CORRELATE_XINPUT"
  1934. /**
  1935. * A variable controlling whether the ROG Chakram mice should show up as
  1936. * joysticks.
  1937. *
  1938. * The variable can be set to the following values:
  1939. *
  1940. * - "0": ROG Chakram mice do not show up as joysticks. (default)
  1941. * - "1": ROG Chakram mice show up as joysticks.
  1942. *
  1943. * This hint should be set before SDL is initialized.
  1944. *
  1945. * \since This hint is available since SDL 3.2.0.
  1946. */
  1947. #define SDL_HINT_JOYSTICK_ROG_CHAKRAM "SDL_JOYSTICK_ROG_CHAKRAM"
  1948. /**
  1949. * A variable controlling whether a separate thread should be used for
  1950. * handling joystick detection and raw input messages on Windows.
  1951. *
  1952. * The variable can be set to the following values:
  1953. *
  1954. * - "0": A separate thread is not used.
  1955. * - "1": A separate thread is used for handling raw input messages. (default)
  1956. *
  1957. * This hint should be set before SDL is initialized.
  1958. *
  1959. * \since This hint is available since SDL 3.2.0.
  1960. */
  1961. #define SDL_HINT_JOYSTICK_THREAD "SDL_JOYSTICK_THREAD"
  1962. /**
  1963. * A variable containing a list of throttle style controllers.
  1964. *
  1965. * The format of the string is a comma separated list of USB VID/PID pairs in
  1966. * hexadecimal form, e.g.
  1967. *
  1968. * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
  1969. *
  1970. * The variable can also take the form of "@file", in which case the named
  1971. * file will be loaded and interpreted as the value of the variable.
  1972. *
  1973. * This hint can be set anytime.
  1974. *
  1975. * \since This hint is available since SDL 3.2.0.
  1976. */
  1977. #define SDL_HINT_JOYSTICK_THROTTLE_DEVICES "SDL_JOYSTICK_THROTTLE_DEVICES"
  1978. /**
  1979. * A variable containing a list of devices that are not throttle style
  1980. * controllers.
  1981. *
  1982. * This will override SDL_HINT_JOYSTICK_THROTTLE_DEVICES and the built in
  1983. * device list.
  1984. *
  1985. * The format of the string is a comma separated list of USB VID/PID pairs in
  1986. * hexadecimal form, e.g.
  1987. *
  1988. * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
  1989. *
  1990. * The variable can also take the form of "@file", in which case the named
  1991. * file will be loaded and interpreted as the value of the variable.
  1992. *
  1993. * This hint can be set anytime.
  1994. *
  1995. * \since This hint is available since SDL 3.2.0.
  1996. */
  1997. #define SDL_HINT_JOYSTICK_THROTTLE_DEVICES_EXCLUDED "SDL_JOYSTICK_THROTTLE_DEVICES_EXCLUDED"
  1998. /**
  1999. * A variable controlling whether Windows.Gaming.Input should be used for
  2000. * controller handling.
  2001. *
  2002. * The variable can be set to the following values:
  2003. *
  2004. * - "0": WGI is not used.
  2005. * - "1": WGI is used. (default)
  2006. *
  2007. * This hint should be set before SDL is initialized.
  2008. *
  2009. * \since This hint is available since SDL 3.2.0.
  2010. */
  2011. #define SDL_HINT_JOYSTICK_WGI "SDL_JOYSTICK_WGI"
  2012. /**
  2013. * A variable containing a list of wheel style controllers.
  2014. *
  2015. * The format of the string is a comma separated list of USB VID/PID pairs in
  2016. * hexadecimal form, e.g.
  2017. *
  2018. * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
  2019. *
  2020. * The variable can also take the form of "@file", in which case the named
  2021. * file will be loaded and interpreted as the value of the variable.
  2022. *
  2023. * This hint can be set anytime.
  2024. *
  2025. * \since This hint is available since SDL 3.2.0.
  2026. */
  2027. #define SDL_HINT_JOYSTICK_WHEEL_DEVICES "SDL_JOYSTICK_WHEEL_DEVICES"
  2028. /**
  2029. * A variable containing a list of devices that are not wheel style
  2030. * controllers.
  2031. *
  2032. * This will override SDL_HINT_JOYSTICK_WHEEL_DEVICES and the built in device
  2033. * list.
  2034. *
  2035. * The format of the string is a comma separated list of USB VID/PID pairs in
  2036. * hexadecimal form, e.g.
  2037. *
  2038. * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
  2039. *
  2040. * The variable can also take the form of "@file", in which case the named
  2041. * file will be loaded and interpreted as the value of the variable.
  2042. *
  2043. * This hint can be set anytime.
  2044. *
  2045. * \since This hint is available since SDL 3.2.0.
  2046. */
  2047. #define SDL_HINT_JOYSTICK_WHEEL_DEVICES_EXCLUDED "SDL_JOYSTICK_WHEEL_DEVICES_EXCLUDED"
  2048. /**
  2049. * A variable containing a list of devices known to have all axes centered at
  2050. * zero.
  2051. *
  2052. * The format of the string is a comma separated list of USB VID/PID pairs in
  2053. * hexadecimal form, e.g.
  2054. *
  2055. * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
  2056. *
  2057. * The variable can also take the form of "@file", in which case the named
  2058. * file will be loaded and interpreted as the value of the variable.
  2059. *
  2060. * This hint should be set before a controller is opened.
  2061. *
  2062. * \since This hint is available since SDL 3.2.0.
  2063. */
  2064. #define SDL_HINT_JOYSTICK_ZERO_CENTERED_DEVICES "SDL_JOYSTICK_ZERO_CENTERED_DEVICES"
  2065. /**
  2066. * A variable that controls keycode representation in keyboard events.
  2067. *
  2068. * This variable is a comma separated set of options for translating keycodes
  2069. * in events:
  2070. *
  2071. * - "none": Keycode options are cleared, this overrides other options.
  2072. * - "hide_numpad": The numpad keysyms will be translated into their
  2073. * non-numpad versions based on the current NumLock state. For example,
  2074. * SDLK_KP_4 would become SDLK_4 if SDL_KMOD_NUM is set in the event
  2075. * modifiers, and SDLK_LEFT if it is unset.
  2076. * - "french_numbers": The number row on French keyboards is inverted, so
  2077. * pressing the 1 key would yield the keycode SDLK_1, or '1', instead of
  2078. * SDLK_AMPERSAND, or '&'
  2079. * - "latin_letters": For keyboards using non-Latin letters, such as Russian
  2080. * or Thai, the letter keys generate keycodes as though it had an en_US
  2081. * layout. e.g. pressing the key associated with SDL_SCANCODE_A on a Russian
  2082. * keyboard would yield 'a' instead of a Cyrillic letter.
  2083. *
  2084. * The default value for this hint is "french_numbers,latin_letters"
  2085. *
  2086. * Some platforms like Emscripten only provide modified keycodes and the
  2087. * options are not used.
  2088. *
  2089. * These options do not affect the return value of SDL_GetKeyFromScancode() or
  2090. * SDL_GetScancodeFromKey(), they just apply to the keycode included in key
  2091. * events.
  2092. *
  2093. * This hint can be set anytime.
  2094. *
  2095. * \since This hint is available since SDL 3.2.0.
  2096. */
  2097. #define SDL_HINT_KEYCODE_OPTIONS "SDL_KEYCODE_OPTIONS"
  2098. /**
  2099. * A variable that controls what KMSDRM device to use.
  2100. *
  2101. * SDL might open something like "/dev/dri/cardNN" to access KMSDRM
  2102. * functionality, where "NN" is a device index number. SDL makes a guess at
  2103. * the best index to use (usually zero), but the app or user can set this hint
  2104. * to a number between 0 and 99 to force selection.
  2105. *
  2106. * This hint should be set before SDL is initialized.
  2107. *
  2108. * \since This hint is available since SDL 3.2.0.
  2109. */
  2110. #define SDL_HINT_KMSDRM_DEVICE_INDEX "SDL_KMSDRM_DEVICE_INDEX"
  2111. /**
  2112. * A variable that controls whether SDL requires DRM master access in order to
  2113. * initialize the KMSDRM video backend.
  2114. *
  2115. * The DRM subsystem has a concept of a "DRM master" which is a DRM client
  2116. * that has the ability to set planes, set cursor, etc. When SDL is DRM
  2117. * master, it can draw to the screen using the SDL rendering APIs. Without DRM
  2118. * master, SDL is still able to process input and query attributes of attached
  2119. * displays, but it cannot change display state or draw to the screen
  2120. * directly.
  2121. *
  2122. * In some cases, it can be useful to have the KMSDRM backend even if it
  2123. * cannot be used for rendering. An app may want to use SDL for input
  2124. * processing while using another rendering API (such as an MMAL overlay on
  2125. * Raspberry Pi) or using its own code to render to DRM overlays that SDL
  2126. * doesn't support.
  2127. *
  2128. * The variable can be set to the following values:
  2129. *
  2130. * - "0": SDL will allow usage of the KMSDRM backend without DRM master.
  2131. * - "1": SDL Will require DRM master to use the KMSDRM backend. (default)
  2132. *
  2133. * This hint should be set before SDL is initialized.
  2134. *
  2135. * \since This hint is available since SDL 3.2.0.
  2136. */
  2137. #define SDL_HINT_KMSDRM_REQUIRE_DRM_MASTER "SDL_KMSDRM_REQUIRE_DRM_MASTER"
  2138. /**
  2139. * A variable controlling the default SDL log levels.
  2140. *
  2141. * This variable is a comma separated set of category=level tokens that define
  2142. * the default logging levels for SDL applications.
  2143. *
  2144. * The category can be a numeric category, one of "app", "error", "assert",
  2145. * "system", "audio", "video", "render", "input", "test", or `*` for any
  2146. * unspecified category.
  2147. *
  2148. * The level can be a numeric level, one of "verbose", "debug", "info",
  2149. * "warn", "error", "critical", or "quiet" to disable that category.
  2150. *
  2151. * You can omit the category if you want to set the logging level for all
  2152. * categories.
  2153. *
  2154. * If this hint isn't set, the default log levels are equivalent to:
  2155. *
  2156. * `app=info,assert=warn,test=verbose,*=error`
  2157. *
  2158. * This hint can be set anytime.
  2159. *
  2160. * \since This hint is available since SDL 3.2.0.
  2161. */
  2162. #define SDL_HINT_LOGGING "SDL_LOGGING"
  2163. /**
  2164. * A variable controlling whether to force the application to become the
  2165. * foreground process when launched on macOS.
  2166. *
  2167. * The variable can be set to the following values:
  2168. *
  2169. * - "0": The application is brought to the foreground when launched.
  2170. * (default)
  2171. * - "1": The application may remain in the background when launched.
  2172. *
  2173. * This hint needs to be set before SDL_Init().
  2174. *
  2175. * \since This hint is available since SDL 3.2.0.
  2176. */
  2177. #define SDL_HINT_MAC_BACKGROUND_APP "SDL_MAC_BACKGROUND_APP"
  2178. /**
  2179. * A variable that determines whether Ctrl+Click should generate a right-click
  2180. * event on macOS.
  2181. *
  2182. * The variable can be set to the following values:
  2183. *
  2184. * - "0": Ctrl+Click does not generate a right mouse button click event.
  2185. * (default)
  2186. * - "1": Ctrl+Click generated a right mouse button click event.
  2187. *
  2188. * This hint can be set anytime.
  2189. *
  2190. * \since This hint is available since SDL 3.2.0.
  2191. */
  2192. #define SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK "SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK"
  2193. /**
  2194. * A variable controlling whether dispatching OpenGL context updates should
  2195. * block the dispatching thread until the main thread finishes processing on
  2196. * macOS.
  2197. *
  2198. * The variable can be set to the following values:
  2199. *
  2200. * - "0": Dispatching OpenGL context updates will block the dispatching thread
  2201. * until the main thread finishes processing. (default)
  2202. * - "1": Dispatching OpenGL context updates will allow the dispatching thread
  2203. * to continue execution.
  2204. *
  2205. * Generally you want the default, but if you have OpenGL code in a background
  2206. * thread on a Mac, and the main thread hangs because it's waiting for that
  2207. * background thread, but that background thread is also hanging because it's
  2208. * waiting for the main thread to do an update, this might fix your issue.
  2209. *
  2210. * This hint can be set anytime.
  2211. *
  2212. * \since This hint is available since SDL 3.2.0.
  2213. */
  2214. #define SDL_HINT_MAC_OPENGL_ASYNC_DISPATCH "SDL_MAC_OPENGL_ASYNC_DISPATCH"
  2215. /**
  2216. * A variable controlling whether the Option (⌥) key on macOS should be
  2217. * remapped to act as the Alt key.
  2218. *
  2219. * The variable can be set to the following values:
  2220. *
  2221. * - "none": The Option key is not remapped to Alt. (default)
  2222. * - "only_left": Only the left Option key is remapped to Alt.
  2223. * - "only_right": Only the right Option key is remapped to Alt.
  2224. * - "both": Both Option keys are remapped to Alt.
  2225. *
  2226. * This will prevent the triggering of key compositions that rely on the
  2227. * Option key, but will still send the Alt modifier for keyboard events. In
  2228. * the case that both Alt and Option are pressed, the Option key will be
  2229. * ignored. This is particularly useful for applications like terminal
  2230. * emulators and graphical user interfaces (GUIs) that rely on Alt key
  2231. * functionality for shortcuts or navigation. This does not apply to
  2232. * SDL_GetKeyFromScancode and only has an effect if IME is enabled.
  2233. *
  2234. * This hint can be set anytime.
  2235. *
  2236. * \since This hint is available since SDL 3.2.0.
  2237. */
  2238. #define SDL_HINT_MAC_OPTION_AS_ALT "SDL_MAC_OPTION_AS_ALT"
  2239. /**
  2240. * A variable controlling whether SDL_EVENT_MOUSE_WHEEL event values will have
  2241. * momentum on macOS.
  2242. *
  2243. * The variable can be set to the following values:
  2244. *
  2245. * - "0": The mouse wheel events will have no momentum. (default)
  2246. * - "1": The mouse wheel events will have momentum.
  2247. *
  2248. * This hint needs to be set before SDL_Init().
  2249. *
  2250. * \since This hint is available since SDL 3.2.0.
  2251. */
  2252. #define SDL_HINT_MAC_SCROLL_MOMENTUM "SDL_MAC_SCROLL_MOMENTUM"
  2253. /**
  2254. * Request SDL_AppIterate() be called at a specific rate.
  2255. *
  2256. * If this is set to a number, it represents Hz, so "60" means try to iterate
  2257. * 60 times per second. "0" means to iterate as fast as possible. Negative
  2258. * values are illegal, but reserved, in case they are useful in a future
  2259. * revision of SDL.
  2260. *
  2261. * There are other strings that have special meaning. If set to "waitevent",
  2262. * SDL_AppIterate will not be called until new event(s) have arrived (and been
  2263. * processed by SDL_AppEvent). This can be useful for apps that are completely
  2264. * idle except in response to input.
  2265. *
  2266. * On some platforms, or if you are using SDL_main instead of SDL_AppIterate,
  2267. * this hint is ignored. When the hint can be used, it is allowed to be
  2268. * changed at any time.
  2269. *
  2270. * This defaults to 0, and specifying NULL for the hint's value will restore
  2271. * the default.
  2272. *
  2273. * This hint can be set anytime.
  2274. *
  2275. * \since This hint is available since SDL 3.2.0.
  2276. */
  2277. #define SDL_HINT_MAIN_CALLBACK_RATE "SDL_MAIN_CALLBACK_RATE"
  2278. /**
  2279. * A variable controlling whether the mouse is captured while mouse buttons
  2280. * are pressed.
  2281. *
  2282. * The variable can be set to the following values:
  2283. *
  2284. * - "0": The mouse is not captured while mouse buttons are pressed.
  2285. * - "1": The mouse is captured while mouse buttons are pressed.
  2286. *
  2287. * By default the mouse is captured while mouse buttons are pressed so if the
  2288. * mouse is dragged outside the window, the application continues to receive
  2289. * mouse events until the button is released.
  2290. *
  2291. * This hint can be set anytime.
  2292. *
  2293. * \since This hint is available since SDL 3.2.0.
  2294. */
  2295. #define SDL_HINT_MOUSE_AUTO_CAPTURE "SDL_MOUSE_AUTO_CAPTURE"
  2296. /**
  2297. * A variable setting the double click radius, in pixels.
  2298. *
  2299. * This hint can be set anytime.
  2300. *
  2301. * \since This hint is available since SDL 3.2.0.
  2302. */
  2303. #define SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS "SDL_MOUSE_DOUBLE_CLICK_RADIUS"
  2304. /**
  2305. * A variable setting the double click time, in milliseconds.
  2306. *
  2307. * This hint can be set anytime.
  2308. *
  2309. * \since This hint is available since SDL 3.2.0.
  2310. */
  2311. #define SDL_HINT_MOUSE_DOUBLE_CLICK_TIME "SDL_MOUSE_DOUBLE_CLICK_TIME"
  2312. /**
  2313. * A variable setting which system cursor to use as the default cursor.
  2314. *
  2315. * This should be an integer corresponding to the SDL_SystemCursor enum. The
  2316. * default value is zero (SDL_SYSTEM_CURSOR_DEFAULT).
  2317. *
  2318. * This hint needs to be set before SDL_Init().
  2319. *
  2320. * \since This hint is available since SDL 3.2.0.
  2321. */
  2322. #define SDL_HINT_MOUSE_DEFAULT_SYSTEM_CURSOR "SDL_MOUSE_DEFAULT_SYSTEM_CURSOR"
  2323. /**
  2324. * A variable controlling whether warping a hidden mouse cursor will activate
  2325. * relative mouse mode.
  2326. *
  2327. * When this hint is set, the mouse cursor is hidden, and multiple warps to
  2328. * the window center occur within a short time period, SDL will emulate mouse
  2329. * warps using relative mouse mode. This can provide smoother and more
  2330. * reliable mouse motion for some older games, which continuously calculate
  2331. * the distance travelled by the mouse pointer and warp it back to the center
  2332. * of the window, rather than using relative mouse motion.
  2333. *
  2334. * Note that relative mouse mode may have different mouse acceleration
  2335. * behavior than pointer warps.
  2336. *
  2337. * If your application needs to repeatedly warp the hidden mouse cursor at a
  2338. * high-frequency for other purposes, it should disable this hint.
  2339. *
  2340. * The variable can be set to the following values:
  2341. *
  2342. * - "0": Attempts to warp the mouse will always be made.
  2343. * - "1": Some mouse warps will be emulated by forcing relative mouse mode.
  2344. * (default)
  2345. *
  2346. * If not set, this is automatically enabled unless an application uses
  2347. * relative mouse mode directly.
  2348. *
  2349. * This hint can be set anytime.
  2350. *
  2351. * \since This hint is available since SDL 3.2.0.
  2352. */
  2353. #define SDL_HINT_MOUSE_EMULATE_WARP_WITH_RELATIVE "SDL_MOUSE_EMULATE_WARP_WITH_RELATIVE"
  2354. /**
  2355. * Allow mouse click events when clicking to focus an SDL window.
  2356. *
  2357. * The variable can be set to the following values:
  2358. *
  2359. * - "0": Ignore mouse clicks that activate a window. (default)
  2360. * - "1": Generate events for mouse clicks that activate a window.
  2361. *
  2362. * This hint can be set anytime.
  2363. *
  2364. * \since This hint is available since SDL 3.2.0.
  2365. */
  2366. #define SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH "SDL_MOUSE_FOCUS_CLICKTHROUGH"
  2367. /**
  2368. * A variable setting the speed scale for mouse motion, in floating point,
  2369. * when the mouse is not in relative mode.
  2370. *
  2371. * This hint can be set anytime.
  2372. *
  2373. * \since This hint is available since SDL 3.2.0.
  2374. */
  2375. #define SDL_HINT_MOUSE_NORMAL_SPEED_SCALE "SDL_MOUSE_NORMAL_SPEED_SCALE"
  2376. /**
  2377. * A variable controlling whether relative mouse mode constrains the mouse to
  2378. * the center of the window.
  2379. *
  2380. * Constraining to the center of the window works better for FPS games and
  2381. * when the application is running over RDP. Constraining to the whole window
  2382. * works better for 2D games and increases the chance that the mouse will be
  2383. * in the correct position when using high DPI mice.
  2384. *
  2385. * The variable can be set to the following values:
  2386. *
  2387. * - "0": Relative mouse mode constrains the mouse to the window.
  2388. * - "1": Relative mouse mode constrains the mouse to the center of the
  2389. * window. (default)
  2390. *
  2391. * This hint can be set anytime.
  2392. *
  2393. * \since This hint is available since SDL 3.2.0.
  2394. */
  2395. #define SDL_HINT_MOUSE_RELATIVE_MODE_CENTER "SDL_MOUSE_RELATIVE_MODE_CENTER"
  2396. /**
  2397. * A variable setting the scale for mouse motion, in floating point, when the
  2398. * mouse is in relative mode.
  2399. *
  2400. * This hint can be set anytime.
  2401. *
  2402. * \since This hint is available since SDL 3.2.0.
  2403. */
  2404. #define SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE "SDL_MOUSE_RELATIVE_SPEED_SCALE"
  2405. /**
  2406. * A variable controlling whether the system mouse acceleration curve is used
  2407. * for relative mouse motion.
  2408. *
  2409. * The variable can be set to the following values:
  2410. *
  2411. * - "0": Relative mouse motion will be unscaled. (default)
  2412. * - "1": Relative mouse motion will be scaled using the system mouse
  2413. * acceleration curve.
  2414. *
  2415. * If SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE is set, that will be applied after
  2416. * system speed scale.
  2417. *
  2418. * This hint can be set anytime.
  2419. *
  2420. * \since This hint is available since SDL 3.2.0.
  2421. */
  2422. #define SDL_HINT_MOUSE_RELATIVE_SYSTEM_SCALE "SDL_MOUSE_RELATIVE_SYSTEM_SCALE"
  2423. /**
  2424. * A variable controlling whether a motion event should be generated for mouse
  2425. * warping in relative mode.
  2426. *
  2427. * The variable can be set to the following values:
  2428. *
  2429. * - "0": Warping the mouse will not generate a motion event in relative mode
  2430. * - "1": Warping the mouse will generate a motion event in relative mode
  2431. *
  2432. * By default warping the mouse will not generate motion events in relative
  2433. * mode. This avoids the application having to filter out large relative
  2434. * motion due to warping.
  2435. *
  2436. * This hint can be set anytime.
  2437. *
  2438. * \since This hint is available since SDL 3.2.0.
  2439. */
  2440. #define SDL_HINT_MOUSE_RELATIVE_WARP_MOTION "SDL_MOUSE_RELATIVE_WARP_MOTION"
  2441. /**
  2442. * A variable controlling whether the hardware cursor stays visible when
  2443. * relative mode is active.
  2444. *
  2445. * This variable can be set to the following values:
  2446. *
  2447. * - "0": The cursor will be hidden while relative mode is active (default)
  2448. * - "1": The cursor will remain visible while relative mode is active
  2449. *
  2450. * Note that for systems without raw hardware inputs, relative mode is
  2451. * implemented using warping, so the hardware cursor will visibly warp between
  2452. * frames if this is enabled on those systems.
  2453. *
  2454. * This hint can be set anytime.
  2455. *
  2456. * \since This hint is available since SDL 3.2.0.
  2457. */
  2458. #define SDL_HINT_MOUSE_RELATIVE_CURSOR_VISIBLE "SDL_MOUSE_RELATIVE_CURSOR_VISIBLE"
  2459. /**
  2460. * A variable controlling whether mouse events should generate synthetic touch
  2461. * events.
  2462. *
  2463. * The variable can be set to the following values:
  2464. *
  2465. * - "0": Mouse events will not generate touch events. (default for desktop
  2466. * platforms)
  2467. * - "1": Mouse events will generate touch events. (default for mobile
  2468. * platforms, such as Android and iOS)
  2469. *
  2470. * This hint can be set anytime.
  2471. *
  2472. * \since This hint is available since SDL 3.2.0.
  2473. */
  2474. #define SDL_HINT_MOUSE_TOUCH_EVENTS "SDL_MOUSE_TOUCH_EVENTS"
  2475. /**
  2476. * A variable controlling whether the keyboard should be muted on the console.
  2477. *
  2478. * Normally the keyboard is muted while SDL applications are running so that
  2479. * keyboard input doesn't show up as key strokes on the console. This hint
  2480. * allows you to turn that off for debugging purposes.
  2481. *
  2482. * The variable can be set to the following values:
  2483. *
  2484. * - "0": Allow keystrokes to go through to the console.
  2485. * - "1": Mute keyboard input so it doesn't show up on the console. (default)
  2486. *
  2487. * This hint should be set before SDL is initialized.
  2488. *
  2489. * \since This hint is available since SDL 3.2.0.
  2490. */
  2491. #define SDL_HINT_MUTE_CONSOLE_KEYBOARD "SDL_MUTE_CONSOLE_KEYBOARD"
  2492. /**
  2493. * Tell SDL not to catch the SIGINT or SIGTERM signals on POSIX platforms.
  2494. *
  2495. * The variable can be set to the following values:
  2496. *
  2497. * - "0": SDL will install a SIGINT and SIGTERM handler, and when it catches a
  2498. * signal, convert it into an SDL_EVENT_QUIT event. (default)
  2499. * - "1": SDL will not install a signal handler at all.
  2500. *
  2501. * This hint should be set before SDL is initialized.
  2502. *
  2503. * \since This hint is available since SDL 3.2.0.
  2504. */
  2505. #define SDL_HINT_NO_SIGNAL_HANDLERS "SDL_NO_SIGNAL_HANDLERS"
  2506. /**
  2507. * Specify the OpenGL library to load.
  2508. *
  2509. * This hint should be set before creating an OpenGL window or creating an
  2510. * OpenGL context. If this hint isn't set, SDL will choose a reasonable
  2511. * default.
  2512. *
  2513. * \since This hint is available since SDL 3.2.0.
  2514. */
  2515. #define SDL_HINT_OPENGL_LIBRARY "SDL_OPENGL_LIBRARY"
  2516. /**
  2517. * Specify the EGL library to load.
  2518. *
  2519. * This hint should be set before creating an OpenGL window or creating an
  2520. * OpenGL context. This hint is only considered if SDL is using EGL to manage
  2521. * OpenGL contexts. If this hint isn't set, SDL will choose a reasonable
  2522. * default.
  2523. *
  2524. * \since This hint is available since SDL 3.2.0.
  2525. */
  2526. #define SDL_HINT_EGL_LIBRARY "SDL_EGL_LIBRARY"
  2527. /**
  2528. * A variable controlling what driver to use for OpenGL ES contexts.
  2529. *
  2530. * On some platforms, currently Windows and X11, OpenGL drivers may support
  2531. * creating contexts with an OpenGL ES profile. By default SDL uses these
  2532. * profiles, when available, otherwise it attempts to load an OpenGL ES
  2533. * library, e.g. that provided by the ANGLE project. This variable controls
  2534. * whether SDL follows this default behaviour or will always load an OpenGL ES
  2535. * library.
  2536. *
  2537. * Circumstances where this is useful include - Testing an app with a
  2538. * particular OpenGL ES implementation, e.g ANGLE, or emulator, e.g. those
  2539. * from ARM, Imagination or Qualcomm. - Resolving OpenGL ES function addresses
  2540. * at link time by linking with the OpenGL ES library instead of querying them
  2541. * at run time with SDL_GL_GetProcAddress().
  2542. *
  2543. * Caution: for an application to work with the default behaviour across
  2544. * different OpenGL drivers it must query the OpenGL ES function addresses at
  2545. * run time using SDL_GL_GetProcAddress().
  2546. *
  2547. * This variable is ignored on most platforms because OpenGL ES is native or
  2548. * not supported.
  2549. *
  2550. * The variable can be set to the following values:
  2551. *
  2552. * - "0": Use ES profile of OpenGL, if available. (default)
  2553. * - "1": Load OpenGL ES library using the default library names.
  2554. *
  2555. * This hint should be set before SDL is initialized.
  2556. *
  2557. * \since This hint is available since SDL 3.2.0.
  2558. */
  2559. #define SDL_HINT_OPENGL_ES_DRIVER "SDL_OPENGL_ES_DRIVER"
  2560. /**
  2561. * Mechanism to specify openvr_api library location
  2562. *
  2563. * By default, when using the OpenVR driver, it will search for the API
  2564. * library in the current folder. But, if you wish to use a system API you can
  2565. * specify that by using this hint. This should be the full or relative path
  2566. * to a .dll on Windows or .so on Linux.
  2567. *
  2568. * \since This hint is available since SDL 3.2.0.
  2569. */
  2570. #define SDL_HINT_OPENVR_LIBRARY "SDL_OPENVR_LIBRARY"
  2571. /**
  2572. * A variable controlling which orientations are allowed on iOS/Android.
  2573. *
  2574. * In some circumstances it is necessary to be able to explicitly control
  2575. * which UI orientations are allowed.
  2576. *
  2577. * This variable is a space delimited list of the following values:
  2578. *
  2579. * - "LandscapeLeft"
  2580. * - "LandscapeRight"
  2581. * - "Portrait"
  2582. * - "PortraitUpsideDown"
  2583. *
  2584. * This hint should be set before SDL is initialized.
  2585. *
  2586. * \since This hint is available since SDL 3.2.0.
  2587. */
  2588. #define SDL_HINT_ORIENTATIONS "SDL_ORIENTATIONS"
  2589. /**
  2590. * A variable controlling the use of a sentinel event when polling the event
  2591. * queue.
  2592. *
  2593. * When polling for events, SDL_PumpEvents is used to gather new events from
  2594. * devices. If a device keeps producing new events between calls to
  2595. * SDL_PumpEvents, a poll loop will become stuck until the new events stop.
  2596. * This is most noticeable when moving a high frequency mouse.
  2597. *
  2598. * The variable can be set to the following values:
  2599. *
  2600. * - "0": Disable poll sentinels.
  2601. * - "1": Enable poll sentinels. (default)
  2602. *
  2603. * This hint can be set anytime.
  2604. *
  2605. * \since This hint is available since SDL 3.2.0.
  2606. */
  2607. #define SDL_HINT_POLL_SENTINEL "SDL_POLL_SENTINEL"
  2608. /**
  2609. * Override for SDL_GetPreferredLocales().
  2610. *
  2611. * If set, this will be favored over anything the OS might report for the
  2612. * user's preferred locales. Changing this hint at runtime will not generate a
  2613. * SDL_EVENT_LOCALE_CHANGED event (but if you can change the hint, you can
  2614. * push your own event, if you want).
  2615. *
  2616. * The format of this hint is a comma-separated list of language and locale,
  2617. * combined with an underscore, as is a common format: "en_GB". Locale is
  2618. * optional: "en". So you might have a list like this: "en_GB,jp,es_PT"
  2619. *
  2620. * This hint can be set anytime.
  2621. *
  2622. * \since This hint is available since SDL 3.2.0.
  2623. */
  2624. #define SDL_HINT_PREFERRED_LOCALES "SDL_PREFERRED_LOCALES"
  2625. /**
  2626. * A variable that decides whether to send SDL_EVENT_QUIT when closing the
  2627. * last window.
  2628. *
  2629. * The variable can be set to the following values:
  2630. *
  2631. * - "0": SDL will not send an SDL_EVENT_QUIT event when the last window is
  2632. * requesting to close. Note that in this case, there are still other
  2633. * legitimate reasons one might get an SDL_EVENT_QUIT event: choosing "Quit"
  2634. * from the macOS menu bar, sending a SIGINT (ctrl-c) on Unix, etc.
  2635. * - "1": SDL will send a quit event when the last window is requesting to
  2636. * close. (default)
  2637. *
  2638. * If there is at least one active system tray icon, SDL_EVENT_QUIT will
  2639. * instead be sent when both the last window will be closed and the last tray
  2640. * icon will be destroyed.
  2641. *
  2642. * This hint can be set anytime.
  2643. *
  2644. * \since This hint is available since SDL 3.2.0.
  2645. */
  2646. #define SDL_HINT_QUIT_ON_LAST_WINDOW_CLOSE "SDL_QUIT_ON_LAST_WINDOW_CLOSE"
  2647. /**
  2648. * A variable controlling whether the Direct3D device is initialized for
  2649. * thread-safe operations.
  2650. *
  2651. * The variable can be set to the following values:
  2652. *
  2653. * - "0": Thread-safety is not enabled. (default)
  2654. * - "1": Thread-safety is enabled.
  2655. *
  2656. * This hint should be set before creating a renderer.
  2657. *
  2658. * \since This hint is available since SDL 3.2.0.
  2659. */
  2660. #define SDL_HINT_RENDER_DIRECT3D_THREADSAFE "SDL_RENDER_DIRECT3D_THREADSAFE"
  2661. /**
  2662. * A variable controlling whether to enable Direct3D 11+'s Debug Layer.
  2663. *
  2664. * This variable does not have any effect on the Direct3D 9 based renderer.
  2665. *
  2666. * The variable can be set to the following values:
  2667. *
  2668. * - "0": Disable Debug Layer use. (default)
  2669. * - "1": Enable Debug Layer use.
  2670. *
  2671. * This hint should be set before creating a renderer.
  2672. *
  2673. * \since This hint is available since SDL 3.2.0.
  2674. */
  2675. #define SDL_HINT_RENDER_DIRECT3D11_DEBUG "SDL_RENDER_DIRECT3D11_DEBUG"
  2676. /**
  2677. * A variable controlling whether to enable Vulkan Validation Layers.
  2678. *
  2679. * This variable can be set to the following values:
  2680. *
  2681. * - "0": Disable Validation Layer use
  2682. * - "1": Enable Validation Layer use
  2683. *
  2684. * By default, SDL does not use Vulkan Validation Layers.
  2685. *
  2686. * \since This hint is available since SDL 3.2.0.
  2687. */
  2688. #define SDL_HINT_RENDER_VULKAN_DEBUG "SDL_RENDER_VULKAN_DEBUG"
  2689. /**
  2690. * A variable controlling whether to create the GPU device in debug mode.
  2691. *
  2692. * This variable can be set to the following values:
  2693. *
  2694. * - "0": Disable debug mode use (default)
  2695. * - "1": Enable debug mode use
  2696. *
  2697. * This hint should be set before creating a renderer.
  2698. *
  2699. * \since This hint is available since SDL 3.2.0.
  2700. */
  2701. #define SDL_HINT_RENDER_GPU_DEBUG "SDL_RENDER_GPU_DEBUG"
  2702. /**
  2703. * A variable controlling whether to prefer a low-power GPU on multi-GPU
  2704. * systems.
  2705. *
  2706. * This variable can be set to the following values:
  2707. *
  2708. * - "0": Prefer high-performance GPU (default)
  2709. * - "1": Prefer low-power GPU
  2710. *
  2711. * This hint should be set before creating a renderer.
  2712. *
  2713. * \since This hint is available since SDL 3.2.0.
  2714. */
  2715. #define SDL_HINT_RENDER_GPU_LOW_POWER "SDL_RENDER_GPU_LOW_POWER"
  2716. /**
  2717. * A variable specifying which render driver to use.
  2718. *
  2719. * If the application doesn't pick a specific renderer to use, this variable
  2720. * specifies the name of the preferred renderer. If the preferred renderer
  2721. * can't be initialized, creating a renderer will fail.
  2722. *
  2723. * This variable is case insensitive and can be set to the following values:
  2724. *
  2725. * - "direct3d"
  2726. * - "direct3d11"
  2727. * - "direct3d12"
  2728. * - "opengl"
  2729. * - "opengles2"
  2730. * - "opengles"
  2731. * - "metal"
  2732. * - "vulkan"
  2733. * - "gpu"
  2734. * - "software"
  2735. *
  2736. * This hint accepts a comma-separated list of driver names, and each will be
  2737. * tried in the order listed when creating a renderer until one succeeds or
  2738. * all of them fail.
  2739. *
  2740. * The default varies by platform, but it's the first one in the list that is
  2741. * available on the current platform.
  2742. *
  2743. * This hint should be set before creating a renderer.
  2744. *
  2745. * \since This hint is available since SDL 3.2.0.
  2746. */
  2747. #define SDL_HINT_RENDER_DRIVER "SDL_RENDER_DRIVER"
  2748. /**
  2749. * A variable controlling how the 2D render API renders lines.
  2750. *
  2751. * The variable can be set to the following values:
  2752. *
  2753. * - "0": Use the default line drawing method (Bresenham's line algorithm)
  2754. * - "1": Use the driver point API using Bresenham's line algorithm (correct,
  2755. * draws many points)
  2756. * - "2": Use the driver line API (occasionally misses line endpoints based on
  2757. * hardware driver quirks
  2758. * - "3": Use the driver geometry API (correct, draws thicker diagonal lines)
  2759. *
  2760. * This hint should be set before creating a renderer.
  2761. *
  2762. * \since This hint is available since SDL 3.2.0.
  2763. */
  2764. #define SDL_HINT_RENDER_LINE_METHOD "SDL_RENDER_LINE_METHOD"
  2765. /**
  2766. * A variable controlling whether the Metal render driver select low power
  2767. * device over default one.
  2768. *
  2769. * The variable can be set to the following values:
  2770. *
  2771. * - "0": Use the preferred OS device. (default)
  2772. * - "1": Select a low power device.
  2773. *
  2774. * This hint should be set before creating a renderer.
  2775. *
  2776. * \since This hint is available since SDL 3.2.0.
  2777. */
  2778. #define SDL_HINT_RENDER_METAL_PREFER_LOW_POWER_DEVICE "SDL_RENDER_METAL_PREFER_LOW_POWER_DEVICE"
  2779. /**
  2780. * A variable controlling whether updates to the SDL screen surface should be
  2781. * synchronized with the vertical refresh, to avoid tearing.
  2782. *
  2783. * This hint overrides the application preference when creating a renderer.
  2784. *
  2785. * The variable can be set to the following values:
  2786. *
  2787. * - "0": Disable vsync. (default)
  2788. * - "1": Enable vsync.
  2789. *
  2790. * This hint should be set before creating a renderer.
  2791. *
  2792. * \since This hint is available since SDL 3.2.0.
  2793. */
  2794. #define SDL_HINT_RENDER_VSYNC "SDL_RENDER_VSYNC"
  2795. /**
  2796. * A variable to control whether the return key on the soft keyboard should
  2797. * hide the soft keyboard on Android and iOS.
  2798. *
  2799. * This hint sets the default value of SDL_PROP_TEXTINPUT_MULTILINE_BOOLEAN.
  2800. *
  2801. * The variable can be set to the following values:
  2802. *
  2803. * - "0": The return key will be handled as a key event. (default)
  2804. * - "1": The return key will hide the keyboard.
  2805. *
  2806. * This hint can be set anytime.
  2807. *
  2808. * \since This hint is available since SDL 3.2.0.
  2809. */
  2810. #define SDL_HINT_RETURN_KEY_HIDES_IME "SDL_RETURN_KEY_HIDES_IME"
  2811. /**
  2812. * A variable containing a list of ROG gamepad capable mice.
  2813. *
  2814. * The format of the string is a comma separated list of USB VID/PID pairs in
  2815. * hexadecimal form, e.g.
  2816. *
  2817. * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
  2818. *
  2819. * The variable can also take the form of "@file", in which case the named
  2820. * file will be loaded and interpreted as the value of the variable.
  2821. *
  2822. * This hint should be set before SDL is initialized.
  2823. *
  2824. * \since This hint is available since SDL 3.2.0.
  2825. *
  2826. * \sa SDL_HINT_ROG_GAMEPAD_MICE_EXCLUDED
  2827. */
  2828. #define SDL_HINT_ROG_GAMEPAD_MICE "SDL_ROG_GAMEPAD_MICE"
  2829. /**
  2830. * A variable containing a list of devices that are not ROG gamepad capable
  2831. * mice.
  2832. *
  2833. * This will override SDL_HINT_ROG_GAMEPAD_MICE and the built in device list.
  2834. *
  2835. * The format of the string is a comma separated list of USB VID/PID pairs in
  2836. * hexadecimal form, e.g.
  2837. *
  2838. * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
  2839. *
  2840. * The variable can also take the form of "@file", in which case the named
  2841. * file will be loaded and interpreted as the value of the variable.
  2842. *
  2843. * This hint should be set before SDL is initialized.
  2844. *
  2845. * \since This hint is available since SDL 3.2.0.
  2846. */
  2847. #define SDL_HINT_ROG_GAMEPAD_MICE_EXCLUDED "SDL_ROG_GAMEPAD_MICE_EXCLUDED"
  2848. /**
  2849. * A variable controlling which Dispmanx layer to use on a Raspberry PI.
  2850. *
  2851. * Also known as Z-order. The variable can take a negative or positive value.
  2852. * The default is 10000.
  2853. *
  2854. * This hint should be set before SDL is initialized.
  2855. *
  2856. * \since This hint is available since SDL 3.2.0.
  2857. */
  2858. #define SDL_HINT_RPI_VIDEO_LAYER "SDL_RPI_VIDEO_LAYER"
  2859. /**
  2860. * Specify an "activity name" for screensaver inhibition.
  2861. *
  2862. * Some platforms, notably Linux desktops, list the applications which are
  2863. * inhibiting the screensaver or other power-saving features.
  2864. *
  2865. * This hint lets you specify the "activity name" sent to the OS when
  2866. * SDL_DisableScreenSaver() is used (or the screensaver is automatically
  2867. * disabled). The contents of this hint are used when the screensaver is
  2868. * disabled. You should use a string that describes what your program is doing
  2869. * (and, therefore, why the screensaver is disabled). For example, "Playing a
  2870. * game" or "Watching a video".
  2871. *
  2872. * Setting this to "" or leaving it unset will have SDL use a reasonable
  2873. * default: "Playing a game" or something similar.
  2874. *
  2875. * This hint should be set before calling SDL_DisableScreenSaver()
  2876. *
  2877. * \since This hint is available since SDL 3.2.0.
  2878. */
  2879. #define SDL_HINT_SCREENSAVER_INHIBIT_ACTIVITY_NAME "SDL_SCREENSAVER_INHIBIT_ACTIVITY_NAME"
  2880. /**
  2881. * A variable controlling whether SDL calls dbus_shutdown() on quit.
  2882. *
  2883. * This is useful as a debug tool to validate memory leaks, but shouldn't ever
  2884. * be set in production applications, as other libraries used by the
  2885. * application might use dbus under the hood and this can cause crashes if
  2886. * they continue after SDL_Quit().
  2887. *
  2888. * The variable can be set to the following values:
  2889. *
  2890. * - "0": SDL will not call dbus_shutdown() on quit. (default)
  2891. * - "1": SDL will call dbus_shutdown() on quit.
  2892. *
  2893. * This hint can be set anytime.
  2894. *
  2895. * \since This hint is available since SDL 3.2.0.
  2896. */
  2897. #define SDL_HINT_SHUTDOWN_DBUS_ON_QUIT "SDL_SHUTDOWN_DBUS_ON_QUIT"
  2898. /**
  2899. * A variable that specifies a backend to use for title storage.
  2900. *
  2901. * By default, SDL will try all available storage backends in a reasonable
  2902. * order until it finds one that can work, but this hint allows the app or
  2903. * user to force a specific target, such as "pc" if, say, you are on Steam but
  2904. * want to avoid SteamRemoteStorage for title data.
  2905. *
  2906. * This hint should be set before SDL is initialized.
  2907. *
  2908. * \since This hint is available since SDL 3.2.0.
  2909. */
  2910. #define SDL_HINT_STORAGE_TITLE_DRIVER "SDL_STORAGE_TITLE_DRIVER"
  2911. /**
  2912. * A variable that specifies a backend to use for user storage.
  2913. *
  2914. * By default, SDL will try all available storage backends in a reasonable
  2915. * order until it finds one that can work, but this hint allows the app or
  2916. * user to force a specific target, such as "pc" if, say, you are on Steam but
  2917. * want to avoid SteamRemoteStorage for user data.
  2918. *
  2919. * This hint should be set before SDL is initialized.
  2920. *
  2921. * \since This hint is available since SDL 3.2.0.
  2922. */
  2923. #define SDL_HINT_STORAGE_USER_DRIVER "SDL_STORAGE_USER_DRIVER"
  2924. /**
  2925. * Specifies whether SDL_THREAD_PRIORITY_TIME_CRITICAL should be treated as
  2926. * realtime.
  2927. *
  2928. * On some platforms, like Linux, a realtime priority thread may be subject to
  2929. * restrictions that require special handling by the application. This hint
  2930. * exists to let SDL know that the app is prepared to handle said
  2931. * restrictions.
  2932. *
  2933. * On Linux, SDL will apply the following configuration to any thread that
  2934. * becomes realtime:
  2935. *
  2936. * - The SCHED_RESET_ON_FORK bit will be set on the scheduling policy,
  2937. * - An RLIMIT_RTTIME budget will be configured to the rtkit specified limit.
  2938. * - Exceeding this limit will result in the kernel sending SIGKILL to the
  2939. * app, refer to the man pages for more information.
  2940. *
  2941. * The variable can be set to the following values:
  2942. *
  2943. * - "0": default platform specific behaviour
  2944. * - "1": Force SDL_THREAD_PRIORITY_TIME_CRITICAL to a realtime scheduling
  2945. * policy
  2946. *
  2947. * This hint should be set before calling SDL_SetCurrentThreadPriority()
  2948. *
  2949. * \since This hint is available since SDL 3.2.0.
  2950. */
  2951. #define SDL_HINT_THREAD_FORCE_REALTIME_TIME_CRITICAL "SDL_THREAD_FORCE_REALTIME_TIME_CRITICAL"
  2952. /**
  2953. * A string specifying additional information to use with
  2954. * SDL_SetCurrentThreadPriority.
  2955. *
  2956. * By default SDL_SetCurrentThreadPriority will make appropriate system
  2957. * changes in order to apply a thread priority. For example on systems using
  2958. * pthreads the scheduler policy is changed automatically to a policy that
  2959. * works well with a given priority. Code which has specific requirements can
  2960. * override SDL's default behavior with this hint.
  2961. *
  2962. * pthread hint values are "current", "other", "fifo" and "rr". Currently no
  2963. * other platform hint values are defined but may be in the future.
  2964. *
  2965. * On Linux, the kernel may send SIGKILL to realtime tasks which exceed the
  2966. * distro configured execution budget for rtkit. This budget can be queried
  2967. * through RLIMIT_RTTIME after calling SDL_SetCurrentThreadPriority().
  2968. *
  2969. * This hint should be set before calling SDL_SetCurrentThreadPriority()
  2970. *
  2971. * \since This hint is available since SDL 3.2.0.
  2972. */
  2973. #define SDL_HINT_THREAD_PRIORITY_POLICY "SDL_THREAD_PRIORITY_POLICY"
  2974. /**
  2975. * A variable that controls the timer resolution, in milliseconds.
  2976. *
  2977. * The higher resolution the timer, the more frequently the CPU services timer
  2978. * interrupts, and the more precise delays are, but this takes up power and
  2979. * CPU time. This hint is only used on Windows.
  2980. *
  2981. * See this blog post for more information:
  2982. * http://randomascii.wordpress.com/2013/07/08/windows-timer-resolution-megawatts-wasted/
  2983. *
  2984. * The default value is "1".
  2985. *
  2986. * If this variable is set to "0", the system timer resolution is not set.
  2987. *
  2988. * This hint can be set anytime.
  2989. *
  2990. * \since This hint is available since SDL 3.2.0.
  2991. */
  2992. #define SDL_HINT_TIMER_RESOLUTION "SDL_TIMER_RESOLUTION"
  2993. /**
  2994. * A variable controlling whether touch events should generate synthetic mouse
  2995. * events.
  2996. *
  2997. * The variable can be set to the following values:
  2998. *
  2999. * - "0": Touch events will not generate mouse events.
  3000. * - "1": Touch events will generate mouse events. (default)
  3001. *
  3002. * This hint can be set anytime.
  3003. *
  3004. * \since This hint is available since SDL 3.2.0.
  3005. */
  3006. #define SDL_HINT_TOUCH_MOUSE_EVENTS "SDL_TOUCH_MOUSE_EVENTS"
  3007. /**
  3008. * A variable controlling whether trackpads should be treated as touch
  3009. * devices.
  3010. *
  3011. * On macOS (and possibly other platforms in the future), SDL will report
  3012. * touches on a trackpad as mouse input, which is generally what users expect
  3013. * from this device; however, these are often actually full multitouch-capable
  3014. * touch devices, so it might be preferable to some apps to treat them as
  3015. * such.
  3016. *
  3017. * The variable can be set to the following values:
  3018. *
  3019. * - "0": Trackpad will send mouse events. (default)
  3020. * - "1": Trackpad will send touch events.
  3021. *
  3022. * This hint should be set before SDL is initialized.
  3023. *
  3024. * \since This hint is available since SDL 3.2.0.
  3025. */
  3026. #define SDL_HINT_TRACKPAD_IS_TOUCH_ONLY "SDL_TRACKPAD_IS_TOUCH_ONLY"
  3027. /**
  3028. * A variable controlling whether the Android / tvOS remotes should be listed
  3029. * as joystick devices, instead of sending keyboard events.
  3030. *
  3031. * The variable can be set to the following values:
  3032. *
  3033. * - "0": Remotes send enter/escape/arrow key events.
  3034. * - "1": Remotes are available as 2 axis, 2 button joysticks. (default)
  3035. *
  3036. * This hint should be set before SDL is initialized.
  3037. *
  3038. * \since This hint is available since SDL 3.2.0.
  3039. */
  3040. #define SDL_HINT_TV_REMOTE_AS_JOYSTICK "SDL_TV_REMOTE_AS_JOYSTICK"
  3041. /**
  3042. * A variable controlling whether the screensaver is enabled.
  3043. *
  3044. * The variable can be set to the following values:
  3045. *
  3046. * - "0": Disable screensaver. (default)
  3047. * - "1": Enable screensaver.
  3048. *
  3049. * This hint should be set before SDL is initialized.
  3050. *
  3051. * \since This hint is available since SDL 3.2.0.
  3052. */
  3053. #define SDL_HINT_VIDEO_ALLOW_SCREENSAVER "SDL_VIDEO_ALLOW_SCREENSAVER"
  3054. /**
  3055. * A comma separated list containing the names of the displays that SDL should
  3056. * sort to the front of the display list.
  3057. *
  3058. * When this hint is set, displays with matching name strings will be
  3059. * prioritized in the list of displays, as exposed by calling
  3060. * SDL_GetDisplays(), with the first listed becoming the primary display. The
  3061. * naming convention can vary depending on the environment, but it is usually
  3062. * a connector name (e.g. 'DP-1', 'DP-2', 'HDMI-A-1',etc...).
  3063. *
  3064. * On Wayland and X11 desktops, the connector names associated with displays
  3065. * can typically be found by using the `xrandr` utility.
  3066. *
  3067. * This hint is currently supported on the following drivers:
  3068. *
  3069. * - KMSDRM (kmsdrm)
  3070. * - Wayland (wayland)
  3071. * - X11 (x11)
  3072. *
  3073. * This hint should be set before SDL is initialized.
  3074. *
  3075. * \since This hint is available since SDL 3.2.0.
  3076. */
  3077. #define SDL_HINT_VIDEO_DISPLAY_PRIORITY "SDL_VIDEO_DISPLAY_PRIORITY"
  3078. /**
  3079. * Tell the video driver that we only want a double buffer.
  3080. *
  3081. * By default, most lowlevel 2D APIs will use a triple buffer scheme that
  3082. * wastes no CPU time on waiting for vsync after issuing a flip, but
  3083. * introduces a frame of latency. On the other hand, using a double buffer
  3084. * scheme instead is recommended for cases where low latency is an important
  3085. * factor because we save a whole frame of latency.
  3086. *
  3087. * We do so by waiting for vsync immediately after issuing a flip, usually
  3088. * just after eglSwapBuffers call in the backend's *_SwapWindow function.
  3089. *
  3090. * This hint is currently supported on the following drivers:
  3091. *
  3092. * - Raspberry Pi (raspberrypi)
  3093. * - Wayland (wayland)
  3094. *
  3095. * This hint should be set before SDL is initialized.
  3096. *
  3097. * \since This hint is available since SDL 3.2.0.
  3098. */
  3099. #define SDL_HINT_VIDEO_DOUBLE_BUFFER "SDL_VIDEO_DOUBLE_BUFFER"
  3100. /**
  3101. * A variable that specifies a video backend to use.
  3102. *
  3103. * By default, SDL will try all available video backends in a reasonable order
  3104. * until it finds one that can work, but this hint allows the app or user to
  3105. * force a specific target, such as "x11" if, say, you are on Wayland but want
  3106. * to try talking to the X server instead.
  3107. *
  3108. * This hint accepts a comma-separated list of driver names, and each will be
  3109. * tried in the order listed during init, until one succeeds or all of them
  3110. * fail.
  3111. *
  3112. * This hint should be set before SDL is initialized.
  3113. *
  3114. * \since This hint is available since SDL 3.2.0.
  3115. */
  3116. #define SDL_HINT_VIDEO_DRIVER "SDL_VIDEO_DRIVER"
  3117. /**
  3118. * A variable controlling whether the dummy video driver saves output frames.
  3119. *
  3120. * - "0": Video frames are not saved to disk. (default)
  3121. * - "1": Video frames are saved to files in the format "SDL_windowX-Y.bmp",
  3122. * where X is the window ID, and Y is the frame number.
  3123. *
  3124. * This hint can be set anytime.
  3125. *
  3126. * \since This hint is available since SDL 3.2.0.
  3127. */
  3128. #define SDL_HINT_VIDEO_DUMMY_SAVE_FRAMES "SDL_VIDEO_DUMMY_SAVE_FRAMES"
  3129. /**
  3130. * If eglGetPlatformDisplay fails, fall back to calling eglGetDisplay.
  3131. *
  3132. * The variable can be set to one of the following values:
  3133. *
  3134. * - "0": Do not fall back to eglGetDisplay.
  3135. * - "1": Fall back to eglGetDisplay if eglGetPlatformDisplay fails. (default)
  3136. *
  3137. * This hint should be set before SDL is initialized.
  3138. *
  3139. * \since This hint is available since SDL 3.2.0.
  3140. */
  3141. #define SDL_HINT_VIDEO_EGL_ALLOW_GETDISPLAY_FALLBACK "SDL_VIDEO_EGL_ALLOW_GETDISPLAY_FALLBACK"
  3142. /**
  3143. * A variable controlling whether the OpenGL context should be created with
  3144. * EGL.
  3145. *
  3146. * The variable can be set to the following values:
  3147. *
  3148. * - "0": Use platform-specific GL context creation API (GLX, WGL, CGL, etc).
  3149. * (default)
  3150. * - "1": Use EGL
  3151. *
  3152. * This hint should be set before SDL is initialized.
  3153. *
  3154. * \since This hint is available since SDL 3.2.0.
  3155. */
  3156. #define SDL_HINT_VIDEO_FORCE_EGL "SDL_VIDEO_FORCE_EGL"
  3157. /**
  3158. * A variable that specifies the policy for fullscreen Spaces on macOS.
  3159. *
  3160. * The variable can be set to the following values:
  3161. *
  3162. * - "0": Disable Spaces support (FULLSCREEN_DESKTOP won't use them and
  3163. * SDL_WINDOW_RESIZABLE windows won't offer the "fullscreen" button on their
  3164. * titlebars).
  3165. * - "1": Enable Spaces support (FULLSCREEN_DESKTOP will use them and
  3166. * SDL_WINDOW_RESIZABLE windows will offer the "fullscreen" button on their
  3167. * titlebars). (default)
  3168. *
  3169. * This hint should be set before creating a window.
  3170. *
  3171. * \since This hint is available since SDL 3.2.0.
  3172. */
  3173. #define SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES "SDL_VIDEO_MAC_FULLSCREEN_SPACES"
  3174. /**
  3175. * A variable that specifies the menu visibility when a window is fullscreen
  3176. * in Spaces on macOS.
  3177. *
  3178. * The variable can be set to the following values:
  3179. *
  3180. * - "0": The menu will be hidden when the window is in a fullscreen space,
  3181. * and not accessible by moving the mouse to the top of the screen.
  3182. * - "1": The menu will be accessible when the window is in a fullscreen
  3183. * space.
  3184. * - "auto": The menu will be hidden if fullscreen mode was toggled on
  3185. * programmatically via `SDL_SetWindowFullscreen()`, and accessible if
  3186. * fullscreen was entered via the "fullscreen" button on the window title
  3187. * bar. (default)
  3188. *
  3189. * This hint can be set anytime.
  3190. *
  3191. * \since This hint is available since SDL 3.2.0.
  3192. */
  3193. #define SDL_HINT_VIDEO_MAC_FULLSCREEN_MENU_VISIBILITY "SDL_VIDEO_MAC_FULLSCREEN_MENU_VISIBILITY"
  3194. /**
  3195. * A variable controlling whether fullscreen windows are minimized when they
  3196. * lose focus.
  3197. *
  3198. * The variable can be set to the following values:
  3199. *
  3200. * - "0": Fullscreen windows will not be minimized when they lose focus.
  3201. * (default)
  3202. * - "1": Fullscreen windows are minimized when they lose focus.
  3203. *
  3204. * This hint can be set anytime.
  3205. *
  3206. * \since This hint is available since SDL 3.2.0.
  3207. */
  3208. #define SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS"
  3209. /**
  3210. * A variable controlling whether the offscreen video driver saves output
  3211. * frames.
  3212. *
  3213. * This only saves frames that are generated using software rendering, not
  3214. * accelerated OpenGL rendering.
  3215. *
  3216. * - "0": Video frames are not saved to disk. (default)
  3217. * - "1": Video frames are saved to files in the format "SDL_windowX-Y.bmp",
  3218. * where X is the window ID, and Y is the frame number.
  3219. *
  3220. * This hint can be set anytime.
  3221. *
  3222. * \since This hint is available since SDL 3.2.0.
  3223. */
  3224. #define SDL_HINT_VIDEO_OFFSCREEN_SAVE_FRAMES "SDL_VIDEO_OFFSCREEN_SAVE_FRAMES"
  3225. /**
  3226. * A variable controlling whether all window operations will block until
  3227. * complete.
  3228. *
  3229. * Window systems that run asynchronously may not have the results of window
  3230. * operations that resize or move the window applied immediately upon the
  3231. * return of the requesting function. Setting this hint will cause such
  3232. * operations to block after every call until the pending operation has
  3233. * completed. Setting this to '1' is the equivalent of calling
  3234. * SDL_SyncWindow() after every function call.
  3235. *
  3236. * Be aware that amount of time spent blocking while waiting for window
  3237. * operations to complete can be quite lengthy, as animations may have to
  3238. * complete, which can take upwards of multiple seconds in some cases.
  3239. *
  3240. * The variable can be set to the following values:
  3241. *
  3242. * - "0": Window operations are non-blocking. (default)
  3243. * - "1": Window operations will block until completed.
  3244. *
  3245. * This hint can be set anytime.
  3246. *
  3247. * \since This hint is available since SDL 3.2.0.
  3248. */
  3249. #define SDL_HINT_VIDEO_SYNC_WINDOW_OPERATIONS "SDL_VIDEO_SYNC_WINDOW_OPERATIONS"
  3250. /**
  3251. * A variable controlling whether the libdecor Wayland backend is allowed to
  3252. * be used.
  3253. *
  3254. * libdecor is used over xdg-shell when xdg-decoration protocol is
  3255. * unavailable.
  3256. *
  3257. * The variable can be set to the following values:
  3258. *
  3259. * - "0": libdecor use is disabled.
  3260. * - "1": libdecor use is enabled. (default)
  3261. *
  3262. * This hint should be set before SDL is initialized.
  3263. *
  3264. * \since This hint is available since SDL 3.2.0.
  3265. */
  3266. #define SDL_HINT_VIDEO_WAYLAND_ALLOW_LIBDECOR "SDL_VIDEO_WAYLAND_ALLOW_LIBDECOR"
  3267. /**
  3268. * A variable controlling whether video mode emulation is enabled under
  3269. * Wayland.
  3270. *
  3271. * When this hint is set, a standard set of emulated CVT video modes will be
  3272. * exposed for use by the application. If it is disabled, the only modes
  3273. * exposed will be the logical desktop size and, in the case of a scaled
  3274. * desktop, the native display resolution.
  3275. *
  3276. * The variable can be set to the following values:
  3277. *
  3278. * - "0": Video mode emulation is disabled.
  3279. * - "1": Video mode emulation is enabled. (default)
  3280. *
  3281. * This hint should be set before SDL is initialized.
  3282. *
  3283. * \since This hint is available since SDL 3.2.0.
  3284. */
  3285. #define SDL_HINT_VIDEO_WAYLAND_MODE_EMULATION "SDL_VIDEO_WAYLAND_MODE_EMULATION"
  3286. /**
  3287. * A variable controlling how modes with a non-native aspect ratio are
  3288. * displayed under Wayland.
  3289. *
  3290. * When this hint is set, the requested scaling will be used when displaying
  3291. * fullscreen video modes that don't match the display's native aspect ratio.
  3292. * This is contingent on compositor viewport support.
  3293. *
  3294. * The variable can be set to the following values:
  3295. *
  3296. * - "aspect" - Video modes will be displayed scaled, in their proper aspect
  3297. * ratio, with black bars.
  3298. * - "stretch" - Video modes will be scaled to fill the entire display.
  3299. * (default)
  3300. * - "none" - Video modes will be displayed as 1:1 with no scaling.
  3301. *
  3302. * This hint should be set before creating a window.
  3303. *
  3304. * \since This hint is available since SDL 3.2.0.
  3305. */
  3306. #define SDL_HINT_VIDEO_WAYLAND_MODE_SCALING "SDL_VIDEO_WAYLAND_MODE_SCALING"
  3307. /**
  3308. * A variable controlling whether the libdecor Wayland backend is preferred
  3309. * over native decorations.
  3310. *
  3311. * When this hint is set, libdecor will be used to provide window decorations,
  3312. * even if xdg-decoration is available. (Note that, by default, libdecor will
  3313. * use xdg-decoration itself if available).
  3314. *
  3315. * The variable can be set to the following values:
  3316. *
  3317. * - "0": libdecor is enabled only if server-side decorations are unavailable.
  3318. * (default)
  3319. * - "1": libdecor is always enabled if available.
  3320. *
  3321. * This hint should be set before SDL is initialized.
  3322. *
  3323. * \since This hint is available since SDL 3.2.0.
  3324. */
  3325. #define SDL_HINT_VIDEO_WAYLAND_PREFER_LIBDECOR "SDL_VIDEO_WAYLAND_PREFER_LIBDECOR"
  3326. /**
  3327. * A variable forcing non-DPI-aware Wayland windows to output at 1:1 scaling.
  3328. *
  3329. * This must be set before initializing the video subsystem.
  3330. *
  3331. * When this hint is set, Wayland windows that are not flagged as being
  3332. * DPI-aware will be output with scaling designed to force 1:1 pixel mapping.
  3333. *
  3334. * This is intended to allow legacy applications to be displayed without
  3335. * desktop scaling being applied, and has issues with certain display
  3336. * configurations, as this forces the window to behave in a way that Wayland
  3337. * desktops were not designed to accommodate:
  3338. *
  3339. * - Rounding errors can result with odd window sizes and/or desktop scales,
  3340. * which can cause the window contents to appear slightly blurry.
  3341. * - Positioning the window may be imprecise due to unit conversions and
  3342. * rounding.
  3343. * - The window may be unusably small on scaled desktops.
  3344. * - The window may jump in size when moving between displays of different
  3345. * scale factors.
  3346. * - Displays may appear to overlap when using a multi-monitor setup with
  3347. * scaling enabled.
  3348. * - Possible loss of cursor precision due to the logical size of the window
  3349. * being reduced.
  3350. *
  3351. * New applications should be designed with proper DPI awareness handling
  3352. * instead of enabling this.
  3353. *
  3354. * The variable can be set to the following values:
  3355. *
  3356. * - "0": Windows will be scaled normally.
  3357. * - "1": Windows will be forced to scale to achieve 1:1 output.
  3358. *
  3359. * This hint should be set before creating a window.
  3360. *
  3361. * \since This hint is available since SDL 3.2.0.
  3362. */
  3363. #define SDL_HINT_VIDEO_WAYLAND_SCALE_TO_DISPLAY "SDL_VIDEO_WAYLAND_SCALE_TO_DISPLAY"
  3364. /**
  3365. * A variable specifying which shader compiler to preload when using the
  3366. * Chrome ANGLE binaries.
  3367. *
  3368. * SDL has EGL and OpenGL ES2 support on Windows via the ANGLE project. It can
  3369. * use two different sets of binaries, those compiled by the user from source
  3370. * or those provided by the Chrome browser. In the later case, these binaries
  3371. * require that SDL loads a DLL providing the shader compiler.
  3372. *
  3373. * The variable can be set to the following values:
  3374. *
  3375. * - "d3dcompiler_46.dll" - best for Vista or later. (default)
  3376. * - "d3dcompiler_43.dll" - for XP support.
  3377. * - "none" - do not load any library, useful if you compiled ANGLE from
  3378. * source and included the compiler in your binaries.
  3379. *
  3380. * This hint should be set before SDL is initialized.
  3381. *
  3382. * \since This hint is available since SDL 3.2.0.
  3383. */
  3384. #define SDL_HINT_VIDEO_WIN_D3DCOMPILER "SDL_VIDEO_WIN_D3DCOMPILER"
  3385. /**
  3386. * A variable controlling whether the X11 _NET_WM_BYPASS_COMPOSITOR hint
  3387. * should be used.
  3388. *
  3389. * The variable can be set to the following values:
  3390. *
  3391. * - "0": Disable _NET_WM_BYPASS_COMPOSITOR.
  3392. * - "1": Enable _NET_WM_BYPASS_COMPOSITOR. (default)
  3393. *
  3394. * This hint should be set before creating a window.
  3395. *
  3396. * \since This hint is available since SDL 3.2.0.
  3397. */
  3398. #define SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR "SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR"
  3399. /**
  3400. * A variable controlling whether the X11 _NET_WM_PING protocol should be
  3401. * supported.
  3402. *
  3403. * By default SDL will use _NET_WM_PING, but for applications that know they
  3404. * will not always be able to respond to ping requests in a timely manner they
  3405. * can turn it off to avoid the window manager thinking the app is hung.
  3406. *
  3407. * The variable can be set to the following values:
  3408. *
  3409. * - "0": Disable _NET_WM_PING.
  3410. * - "1": Enable _NET_WM_PING. (default)
  3411. *
  3412. * This hint should be set before creating a window.
  3413. *
  3414. * \since This hint is available since SDL 3.2.0.
  3415. */
  3416. #define SDL_HINT_VIDEO_X11_NET_WM_PING "SDL_VIDEO_X11_NET_WM_PING"
  3417. /**
  3418. * A variable controlling whether SDL uses DirectColor visuals.
  3419. *
  3420. * The variable can be set to the following values:
  3421. *
  3422. * - "0": Disable DirectColor visuals.
  3423. * - "1": Enable DirectColor visuals. (default)
  3424. *
  3425. * This hint should be set before initializing the video subsystem.
  3426. *
  3427. * \since This hint is available since SDL 3.2.0.
  3428. */
  3429. #define SDL_HINT_VIDEO_X11_NODIRECTCOLOR "SDL_VIDEO_X11_NODIRECTCOLOR"
  3430. /**
  3431. * A variable forcing the content scaling factor for X11 displays.
  3432. *
  3433. * The variable can be set to a floating point value in the range 1.0-10.0f
  3434. *
  3435. * This hint should be set before SDL is initialized.
  3436. *
  3437. * \since This hint is available since SDL 3.2.0.
  3438. */
  3439. #define SDL_HINT_VIDEO_X11_SCALING_FACTOR "SDL_VIDEO_X11_SCALING_FACTOR"
  3440. /**
  3441. * A variable forcing the visual ID used for X11 display modes.
  3442. *
  3443. * This hint should be set before initializing the video subsystem.
  3444. *
  3445. * \since This hint is available since SDL 3.2.0.
  3446. */
  3447. #define SDL_HINT_VIDEO_X11_VISUALID "SDL_VIDEO_X11_VISUALID"
  3448. /**
  3449. * A variable forcing the visual ID chosen for new X11 windows.
  3450. *
  3451. * This hint should be set before creating a window.
  3452. *
  3453. * \since This hint is available since SDL 3.2.0.
  3454. */
  3455. #define SDL_HINT_VIDEO_X11_WINDOW_VISUALID "SDL_VIDEO_X11_WINDOW_VISUALID"
  3456. /**
  3457. * A variable controlling whether the X11 XRandR extension should be used.
  3458. *
  3459. * The variable can be set to the following values:
  3460. *
  3461. * - "0": Disable XRandR.
  3462. * - "1": Enable XRandR. (default)
  3463. *
  3464. * This hint should be set before SDL is initialized.
  3465. *
  3466. * \since This hint is available since SDL 3.2.0.
  3467. */
  3468. #define SDL_HINT_VIDEO_X11_XRANDR "SDL_VIDEO_X11_XRANDR"
  3469. /**
  3470. * A variable controlling whether touch should be enabled on the back panel of
  3471. * the PlayStation Vita.
  3472. *
  3473. * The variable can be set to the following values:
  3474. *
  3475. * - "0": Disable touch on the back panel.
  3476. * - "1": Enable touch on the back panel. (default)
  3477. *
  3478. * This hint should be set before SDL is initialized.
  3479. *
  3480. * \since This hint is available since SDL 3.2.0.
  3481. */
  3482. #define SDL_HINT_VITA_ENABLE_BACK_TOUCH "SDL_VITA_ENABLE_BACK_TOUCH"
  3483. /**
  3484. * A variable controlling whether touch should be enabled on the front panel
  3485. * of the PlayStation Vita.
  3486. *
  3487. * The variable can be set to the following values:
  3488. *
  3489. * - "0": Disable touch on the front panel.
  3490. * - "1": Enable touch on the front panel. (default)
  3491. *
  3492. * This hint should be set before SDL is initialized.
  3493. *
  3494. * \since This hint is available since SDL 3.2.0.
  3495. */
  3496. #define SDL_HINT_VITA_ENABLE_FRONT_TOUCH "SDL_VITA_ENABLE_FRONT_TOUCH"
  3497. /**
  3498. * A variable controlling the module path on the PlayStation Vita.
  3499. *
  3500. * This hint defaults to "app0:module"
  3501. *
  3502. * This hint should be set before SDL is initialized.
  3503. *
  3504. * \since This hint is available since SDL 3.2.0.
  3505. */
  3506. #define SDL_HINT_VITA_MODULE_PATH "SDL_VITA_MODULE_PATH"
  3507. /**
  3508. * A variable controlling whether to perform PVR initialization on the
  3509. * PlayStation Vita.
  3510. *
  3511. * - "0": Skip PVR initialization.
  3512. * - "1": Perform the normal PVR initialization. (default)
  3513. *
  3514. * This hint should be set before SDL is initialized.
  3515. *
  3516. * \since This hint is available since SDL 3.2.0.
  3517. */
  3518. #define SDL_HINT_VITA_PVR_INIT "SDL_VITA_PVR_INIT"
  3519. /**
  3520. * A variable overriding the resolution reported on the PlayStation Vita.
  3521. *
  3522. * The variable can be set to the following values:
  3523. *
  3524. * - "544": 544p (default)
  3525. * - "720": 725p for PSTV
  3526. * - "1080": 1088i for PSTV
  3527. *
  3528. * This hint should be set before SDL is initialized.
  3529. *
  3530. * \since This hint is available since SDL 3.2.0.
  3531. */
  3532. #define SDL_HINT_VITA_RESOLUTION "SDL_VITA_RESOLUTION"
  3533. /**
  3534. * A variable controlling whether OpenGL should be used instead of OpenGL ES
  3535. * on the PlayStation Vita.
  3536. *
  3537. * The variable can be set to the following values:
  3538. *
  3539. * - "0": Use OpenGL ES. (default)
  3540. * - "1": Use OpenGL.
  3541. *
  3542. * This hint should be set before SDL is initialized.
  3543. *
  3544. * \since This hint is available since SDL 3.2.0.
  3545. */
  3546. #define SDL_HINT_VITA_PVR_OPENGL "SDL_VITA_PVR_OPENGL"
  3547. /**
  3548. * A variable controlling which touchpad should generate synthetic mouse
  3549. * events.
  3550. *
  3551. * The variable can be set to the following values:
  3552. *
  3553. * - "0": Only front touchpad should generate mouse events. (default)
  3554. * - "1": Only back touchpad should generate mouse events.
  3555. * - "2": Both touchpads should generate mouse events.
  3556. *
  3557. * This hint can be set anytime.
  3558. *
  3559. * \since This hint is available since SDL 3.2.0.
  3560. */
  3561. #define SDL_HINT_VITA_TOUCH_MOUSE_DEVICE "SDL_VITA_TOUCH_MOUSE_DEVICE"
  3562. /**
  3563. * A variable overriding the display index used in SDL_Vulkan_CreateSurface()
  3564. *
  3565. * The display index starts at 0, which is the default.
  3566. *
  3567. * This hint should be set before calling SDL_Vulkan_CreateSurface()
  3568. *
  3569. * \since This hint is available since SDL 3.2.0.
  3570. */
  3571. #define SDL_HINT_VULKAN_DISPLAY "SDL_VULKAN_DISPLAY"
  3572. /**
  3573. * Specify the Vulkan library to load.
  3574. *
  3575. * This hint should be set before creating a Vulkan window or calling
  3576. * SDL_Vulkan_LoadLibrary().
  3577. *
  3578. * \since This hint is available since SDL 3.2.0.
  3579. */
  3580. #define SDL_HINT_VULKAN_LIBRARY "SDL_VULKAN_LIBRARY"
  3581. /**
  3582. * A variable controlling how the fact chunk affects the loading of a WAVE
  3583. * file.
  3584. *
  3585. * The fact chunk stores information about the number of samples of a WAVE
  3586. * file. The Standards Update from Microsoft notes that this value can be used
  3587. * to 'determine the length of the data in seconds'. This is especially useful
  3588. * for compressed formats (for which this is a mandatory chunk) if they
  3589. * produce multiple sample frames per block and truncating the block is not
  3590. * allowed. The fact chunk can exactly specify how many sample frames there
  3591. * should be in this case.
  3592. *
  3593. * Unfortunately, most application seem to ignore the fact chunk and so SDL
  3594. * ignores it by default as well.
  3595. *
  3596. * The variable can be set to the following values:
  3597. *
  3598. * - "truncate" - Use the number of samples to truncate the wave data if the
  3599. * fact chunk is present and valid.
  3600. * - "strict" - Like "truncate", but raise an error if the fact chunk is
  3601. * invalid, not present for non-PCM formats, or if the data chunk doesn't
  3602. * have that many samples.
  3603. * - "ignorezero" - Like "truncate", but ignore fact chunk if the number of
  3604. * samples is zero.
  3605. * - "ignore" - Ignore fact chunk entirely. (default)
  3606. *
  3607. * This hint should be set before calling SDL_LoadWAV() or SDL_LoadWAV_IO()
  3608. *
  3609. * \since This hint is available since SDL 3.2.0.
  3610. */
  3611. #define SDL_HINT_WAVE_FACT_CHUNK "SDL_WAVE_FACT_CHUNK"
  3612. /**
  3613. * A variable controlling the maximum number of chunks in a WAVE file.
  3614. *
  3615. * This sets an upper bound on the number of chunks in a WAVE file to avoid
  3616. * wasting time on malformed or corrupt WAVE files. This defaults to "10000".
  3617. *
  3618. * This hint should be set before calling SDL_LoadWAV() or SDL_LoadWAV_IO()
  3619. *
  3620. * \since This hint is available since SDL 3.2.0.
  3621. */
  3622. #define SDL_HINT_WAVE_CHUNK_LIMIT "SDL_WAVE_CHUNK_LIMIT"
  3623. /**
  3624. * A variable controlling how the size of the RIFF chunk affects the loading
  3625. * of a WAVE file.
  3626. *
  3627. * The size of the RIFF chunk (which includes all the sub-chunks of the WAVE
  3628. * file) is not always reliable. In case the size is wrong, it's possible to
  3629. * just ignore it and step through the chunks until a fixed limit is reached.
  3630. *
  3631. * Note that files that have trailing data unrelated to the WAVE file or
  3632. * corrupt files may slow down the loading process without a reliable
  3633. * boundary. By default, SDL stops after 10000 chunks to prevent wasting time.
  3634. * Use SDL_HINT_WAVE_CHUNK_LIMIT to adjust this value.
  3635. *
  3636. * The variable can be set to the following values:
  3637. *
  3638. * - "force" - Always use the RIFF chunk size as a boundary for the chunk
  3639. * search.
  3640. * - "ignorezero" - Like "force", but a zero size searches up to 4 GiB.
  3641. * (default)
  3642. * - "ignore" - Ignore the RIFF chunk size and always search up to 4 GiB.
  3643. * - "maximum" - Search for chunks until the end of file. (not recommended)
  3644. *
  3645. * This hint should be set before calling SDL_LoadWAV() or SDL_LoadWAV_IO()
  3646. *
  3647. * \since This hint is available since SDL 3.2.0.
  3648. */
  3649. #define SDL_HINT_WAVE_RIFF_CHUNK_SIZE "SDL_WAVE_RIFF_CHUNK_SIZE"
  3650. /**
  3651. * A variable controlling how a truncated WAVE file is handled.
  3652. *
  3653. * A WAVE file is considered truncated if any of the chunks are incomplete or
  3654. * the data chunk size is not a multiple of the block size. By default, SDL
  3655. * decodes until the first incomplete block, as most applications seem to do.
  3656. *
  3657. * The variable can be set to the following values:
  3658. *
  3659. * - "verystrict" - Raise an error if the file is truncated.
  3660. * - "strict" - Like "verystrict", but the size of the RIFF chunk is ignored.
  3661. * - "dropframe" - Decode until the first incomplete sample frame.
  3662. * - "dropblock" - Decode until the first incomplete block. (default)
  3663. *
  3664. * This hint should be set before calling SDL_LoadWAV() or SDL_LoadWAV_IO()
  3665. *
  3666. * \since This hint is available since SDL 3.2.0.
  3667. */
  3668. #define SDL_HINT_WAVE_TRUNCATION "SDL_WAVE_TRUNCATION"
  3669. /**
  3670. * A variable controlling whether the window is activated when the
  3671. * SDL_RaiseWindow function is called.
  3672. *
  3673. * The variable can be set to the following values:
  3674. *
  3675. * - "0": The window is not activated when the SDL_RaiseWindow function is
  3676. * called.
  3677. * - "1": The window is activated when the SDL_RaiseWindow function is called.
  3678. * (default)
  3679. *
  3680. * This hint can be set anytime.
  3681. *
  3682. * \since This hint is available since SDL 3.2.0.
  3683. */
  3684. #define SDL_HINT_WINDOW_ACTIVATE_WHEN_RAISED "SDL_WINDOW_ACTIVATE_WHEN_RAISED"
  3685. /**
  3686. * A variable controlling whether the window is activated when the
  3687. * SDL_ShowWindow function is called.
  3688. *
  3689. * The variable can be set to the following values:
  3690. *
  3691. * - "0": The window is not activated when the SDL_ShowWindow function is
  3692. * called.
  3693. * - "1": The window is activated when the SDL_ShowWindow function is called.
  3694. * (default)
  3695. *
  3696. * This hint can be set anytime.
  3697. *
  3698. * \since This hint is available since SDL 3.2.0.
  3699. */
  3700. #define SDL_HINT_WINDOW_ACTIVATE_WHEN_SHOWN "SDL_WINDOW_ACTIVATE_WHEN_SHOWN"
  3701. /**
  3702. * If set to "0" then never set the top-most flag on an SDL Window even if the
  3703. * application requests it.
  3704. *
  3705. * This is a debugging aid for developers and not expected to be used by end
  3706. * users.
  3707. *
  3708. * The variable can be set to the following values:
  3709. *
  3710. * - "0": don't allow topmost
  3711. * - "1": allow topmost (default)
  3712. *
  3713. * This hint can be set anytime.
  3714. *
  3715. * \since This hint is available since SDL 3.2.0.
  3716. */
  3717. #define SDL_HINT_WINDOW_ALLOW_TOPMOST "SDL_WINDOW_ALLOW_TOPMOST"
  3718. /**
  3719. * A variable controlling whether the window frame and title bar are
  3720. * interactive when the cursor is hidden.
  3721. *
  3722. * The variable can be set to the following values:
  3723. *
  3724. * - "0": The window frame is not interactive when the cursor is hidden (no
  3725. * move, resize, etc).
  3726. * - "1": The window frame is interactive when the cursor is hidden. (default)
  3727. *
  3728. * This hint can be set anytime.
  3729. *
  3730. * \since This hint is available since SDL 3.2.0.
  3731. */
  3732. #define SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN "SDL_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN"
  3733. /**
  3734. * A variable controlling whether SDL generates window-close events for Alt+F4
  3735. * on Windows.
  3736. *
  3737. * The variable can be set to the following values:
  3738. *
  3739. * - "0": SDL will only do normal key handling for Alt+F4.
  3740. * - "1": SDL will generate a window-close event when it sees Alt+F4.
  3741. * (default)
  3742. *
  3743. * This hint can be set anytime.
  3744. *
  3745. * \since This hint is available since SDL 3.2.0.
  3746. */
  3747. #define SDL_HINT_WINDOWS_CLOSE_ON_ALT_F4 "SDL_WINDOWS_CLOSE_ON_ALT_F4"
  3748. /**
  3749. * A variable controlling whether menus can be opened with their keyboard
  3750. * shortcut (Alt+mnemonic).
  3751. *
  3752. * If the mnemonics are enabled, then menus can be opened by pressing the Alt
  3753. * key and the corresponding mnemonic (for example, Alt+F opens the File
  3754. * menu). However, in case an invalid mnemonic is pressed, Windows makes an
  3755. * audible beep to convey that nothing happened. This is true even if the
  3756. * window has no menu at all!
  3757. *
  3758. * Because most SDL applications don't have menus, and some want to use the
  3759. * Alt key for other purposes, SDL disables mnemonics (and the beeping) by
  3760. * default.
  3761. *
  3762. * Note: This also affects keyboard events: with mnemonics enabled, when a
  3763. * menu is opened from the keyboard, you will not receive a KEYUP event for
  3764. * the mnemonic key, and *might* not receive one for Alt.
  3765. *
  3766. * The variable can be set to the following values:
  3767. *
  3768. * - "0": Alt+mnemonic does nothing, no beeping. (default)
  3769. * - "1": Alt+mnemonic opens menus, invalid mnemonics produce a beep.
  3770. *
  3771. * This hint can be set anytime.
  3772. *
  3773. * \since This hint is available since SDL 3.2.0.
  3774. */
  3775. #define SDL_HINT_WINDOWS_ENABLE_MENU_MNEMONICS "SDL_WINDOWS_ENABLE_MENU_MNEMONICS"
  3776. /**
  3777. * A variable controlling whether the windows message loop is processed by
  3778. * SDL.
  3779. *
  3780. * The variable can be set to the following values:
  3781. *
  3782. * - "0": The window message loop is not run.
  3783. * - "1": The window message loop is processed in SDL_PumpEvents(). (default)
  3784. *
  3785. * This hint can be set anytime.
  3786. *
  3787. * \since This hint is available since SDL 3.2.0.
  3788. */
  3789. #define SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP "SDL_WINDOWS_ENABLE_MESSAGELOOP"
  3790. /**
  3791. * A variable controlling whether GameInput is used for raw keyboard and mouse
  3792. * on Windows.
  3793. *
  3794. * The variable can be set to the following values:
  3795. *
  3796. * - "0": GameInput is not used for raw keyboard and mouse events.
  3797. * - "1": GameInput is used for raw keyboard and mouse events, if available.
  3798. * (default)
  3799. *
  3800. * This hint should be set before SDL is initialized.
  3801. *
  3802. * \since This hint is available since SDL 3.2.0.
  3803. */
  3804. #define SDL_HINT_WINDOWS_GAMEINPUT "SDL_WINDOWS_GAMEINPUT"
  3805. /**
  3806. * A variable controlling whether raw keyboard events are used on Windows.
  3807. *
  3808. * The variable can be set to the following values:
  3809. *
  3810. * - "0": The Windows message loop is used for keyboard events. (default)
  3811. * - "1": Low latency raw keyboard events are used.
  3812. *
  3813. * This hint can be set anytime.
  3814. *
  3815. * \since This hint is available since SDL 3.2.0.
  3816. */
  3817. #define SDL_HINT_WINDOWS_RAW_KEYBOARD "SDL_WINDOWS_RAW_KEYBOARD"
  3818. /**
  3819. * A variable controlling whether SDL uses Kernel Semaphores on Windows.
  3820. *
  3821. * Kernel Semaphores are inter-process and require a context switch on every
  3822. * interaction. On Windows 8 and newer, the WaitOnAddress API is available.
  3823. * Using that and atomics to implement semaphores increases performance. SDL
  3824. * will fall back to Kernel Objects on older OS versions or if forced to by
  3825. * this hint.
  3826. *
  3827. * The variable can be set to the following values:
  3828. *
  3829. * - "0": Use Atomics and WaitOnAddress API when available, otherwise fall
  3830. * back to Kernel Objects. (default)
  3831. * - "1": Force the use of Kernel Objects in all cases.
  3832. *
  3833. * This hint should be set before SDL is initialized.
  3834. *
  3835. * \since This hint is available since SDL 3.2.0.
  3836. */
  3837. #define SDL_HINT_WINDOWS_FORCE_SEMAPHORE_KERNEL "SDL_WINDOWS_FORCE_SEMAPHORE_KERNEL"
  3838. /**
  3839. * A variable to specify custom icon resource id from RC file on Windows
  3840. * platform.
  3841. *
  3842. * This hint should be set before SDL is initialized.
  3843. *
  3844. * \since This hint is available since SDL 3.2.0.
  3845. */
  3846. #define SDL_HINT_WINDOWS_INTRESOURCE_ICON "SDL_WINDOWS_INTRESOURCE_ICON"
  3847. /**
  3848. * A variable to specify custom icon resource id from RC file on Windows
  3849. * platform.
  3850. *
  3851. * This hint should be set before SDL is initialized.
  3852. *
  3853. * \since This hint is available since SDL 3.2.0.
  3854. */
  3855. #define SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL "SDL_WINDOWS_INTRESOURCE_ICON_SMALL"
  3856. /**
  3857. * A variable controlling whether SDL uses the D3D9Ex API introduced in
  3858. * Windows Vista, instead of normal D3D9.
  3859. *
  3860. * Direct3D 9Ex contains changes to state management that can eliminate device
  3861. * loss errors during scenarios like Alt+Tab or UAC prompts. D3D9Ex may
  3862. * require some changes to your application to cope with the new behavior, so
  3863. * this is disabled by default.
  3864. *
  3865. * For more information on Direct3D 9Ex, see:
  3866. *
  3867. * - https://docs.microsoft.com/en-us/windows/win32/direct3darticles/graphics-apis-in-windows-vista#direct3d-9ex
  3868. * - https://docs.microsoft.com/en-us/windows/win32/direct3darticles/direct3d-9ex-improvements
  3869. *
  3870. * The variable can be set to the following values:
  3871. *
  3872. * - "0": Use the original Direct3D 9 API. (default)
  3873. * - "1": Use the Direct3D 9Ex API on Vista and later (and fall back if D3D9Ex
  3874. * is unavailable)
  3875. *
  3876. * This hint should be set before SDL is initialized.
  3877. *
  3878. * \since This hint is available since SDL 3.2.0.
  3879. */
  3880. #define SDL_HINT_WINDOWS_USE_D3D9EX "SDL_WINDOWS_USE_D3D9EX"
  3881. /**
  3882. * A variable controlling whether SDL will clear the window contents when the
  3883. * WM_ERASEBKGND message is received.
  3884. *
  3885. * The variable can be set to the following values:
  3886. *
  3887. * - "0"/"never": Never clear the window.
  3888. * - "1"/"initial": Clear the window when the first WM_ERASEBKGND event fires.
  3889. * (default)
  3890. * - "2"/"always": Clear the window on every WM_ERASEBKGND event.
  3891. *
  3892. * This hint should be set before creating a window.
  3893. *
  3894. * \since This hint is available since SDL 3.2.0.
  3895. */
  3896. #define SDL_HINT_WINDOWS_ERASE_BACKGROUND_MODE "SDL_WINDOWS_ERASE_BACKGROUND_MODE"
  3897. /**
  3898. * A variable controlling whether X11 windows are marked as override-redirect.
  3899. *
  3900. * If set, this _might_ increase framerate at the expense of the desktop not
  3901. * working as expected. Override-redirect windows aren't noticed by the window
  3902. * manager at all.
  3903. *
  3904. * You should probably only use this for fullscreen windows, and you probably
  3905. * shouldn't even use it for that. But it's here if you want to try!
  3906. *
  3907. * The variable can be set to the following values:
  3908. *
  3909. * - "0": Do not mark the window as override-redirect. (default)
  3910. * - "1": Mark the window as override-redirect.
  3911. *
  3912. * This hint should be set before creating a window.
  3913. *
  3914. * \since This hint is available since SDL 3.2.0.
  3915. */
  3916. #define SDL_HINT_X11_FORCE_OVERRIDE_REDIRECT "SDL_X11_FORCE_OVERRIDE_REDIRECT"
  3917. /**
  3918. * A variable specifying the type of an X11 window.
  3919. *
  3920. * During SDL_CreateWindow, SDL uses the _NET_WM_WINDOW_TYPE X11 property to
  3921. * report to the window manager the type of window it wants to create. This
  3922. * might be set to various things if SDL_WINDOW_TOOLTIP or
  3923. * SDL_WINDOW_POPUP_MENU, etc, were specified. For "normal" windows that
  3924. * haven't set a specific type, this hint can be used to specify a custom
  3925. * type. For example, a dock window might set this to
  3926. * "_NET_WM_WINDOW_TYPE_DOCK".
  3927. *
  3928. * This hint should be set before creating a window.
  3929. *
  3930. * \since This hint is available since SDL 3.2.0.
  3931. */
  3932. #define SDL_HINT_X11_WINDOW_TYPE "SDL_X11_WINDOW_TYPE"
  3933. /**
  3934. * Specify the XCB library to load for the X11 driver.
  3935. *
  3936. * The default is platform-specific, often "libX11-xcb.so.1".
  3937. *
  3938. * This hint should be set before initializing the video subsystem.
  3939. *
  3940. * \since This hint is available since SDL 3.2.0.
  3941. */
  3942. #define SDL_HINT_X11_XCB_LIBRARY "SDL_X11_XCB_LIBRARY"
  3943. /**
  3944. * A variable controlling whether XInput should be used for controller
  3945. * handling.
  3946. *
  3947. * The variable can be set to the following values:
  3948. *
  3949. * - "0": XInput is not enabled.
  3950. * - "1": XInput is enabled. (default)
  3951. *
  3952. * This hint should be set before SDL is initialized.
  3953. *
  3954. * \since This hint is available since SDL 3.2.0.
  3955. */
  3956. #define SDL_HINT_XINPUT_ENABLED "SDL_XINPUT_ENABLED"
  3957. /**
  3958. * A variable controlling response to SDL_assert failures.
  3959. *
  3960. * The variable can be set to the following case-sensitive values:
  3961. *
  3962. * - "abort": Program terminates immediately.
  3963. * - "break": Program triggers a debugger breakpoint.
  3964. * - "retry": Program reruns the SDL_assert's test again.
  3965. * - "ignore": Program continues on, ignoring this assertion failure this
  3966. * time.
  3967. * - "always_ignore": Program continues on, ignoring this assertion failure
  3968. * for the rest of the run.
  3969. *
  3970. * Note that SDL_SetAssertionHandler offers a programmatic means to deal with
  3971. * assertion failures through a callback, and this hint is largely intended to
  3972. * be used via environment variables by end users and automated tools.
  3973. *
  3974. * This hint should be set before an assertion failure is triggered and can be
  3975. * changed at any time.
  3976. *
  3977. * \since This hint is available since SDL 3.2.0.
  3978. */
  3979. #define SDL_HINT_ASSERT "SDL_ASSERT"
  3980. /**
  3981. * A variable controlling whether pen events should generate synthetic mouse
  3982. * events.
  3983. *
  3984. * The variable can be set to the following values:
  3985. *
  3986. * - "0": Pen events will not generate mouse events.
  3987. * - "1": Pen events will generate mouse events. (default)
  3988. *
  3989. * This hint can be set anytime.
  3990. *
  3991. * \since This hint is available since SDL 3.2.0.
  3992. */
  3993. #define SDL_HINT_PEN_MOUSE_EVENTS "SDL_PEN_MOUSE_EVENTS"
  3994. /**
  3995. * A variable controlling whether pen events should generate synthetic touch
  3996. * events.
  3997. *
  3998. * The variable can be set to the following values:
  3999. *
  4000. * - "0": Pen events will not generate touch events.
  4001. * - "1": Pen events will generate touch events. (default)
  4002. *
  4003. * This hint can be set anytime.
  4004. *
  4005. * \since This hint is available since SDL 3.2.0.
  4006. */
  4007. #define SDL_HINT_PEN_TOUCH_EVENTS "SDL_PEN_TOUCH_EVENTS"
  4008. /**
  4009. * An enumeration of hint priorities.
  4010. *
  4011. * \since This enum is available since SDL 3.2.0.
  4012. */
  4013. typedef enum SDL_HintPriority
  4014. {
  4015. SDL_HINT_DEFAULT,
  4016. SDL_HINT_NORMAL,
  4017. SDL_HINT_OVERRIDE
  4018. } SDL_HintPriority;
  4019. /**
  4020. * Set a hint with a specific priority.
  4021. *
  4022. * The priority controls the behavior when setting a hint that already has a
  4023. * value. Hints will replace existing hints of their priority and lower.
  4024. * Environment variables are considered to have override priority.
  4025. *
  4026. * \param name the hint to set.
  4027. * \param value the value of the hint variable.
  4028. * \param priority the SDL_HintPriority level for the hint.
  4029. * \returns true on success or false on failure; call SDL_GetError() for more
  4030. * information.
  4031. *
  4032. * \threadsafety It is safe to call this function from any thread.
  4033. *
  4034. * \since This function is available since SDL 3.2.0.
  4035. *
  4036. * \sa SDL_GetHint
  4037. * \sa SDL_ResetHint
  4038. * \sa SDL_SetHint
  4039. */
  4040. extern SDL_DECLSPEC bool SDLCALL SDL_SetHintWithPriority(const char *name, const char *value, SDL_HintPriority priority);
  4041. /**
  4042. * Set a hint with normal priority.
  4043. *
  4044. * Hints will not be set if there is an existing override hint or environment
  4045. * variable that takes precedence. You can use SDL_SetHintWithPriority() to
  4046. * set the hint with override priority instead.
  4047. *
  4048. * \param name the hint to set.
  4049. * \param value the value of the hint variable.
  4050. * \returns true on success or false on failure; call SDL_GetError() for more
  4051. * information.
  4052. *
  4053. * \threadsafety It is safe to call this function from any thread.
  4054. *
  4055. * \since This function is available since SDL 3.2.0.
  4056. *
  4057. * \sa SDL_GetHint
  4058. * \sa SDL_ResetHint
  4059. * \sa SDL_SetHintWithPriority
  4060. */
  4061. extern SDL_DECLSPEC bool SDLCALL SDL_SetHint(const char *name, const char *value);
  4062. /**
  4063. * Reset a hint to the default value.
  4064. *
  4065. * This will reset a hint to the value of the environment variable, or NULL if
  4066. * the environment isn't set. Callbacks will be called normally with this
  4067. * change.
  4068. *
  4069. * \param name the hint to set.
  4070. * \returns true on success or false on failure; call SDL_GetError() for more
  4071. * information.
  4072. *
  4073. * \threadsafety It is safe to call this function from any thread.
  4074. *
  4075. * \since This function is available since SDL 3.2.0.
  4076. *
  4077. * \sa SDL_SetHint
  4078. * \sa SDL_ResetHints
  4079. */
  4080. extern SDL_DECLSPEC bool SDLCALL SDL_ResetHint(const char *name);
  4081. /**
  4082. * Reset all hints to the default values.
  4083. *
  4084. * This will reset all hints to the value of the associated environment
  4085. * variable, or NULL if the environment isn't set. Callbacks will be called
  4086. * normally with this change.
  4087. *
  4088. * \threadsafety It is safe to call this function from any thread.
  4089. *
  4090. * \since This function is available since SDL 3.2.0.
  4091. *
  4092. * \sa SDL_ResetHint
  4093. */
  4094. extern SDL_DECLSPEC void SDLCALL SDL_ResetHints(void);
  4095. /**
  4096. * Get the value of a hint.
  4097. *
  4098. * \param name the hint to query.
  4099. * \returns the string value of a hint or NULL if the hint isn't set.
  4100. *
  4101. * \threadsafety It is safe to call this function from any thread, however the
  4102. * return value only remains valid until the hint is changed; if
  4103. * another thread might do so, the app should supply locks
  4104. * and/or make a copy of the string. Note that using a hint
  4105. * callback instead is always thread-safe, as SDL holds a lock
  4106. * on the thread subsystem during the callback.
  4107. *
  4108. * \since This function is available since SDL 3.2.0.
  4109. *
  4110. * \sa SDL_SetHint
  4111. * \sa SDL_SetHintWithPriority
  4112. */
  4113. extern SDL_DECLSPEC const char *SDLCALL SDL_GetHint(const char *name);
  4114. /**
  4115. * Get the boolean value of a hint variable.
  4116. *
  4117. * \param name the name of the hint to get the boolean value from.
  4118. * \param default_value the value to return if the hint does not exist.
  4119. * \returns the boolean value of a hint or the provided default value if the
  4120. * hint does not exist.
  4121. *
  4122. * \threadsafety It is safe to call this function from any thread.
  4123. *
  4124. * \since This function is available since SDL 3.2.0.
  4125. *
  4126. * \sa SDL_GetHint
  4127. * \sa SDL_SetHint
  4128. */
  4129. extern SDL_DECLSPEC bool SDLCALL SDL_GetHintBoolean(const char *name, bool default_value);
  4130. /**
  4131. * A callback used to send notifications of hint value changes.
  4132. *
  4133. * This is called an initial time during SDL_AddHintCallback with the hint's
  4134. * current value, and then again each time the hint's value changes.
  4135. *
  4136. * \param userdata what was passed as `userdata` to SDL_AddHintCallback().
  4137. * \param name what was passed as `name` to SDL_AddHintCallback().
  4138. * \param oldValue the previous hint value.
  4139. * \param newValue the new value hint is to be set to.
  4140. *
  4141. * \threadsafety This callback is fired from whatever thread is setting a new
  4142. * hint value. SDL holds a lock on the hint subsystem when
  4143. * calling this callback.
  4144. *
  4145. * \since This datatype is available since SDL 3.2.0.
  4146. *
  4147. * \sa SDL_AddHintCallback
  4148. */
  4149. typedef void(SDLCALL *SDL_HintCallback)(void *userdata, const char *name, const char *oldValue, const char *newValue);
  4150. /**
  4151. * Add a function to watch a particular hint.
  4152. *
  4153. * The callback function is called _during_ this function, to provide it an
  4154. * initial value, and again each time the hint's value changes.
  4155. *
  4156. * \param name the hint to watch.
  4157. * \param callback An SDL_HintCallback function that will be called when the
  4158. * hint value changes.
  4159. * \param userdata a pointer to pass to the callback function.
  4160. * \returns true on success or false on failure; call SDL_GetError() for more
  4161. * information.
  4162. *
  4163. * \threadsafety It is safe to call this function from any thread.
  4164. *
  4165. * \since This function is available since SDL 3.2.0.
  4166. *
  4167. * \sa SDL_RemoveHintCallback
  4168. */
  4169. extern SDL_DECLSPEC bool SDLCALL SDL_AddHintCallback(const char *name, SDL_HintCallback callback, void *userdata);
  4170. /**
  4171. * Remove a function watching a particular hint.
  4172. *
  4173. * \param name the hint being watched.
  4174. * \param callback an SDL_HintCallback function that will be called when the
  4175. * hint value changes.
  4176. * \param userdata a pointer being passed to the callback function.
  4177. *
  4178. * \threadsafety It is safe to call this function from any thread.
  4179. *
  4180. * \since This function is available since SDL 3.2.0.
  4181. *
  4182. * \sa SDL_AddHintCallback
  4183. */
  4184. extern SDL_DECLSPEC void SDLCALL SDL_RemoveHintCallback(const char *name,
  4185. SDL_HintCallback callback,
  4186. void *userdata);
  4187. /* Ends C function definitions when using C++ */
  4188. #ifdef __cplusplus
  4189. }
  4190. #endif
  4191. #include <SDL3/SDL_close_code.h>
  4192. #endif /* SDL_hints_h_ */