SDL_hints.h 150 KB

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