include/SDL_hints.h


Log

Author Commit Date CI Message
Sam Lantinga b8582428 2023-07-08T09:32:24 Added the hint SDL_HINT_JOYSTICK_WGI to control whether to use Windows.Gaming.Input for controllers (cherry picked from commit a6228e7aafb66075fe8f4aaf411314fc92340499)
Alibek Omarov c3952404 2023-06-02T05:59:06 hints: clarify support for comma-separated values for QtWayland orientation that's available since 2.0.22 Signed-off-by: Alibek Omarov <a1ba.omarov@gmail.com>
Sam Lantinga 69644346 2023-05-20T11:09:36 Added the hint SDL_HINT_ENABLE_SCREEN_KEYBOARD to control whether the on-screen keyboard should be shown when text input is active Fixes https://github.com/libsdl-org/SDL/issues/7160
Sam Lantinga 0479df53 2023-01-09T09:48:21 Updated copyright for 2023
Rudolf-Walter Kiss-Szakacs 232ed540 2022-12-02T07:22:31 Add SDL_HINT_WINDOWS_ENABLE_MENU_MNEMONICS.
Sam Lantinga 1f87e9e2 2022-11-17T09:00:27 Updated patch notes for 2.26 release
Sam Lantinga 0dfc829a 2022-11-10T19:16:53 Added simple BLE Steam Controller support on all platforms This is still disabled by default via the hint SDL_HINT_JOYSTICK_HIDAPI_STEAM
Sam Lantinga 15a98909 2022-11-05T16:44:52 Added SDL_HINT_HIDAPI_IGNORE_DEVICES to specify devices that should be ignored in SDL_hid_enumerate()
Sam Lantinga 24cdebe4 2022-11-05T10:34:08 Added the hint SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED to control the brightness of the Xbox button LED on the Xbox One controller
Hubert Maier 57973cd3 2022-10-30T08:30:49 SDL_HINTS.H: Correct spelling mistake noticable -> noticeable
SDL Wiki Bot 393acf63 2022-10-25T18:07:13 Sync SDL wiki -> header
Sam Lantinga 0bc852ce 2022-10-17T17:43:06 Revert "Disable the RAWINPUT joystick driver by default" Disabling RAWINPUT on Windows 10 causes these issues: * All Xbox controllers are named "XInput Controller". * Trigger rumble no longer works. * "XInput Controllers" are now also listed as separate haptic devices
Sam Lantinga 47ba997f 2022-10-17T07:39:52 Disable the RAWINPUT joystick driver by default It's only needed to support more than 4 Xbox controllers, and adds significant complexity to the joystick processing, and we regularly get bugs from people who aren't using an SDL window who need to turn on SDL_HINT_JOYSTICK_THREAD.
Daniel Bomar 22461383 2022-10-15T15:54:12 SDL_audiocvt: Respct the SDL_HINT_AUDIO_RESAMPLING_MODE hint This implements using libsamplerate for the SDL_AudioCVT API. This library was already being used for audio streams when this hint is set.
Sam Lantinga efdb390c 2022-10-09T09:11:33 Disable the HIDAPI Wii driver by default as it doesn't work with the dolphinbar
SDL Wiki Bot 4ca86dae 2022-10-05T23:26:14 Sync SDL wiki -> header
David Gow ad29875e 2022-04-18T17:03:05 Wayland: Emulate mouse warp using relative mouse mode Several games (including Source and GoldSrc games, and Bioshock Infinite) attempt to "fake" relative mouse mode by repeatedly warping the cursor to the centre of the screen. Since mouse warping is not supported under Wayland, the viewport ends up "stuck" in a rectangular area. Detect this case (mouse warp while the cursor is not visible), and enable relative mouse mode, which tracks the cursor position independently, and so can Warp successfully. This is behind the SDL_HINT_VIDEO_WAYLAND_EMULATE_MOUSE_WARP hint, which is enabled by default, unless the application enables relative mouse mode itself using SDL_SetRelativeMouseMode(SDL_TRUE). Note that there is a behavoural difference, in that relative mouse mode typically doesn't take mouse accelleration into account, but the repeated-warping technique does, so mouse movement can seem very slow with this (unless the game has its own mouse accelleration option, such as in Portal 2).
SDL Wiki Bot 34b28002 2022-10-03T00:20:15 Sync SDL wiki -> header
Sam Lantinga 64ea6cef 2022-10-02T17:17:31 SDL_ResetHint() no longer clears the callbacks associated with a hint Also added SDL_ResetHints() to reset all callbacks, and clarified that SDL_ClearHints() is just used for cleanup at shutdown. Fixes https://github.com/libsdl-org/SDL/issues/6313
Happy Harry 6c8bf3af 2022-10-03T00:19:34 Add vertical mode for Nintendo Joy-Con (#6303) * Added support for vertical mode for Joy-Con controllers * Added the hint SDL_HINT_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS for switching to this mode * Added support for SL/SR buttons in combined/vertical mode and L/ZL/R/ZR buttons in mini-gamepad mode
Sam Lantinga c887cb02 2022-09-01T16:23:32 Added the hint SDL_HINT_JOYSTICK_HIDAPI_WII_PLAYER_LED to control whether the player LED should be lit on the Nintendo Wii controllers Also fixed the Y axes on the Wii U Pro controller, and various formatting cleanup
Sam Lantinga c72e14e8 2022-09-01T15:29:01 Added initial support for Wii controllers (thanks @tellowkrinkle!)
Francisco Javier Trujillo Mata f1e46858 2022-08-26T17:58:59 Adding specific SDL_Hint for the dynamic VSYNC
Sam Lantinga 1fc7f681 2022-08-24T06:38:36 Document that it's not possible to use the HIDAPI driver for PS3 controllers on Windows
Sam Lantinga b6f96b69 2022-08-23T22:45:37 Initial HIDAPI driver support for the PS3 controller
Sam Lantinga 92b3c53c 2022-08-22T16:25:25 Added a hint SDL_HINT_MOUSE_RELATIVE_SYSTEM_SCALE to control whether to use system mouse acceleration on raw relative motion. This is currently only implemented on Windows, and "Enhanced pointer precision" mode is not quite correct.
Sam Lantinga 5a3adbfd 2022-08-19T11:11:25 Added the hint SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED to control whether the player LED is set on Xbox 360 controllers
Sam Lantinga 52b6899a 2022-08-19T11:11:23 Added hints for more fine grained control over HIDAPI Xbox controller support
Sam Lantinga 3861c557 2022-08-11T13:58:39 Added the hint SDL_HINT_MOUSE_RELATIVE_WARP_MOTION This hint controls whether mouse warping generates motion events in relative mode, and defaults off. Fixes https://github.com/libsdl-org/SDL/issues/6034 Fixes https://github.com/libsdl-org/SDL/issues/5741
SDL Wiki Bot 6ecfc406 2022-08-10T15:02:11 Sync SDL wiki -> header
Sam Lantinga d4192850 2022-08-10T07:59:12 Added SDL_ResetHint() to reset a hint to the default value Resolves question of how to clear an override hint raised by @pionere in https://github.com/libsdl-org/SDL/pull/5309
Ryan C. Gordon 3119d58f 2022-08-10T10:48:23 cocoa: Change the new sync_dispatch hint to async_dispatch. This is so the default is safer.
Ryan C. Gordon bdc7f958 2022-08-10T00:41:25 cocoa: Added hint to treat MacBook trackpads as touch devices, not mice. Fixes #5511.
Salman Ahmed b4660e9d 2022-08-10T03:40:00 macOS: Add hint for blocking thread on OpenGL context update dispatch (#5708)
Sam Lantinga 824f2d46 2022-08-09T13:41:58 Added a second hint SDL_HINT_JOYSTICK_HIDAPI_JOYCON_HOME_LED to control the Home button LED on Nintendo Joy-Con controllers separately from Nintendo Switch Pro controllers
Sam Lantinga 52bf5b1d 2022-08-06T10:34:19 Added the hint SDL_HINT_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED to control whether the player LED is set on Nintendo Switch controllers
Sam Lantinga bcdef4aa 2022-08-03T13:07:47 Added separate hints for Nintendo Online classic controllers and Joy-Cons This allows them to be enabled/disabled separately from Switch Pro HIDAPI support
Sam Lantinga 2fa2f9ff 2022-07-28T19:22:27 Greatly improved Nintendo Joy-Con support using the HIDAPI driver * Added support for mini-gamepad mode for Joy-Con controllers, matching the mapping for hid-nintendo on Linux and iOS 16 * Added the ability to merge left and right Joy-Con controllers into a single Pro-style controller * Added the hint SDL_HINT_JOYSTICK_HIDAPI_SWITCH_COMBINE_JOY_CONS to control this merging functionality * Removed the hint SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS
Ryan C. Gordon 5d85c7d3 2022-07-26T00:19:16 kmsdrm: Added a hint to specify device index. Fixes #2811.
Cameron Gutman 6e712d24 2022-07-09T22:55:36 joystick: Add HIDAPI driver for NVIDIA SHIELD 2017 controller Basic input already works using the OS HID driver, but this enables force feedback and battery state reporting.
Jade Macho 6a2e6c82 2022-06-28T21:03:16 Add SDL_HINT_DIRECTINPUT_ENABLED (on by default)
Sam Lantinga c95edd94 2022-06-13T06:36:39 Fixed spacing
Eric Wasylishen ab81a559 2022-06-07T02:01:27 Windows DPI scaling/highdpi support Adds hint "SDL_WINDOWS_DPI_SCALING" which can be set to "1" to change the SDL coordinate system units to be DPI-scaled points, rather than pixels everywhere. This means windows will be appropriately sized, even when created on high-DPI displays with scaling. e.g. requesting a 640x480 window from SDL, on a display with 125% scaling in Windows display settings, will create a window with an 800x600 client area (in pixels). Setting this to "1" implicitly requests process DPI awareness (setting SDL_WINDOWS_DPI_AWARENESS is unnecessary), and forces SDL_WINDOW_ALLOW_HIGHDPI on all windows.
Eric Wasylishen 51ebefee 2022-02-28T00:43:43 Support PMv2 DPI awareness, add SDL_HINT_WINDOWS_DPI_AWARENESS The hint allows setting a specific DPI awareness ("unaware", "system", "permonitor", "permonitorv2"). This is the first part of High-DPI support on Windows ( https://github.com/libsdl-org/SDL/issues/2119 ). It doesn't implement a virtualized SDL coordinate system, which will be addressed in a later commit. (This hint could be useful for SDL apps that want 1 SDL unit = 1 pixel, though.) Detecting and behaving correctly under per-monitor V2 (calling AdjustWindowRectExForDpi where needed) should fix the following issues: https://github.com/libsdl-org/SDL/issues/3286 https://github.com/libsdl-org/SDL/issues/4712
Frank Praznik e1c83504 2022-05-15T10:35:59 wayland: Add a hint to disable video mode emulation under Wayland Add the hint "SDL_VIDEO_WAYLAND_MODE_EMULATION", which can be used to disable mode emulation under Wayland. When disabled, only the desktop and/or native display resolution is exposed.
chalonverse 40828218 2022-06-06T17:42:30 DirectX 12 Renderer (#5761) * DirectX 12 Renderer (27 squashed commits) * Add missing SDL_hidapi.h of merge of SDL.vcxproj.filters * Fixed OpenWatcom build failure * Dynapi fix Co-authored-by: Ryan C. Gordon <icculus@icculus.org>
Alex Szpakowski f871c178 2022-05-10T17:32:24 macOS: remove dead code for supporting 10.6 at runtime.
atfrase db9e14e5 2022-01-31T13:55:37 disabled linux joystick debugging outputs and reverted unnecessary comment edit
atfrase 3696e23d 2022-01-14T10:45:16 added hints SDL_HINT_LINUX_DIGITAL_HATS and SDL_HINT_LINUX_HAT_DEADZONES to control the new Linux hat handling; added define DEBUG_GAMEPAD_MAPPINGS to log messages when generating default gamepad mapings for Linux joysticks
Susko3 6150245d 2022-05-03T00:11:44 Add new verbosity level for logging of `SDL_SysWMEvent`s Now logged only if SDL_HINT_EVENT_LOGGING is set to "3" or above.
Ryan C. Gordon 7d7ec9c9 2022-04-26T16:41:28 x11: Remove XVidMode and Xinerama support. Fixes #1782.
Ryan C. Gordon c1336b21 2022-04-17T12:43:32 hints: Make SDL_VIDEODRIVER and SDL_AUDIODRIVER formal hints. They were just environment variables before. Fixes #5528.
David Gow 9c2f46b0 2022-04-12T15:23:22 Wayland: Add SDL_HINT_VIDEO_WAYLAND_PREFER_LIBDECOR This hint allows libdecor to be used even when xdg-decoration is available. It's mostly useful for debugging libdecor, but could in theory be used by applications which want to (for example) bundle their own libdecor plugins.
Sam Lantinga 6d7d142b 2022-04-08T18:10:38 Fixed typo
Ivan Epifanov 96be9cdd 2022-03-27T21:48:09 Vita: add hint to select which touchpad generates mouse events
Ryan C. Gordon f782abe5 2022-03-22T09:52:52 hints: Added SDL_HINT_QUIT_ON_LAST_WINDOW_CLOSE. Fixes #2349.
Sam Lantinga 6c962177 2022-03-18T10:07:59 Added the hint SDL_HINT_MOUSE_RELATIVE_MODE_CENTER, controlling whether the mouse should be constrained to the center of the window or the whole window in relative mode. For further info about the pros and cons, check out the discussion in https://github.com/libsdl-org/SDL/issues/5271
Sam Lantinga 5ff42438 2022-03-17T17:39:46 Added a hint to capture the mouse when mouse buttons are pressed, defaulting on Fixes https://github.com/libsdl-org/SDL/issues/5301
Sam Lantinga e5f45455 2022-03-17T14:44:34 Added a hint to mark a foreign window as usable with OpenGL Fixes https://github.com/libsdl-org/SDL/issues/2942
Ethan Lee 0bf8ccfb 2022-02-08T22:15:11 video: Add a hint to allow Vulkan surfaces on foreign windows
Zach Reedy d14a1263 2022-03-11T17:45:17 IME Composition Truncation + SDL_IsTextInputShown + SDL_ClearComposition (#5398) * Fixes for IME Composition Truncation + Addition of SDL_ClearComposition, SDL_IsTextInputShown * Fixed: Documentation and code style issues raised during code review.
Phillip Stephens 94d43186 2022-02-22T00:41:15 GameCubeAdapter: Add suppport for all rumble modes This adds support for all 3 of the gamecube controller's rumble modes Rumble: 1 Stop: 0 StopHard: 2 This is useful for applications that need the full range of support This also adds a hint to control rumble behavior, defaults 0 to maintain compatibility
Sam Lantinga 18032979 2022-02-15T13:07:51 Added the hint SDL_HINT_JOYSTICK_ROG_CHAKRAM to control whether ROG Chakram mice show up as joysticks This hint defaults off, but when it is enabled the mice will have a game controller mapping set up for Profile 3 (set in the Armoury Crate software)
ulatekh 57bc9040 2022-01-07T08:54:08 Add hint to optionally forcibly raise the window under MS Windows.
Ryan C. Gordon 42302d0a 2022-01-11T21:17:21 x11: Let apps specify a custom _NET_WM_WINDOW_TYPE. Fixes #5185.
Sam Lantinga 09ece861 2022-01-08T11:36:29 Added the hint SDL_HINT_RENDER_LINE_METHOD to select the line rendering method
Sam Lantinga 120c76c8 2022-01-03T09:40:00 Updated copyright for 2022
Sam Lantinga 66058bbb 2021-11-15T16:52:56 Fixed exception accessing Bluetooth devices on Android 12 Since accessing Bluetooth prompts the user for permission on both Android and iOS, and we only need it for Steam Controller support, we'll leave it off by default. You can enable it by setting the hint SDL_HINT_JOYSTICK_HIDAPI_STEAM to "1" before calling SDL_Init() Fixes https://github.com/libsdl-org/SDL/issues/4952
Sam Lantinga 1c78b080 2021-11-10T20:02:25 Added support for /dev/input/js* on Linux Added the hint SDL_HINT_LINUX_JOYSTICK_CLASSIC to control whether /dev/input/js* or /dev/input/event* are used as joystick devices Added the hint SDL_HINT_JOYSTICK_DEVICE to allow the user to specify devices t hat will be opened in addition to the normal joystick detection Fixes https://github.com/libsdl-org/SDL/issues/1314 Fixes https://github.com/libsdl-org/SDL/issues/1727 Fixes https://github.com/libsdl-org/SDL/issues/1981 Closes https://github.com/libsdl-org/SDL/pull/4727
SDL Wiki Bot c7dafb15 2021-10-27T01:36:05 Sync wiki -> header
Brick 8bf32e12 2021-10-15T06:26:10 Improved SDL_PollEvent usage (#4794) * Avoid unnecessary SDL_PumpEvents calls in SDL_WaitEventTimeout * Add a sentinel event to avoid infinite poll loops * Move SDL_POLLSENTINEL to new internal event category * Tweak documentation to indicate SDL_PumpEvents isn't always called * Avoid shadowing event variable * Ignore poll sentinel if more (user) events have been added after Co-authored-by: Sam Lantinga <slouken@libsdl.org>
Rémy Tassoux 0789610c 2021-10-14T00:52:05 Add SDL_HINT_WINDOW_NO_ACTIVATION_WHEN_SHOWN
Cameron Gutman 5dccffd7 2021-08-23T21:16:58 Allow usage of the new Condition Variable code with Critical Sections Vista and later provide the SleepConditionVariableCS() function for this. Since SDL_syscond_srw.c doesn't require SRW locks anymore, rename it to SDL_syscond_cv.c which better reflects the implementation of condition variables rather than the implementation of mutexes. Fixes #4051.
Zach Reedy 6f972052 2021-08-30T12:21:05 Added: Support for showing the IME Candidate Window on Windows
David Gow a1ffeda0 2021-08-28T22:52:13 Add SDL_HINT_APP_NAME and DBUS inhibition hint See SDL bug #4703. This implements two new hints: - SDL_APP_NAME - SDL_SCREENSAVER_INHIBIT_ACTIVITY_NAME The former is the successor to SDL_HINT_AUDIO_DEVICE_APP_NAME, and acts as a generic "application name" used both by audio drivers and DBUS screensaver inhibition. If SDL_AUDIO_DEVICE_APP_NAME is set, it will still take priority over SDL_APP_NAME. The second allows the "activity name" used by org.freedesktop.ScreenSavver's Inhibit method, which are often shown in the UI as the reason the screensaver (and/or suspend/other power-managment features) are disabled.
Sam Lantinga 503ea8e8 2021-08-25T14:41:58 Don't modify the Nintendo Switch home LED state by default
Ethan Lee 524964f9 2021-08-14T12:09:13 Add SDL_HINT_VIDEO_EGL_ALLOW_TRANSPARENCY
Sebastian Krzyszkowiak 2e6dac87 2021-08-09T01:47:42 wayland: Add a hint to allow disabling libdecor use Useful for testing xdg-shell path with compositors like Weston.
Ryan C. Gordon 736a424f 2021-07-27T13:12:57 pulseaudio: Optionally add "monitor" sources to device list. There's a new hint to enable this. Fixes #2917.
Sam Lantinga f1633127 2021-07-24T13:41:55 Added a window flash operation to be explicit about window flash behavior
Sam Lantinga e1c3a250 2021-07-24T12:11:27 Changed SDL_FlashWindow() so it doesn't take a flash count, and added the hint SDL_HINT_WINDOW_FLASH_COUNT to control behavior on Windows
Sam Lantinga 2147e7bf 2021-07-24T11:01:58 Sorted the hints alphabetically
Ryan C. Gordon c88eb7a8 2021-07-14T17:07:04 Sync wiki -> header.
Sam Lantinga 24059a19 2021-07-09T18:11:42 The RAWINPUT driver is no longer tied to HIDAPI in any way
Dimitriy Ryazantcev 17ed8d80 2021-07-07T16:05:35 Added HIDAPI backend for Amazon Luna Controller Model T28B69 connected via Bluetooth LE (VID:0171, PID:0419). To enter Bluetooth pairing mode hold B and Action (button with circle) buttons for 3 seconds. It works via usual HIDAPI if special filter driver is not installed: https://www.amazon.com/gp/help/customer/display.html?nodeId=GZCT4CTFHXLHEB9T With that driver installed it mimics Xbox One controller and works via XInput under Windows. Under DInput this controller is not usable at all.
Ryan C. Gordon e65a6583 2021-06-09T22:10:20 x11: Add a hint to force override-redirect. Fixes #3776.
Ryan C. Gordon e0068723 2021-04-04T00:23:52 hints: SDL_HINT_TIMER_RESOLUTION applies to all versions of Windows. Fixes #3654.
Ryan C. Gordon c486959e 2021-03-24T10:47:03 headers: Fix up bullet lists, now that wikiheaders.pl can handle them.
Ryan C. Gordon 3f40396d 2021-03-21T14:18:39 First shot at merging the wiki documentation into the headers.
Frank Praznik 2f0b99a7 2021-02-13T11:56:05 audio: Add Pipewire playback/capture sink
Cameron Gutman dfa64ead 2021-02-25T19:22:31 KMSDRM: Add hint to enable the backend without DRM master In some cases, it can be useful to have the KMSDRM backend even if it cannot be used for rendering. An app may want to use SDL for input processing while using another rendering API (such as an MMAL overlay on Raspberry Pi) or using its own code to render to DRM overlays that SDL doesn't support. This also moves the check for DRM master to an earlier point where we can fail initialization of the backend, rather than allowing the backend to initialize then failing the creation of a window later.
Cameron Gutman 79cd8cab 2021-01-27T20:41:36 Add default handler for Alt+Tab while keyboard grab is enabled By default, we will minimize the window when we receive Alt+Tab with a full-screen keyboard grabbed window to allow the user to escape the full-screen application. Some applications like remote desktop clients may want to handle Alt+Tab themselves, so provide an opt-out via SDL_HINT_ALLOW_ALT_TAB_WHILE_GRABBED=0.
Sam Lantinga ac72a2ba 2021-01-25T20:38:50 Fixed bug 5493 - Hint to let the user opt out of having Switch controllers' Home button lit when opened jibb New hint to let the user opt out of having Switch controllers' Home button lit when opened. This is more consistent with the Switch itself (which doesn't light the button normally) and may be preferred by users who may disconnect their controller without letting the application close it. I think this warrants a Switch-specific hint because the default behaviour is unusual (inconsistent with using a Switch controller on a Switch itself or with some other programs on PC), and because of that it's distinct from other lights (the player number on Switch controllers and the player colour on PlayStation controllers).
Sam Lantinga 1981d23f 2021-01-23T11:06:35 Fixed bug 5466 - Add haptic support for Stadia Controller Dimitriy Ryazantcev Consider adding support for Stadia Controller haptics. Here is example code how to deal with it: https://github.com/chromium/chromium/blob/99314be8152e688bafbbf9a615536bdbb289ea87/device/gamepad/hid_haptic_gamepad.cc#L45
JibbSmart 0f57864c 2021-01-18T19:57:29 Hint SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS added so we can recognise a Joy-Con as half a Pro Controller, so we can read its analog input and read its sensors just like we do a Pro Controller.
Cameron Gutman 6e97170e 2021-01-08T21:16:06 Use PS4 rumble hint as the default for the PS5 rumble hint Existing SDL applications may not know about the need to set a specific hint to enable rumble on PS5 controllers, even though they may already set the equivalent SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE hint for PS4 controller rumble support. Rather than requiring those developers update their apps, let's use the SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE value as an indication of the behavior they are expected for all PlayStation controllers.
Cameron Gutman 6cbd4417 2021-01-02T14:45:15 Add a hint for D3D9Ex to avoid having to choose at compile-time
Sam Lantinga 9130f7c3 2021-01-02T10:25:38 Updated copyright for 2021
Sam Lantinga 0684572c 2020-12-29T12:13:10 Added a hint to control whether the player LEDs should be lit to indicate which player is associated with a PS5 controller.
Joel Linn 8fc0baad 2020-12-28T11:43:11 Add SDL_cond implementation using Windows Condition Variables Is automatically used when the SRW SDL_mutex implementation is active. Otherwise falls back to the generic implementation. v2: - Rebase onto master fa3ea1051a4b