SDL_hints.h 158 KB

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