include/SDL_hints.h


Log

Author Commit Date CI Message
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
Joel Linn d0b8295c 2020-12-23T13:36:46 Add SDL_sem implementation using Atomics and WaitOnAddress API. Keep Semaphore Kernel Object impl for Windows 7 and older - choose at runtime v2: - Fix mixed int/LONG types - Reorder definitions - Add missing include v3: - Use `GetModuleHandle()` to load the API Set
Joel Linn 548cb908 2020-12-23T13:33:36 Add SDL_mutex implementation using Windows Slim Reader/Writer Locks Keep Critical Section impl for Windows XP/Vista - choose at runtime v2: - Add SRW definitions as suggested by Ozkan Sezer Allows building against older platform headers. - Rename "hidden" function parameter `mutex_` to `_mutex` v3: - Use GetModuleHandle instead of LoadLibrary - Fix typo in comment
Sam Lantinga 4ec776c3 2020-12-22T13:29:23 Don't switch the PS5 controller out of DirectInput mode by default
Sam Lantinga 5f7cd1fa 2020-12-18T10:08:59 Added hints to control whether SDL updates joystick and sensor state in the main event loop
Sam Lantinga ce7c751c 2020-12-12T23:54:40 Document that the joystick deadzone hint defaults off
Sam Lantinga 13a4caf1 2020-12-12T22:08:02 Fixed bug 4286 - Joystick subsystem causes "not responding" when app is in the background Added a hint to control whether a separate thread should be used for joystick events. This is off by default because dispatching messages in other threads appears to cause problems on some versions of Windows.
Sam Lantinga 0500c044 2020-11-12T07:53:05 Fix SDL_HINT_THREAD_FORCE_REALTIME_TIME_CRITICAL also applying to HIGH priorities As the name suggests, the hint should only apply to SDL_THREAD_PRIORITY_TIME_CRITICAL The resulting priorities for my current distro result in these values: | High | Time Critical Hint |--------------|----------------- 0 | P=10 N=-10 | P=5 N=-15 1 | P=10 N=-10 | P=-21 N=0
Sam Lantinga 07eae7d6 2020-11-11T08:47:18 Fix process randomly getting killed when SDL_THREAD_PRIORITY_HIGH/TIME_CRITICAL is set When we request realtime priority from rtkit, we have a rttime limit. If we exceed that limit, the kernel will send SIGKILL to the process to terminate it. This isn't something that most high priority processes will want, only processes that selectively opt into SCHED_RR/FIFO through SDL_HINT_THREAD_PRIORITY_POLICY should be subject to this level of scrutiny. This change: * Switches non-apple posix OSs to use SCHED_OTHER instead of SCHED_RR for SDL_THREAD_PRIORITY_HIGH/SDL_THREAD_PRIORITY_TIME_CRITICAL. * Fixes using a hardcoded RLIMIT_RTTIME, instead queries it from rtkit * Only sets RLIMIT_RTTIME for MakeRealtime rtkit requests * Adds a note regarding the possible SIGKILL with SDL_HINT_THREAD_PRIORITY_POLICY * Introduces SDL_HINT_THREAD_FORCE_REALTIME_TIME_CRITICAL to allow apps to acquire realtime scheduling policies on Linux
Sam Lantinga a22beef4 2020-11-05T17:03:28 Moved the PS5 controller driver to a separate file, as the advanced feature protocol is very different from that of the PS4
Sylvain Becker 955f3184 2020-09-25T10:14:42 Fixed bug 5239 - Play audio on Android while backgrounded (Thanks Superfury) Add hint SDL_HINT_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO not to pause audio when the app goes to background. (It requires SDL_ANDROID_BLOCK_ON_PAUSE as "Non blocking")
Kai Krakow c3ecf18c 2020-07-21T23:38:42 Linux: Add hint for disabling deadzones
Sylvain Beucler e594a673 2020-06-27T16:25:47 emscripten: Introduce SDL_HINT_EMSCRIPTEN_ASYNCIFY See https://github.com/emscripten-core/emscripten/issues/10746 and https://github.com/emscripten-ports/SDL2/pull/112 Fixes Bugzilla #4997.
Ryan C. Gordon 1947ca70 2020-06-26T20:16:43 video: Changed SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS to default to FALSE. Fixes Bugzilla #5106. (and probably many others, too!)
Sam Lantinga abd58418 2020-05-26T13:19:19 Make some changes to SDL_SetThreadPriority to try and have SDL transparently handle more of the work. 1. Comment that SDL_SetThreadPriority will make any necessary system changes when applying priority. 2. Add a hint to override SDL's default behavior for scheduler policy. 3. Modify the pthreads SDL_SetThreadPriority so that instead of just using the current thread scheduler policy it will change it to a policy that should work best for the requested priority. 4. Add hint checks in SDL_SetThreadPriority so that #3 can be overridden if desired. 5. Modify the Linux SDL_SetThreadPriority so that in the case that policy, either by SDL defaults or from the hint, is a realtime policy it uses the realtime rtkit API. 6. Prior to calling rtkit on Linux make the necessary thread state changes that rtkit requires. Currently this is done every time as it isn't expected that SDL_SetThreadPriority will be called repeatedly for a thread.
Ryan C. Gordon fa23e3d0 2020-05-04T02:27:29 locale: Implemented SDL_GetPreferredLocales(). This was something I proposed a long time ago, Sylvain Becker did additional work on it, then back to me. Fixes Bugzilla #2131.
Ryan C. Gordon 8601996f 2020-05-03T22:13:48 hints: Allow specifying audio device metadata. This is only supported on PulseAudio. You can set a description when opening your audio device that will show up in pauvcontrol, which lets you set per-stream volume levels. Fixes Bugzilla #4801.
Ryan C. Gordon 11fef299 2020-05-03T20:56:18 hints: Fixed a doxygen comment.
Sam Lantinga b6eb09ff 2020-03-20T15:55:02 Updated documentation so people know to set the SDL_HINT_NO_SIGNAL_HANDLERS hint before SDL_Init()
Sam Lantinga 4dea340c 2020-03-16T12:23:38 Fixed bug 4477 - Support more than 4 XInput-capable devices on Windows Jimb Esser Add new RawInput controller API, and improved correlation with XInput/WGI Reorder joystick init so drivers can ask the others if they handle a device reliably Do not poll disconnected XInput devices (major perf issue) Fix various cases where incorrect correlation could happen Simple mechanism for propagating unhandled Guide button presses even before guaranteed correlation Correlate by axis motion as well as button presses Fix failing to zero other trigger Fix SDL_HINT_JOYSTICK_HIDAPI not working if set before calling SDL_Init() Add missing device to device names Disable RawInput if we have a mismatch of XInput-capable but not RawInput-capable devices Updated to SDL 2.0.13 code with the following notes: New HID driver: xbox360w - no idea what that is, hopefully urelated SDL_hidapijoystick.c had been refactored to couple data handling logic with device opening logic and device lists caused some problems, yields slightly uglier integration than previously when the 360 HID device driver was just handling the data. SDL_hidapijoystick.c now often pulls the device off of the joystick_hwdata structure for some rumble logic, but it appears that code path is never reached, so probably not a problem. Looks like joystick_hwdata was refactored to not include a mutex in other drivers, maintainers may want to do the same refactor here if that's useful for some reason. Something changed in how devices get names, so getting generic names. Had to fix a (new?) bug where removing an XInput controller caused existing controllers (that moved to a new XInput index) to get identified as 0x045e/0x02fd ("it's probably Bluetooth" in code), rendering the existing HIDAPI_IsDevicePresent and new RAWINPUT_IsDevicePresent unreliable.
Sam Lantinga 4572dd2a 2020-03-02T10:37:28 Fixed bug 4854 - Add a way to extend the values in controller_type.h Added a hint SDL_HINT_GAMECONTROLLERTYPE to allow overriding the built-in controller type database
Sam Lantinga 4b585e75 2020-02-03T08:06:52 Fixed bug 4833 - Use EGL for X11? Martin Fiedler To be precise, this is about *desktop OpenGL* on X11. For OpenGL ES, EGL is already used (as it's the only way to get an OpenGL ES context), as Sylvain noted above. To shine some light on why this is needed: In 99% of all cases, using GLX on X11 is fine, even though it's effectively deprecated in favor of EGL [1]. However, there's at least one use case that *requires* the OpenGL context being created with EGL instead of GLX, and that's DRM_PRIME interoperability: The function glEGLImageTargetTexture2DOES simply doesn't work with GLX. (Currently, Mesa actually crashes when trying that.) Some example code: https://gist.github.com/kajott/d1b29c613be30893c855621edd1f212e Runs on Intel and open-source AMD drivers just fine (others unconfirmed), but with #define USE_EGL 0 (i.e. forcing it to GLX), it crashes. The same happens when using SDL for window and context creation. The good news is that most of the pieces for EGL support on X11 are already in place: SDL_egl.c is pretty complete (and used for desktop OpenGL on Wayland, for example), and SDL_x11opengl.c has the aforementioned OpenGL-ES-on-EGL support. However, when it comes to desktop OpenGL, it's hardcoded to fall back to GLX. I'm not advocating to make EGL the default for desktop OpenGL on X11; don't fix what ain't broken. But something like an SDL_HINT_VIDEO_X11_FORCE_EGL would be very appreciated to make use cases like the above work with SDL. [1] source: Eric Anholt, major Linux graphics stack developer, 7 years ago already - see last paragraph of https://www.phoronix.com/scan.php?page=news_item&px=MTE3MTI
Ryan C. Gordon b4c2e29e 2020-01-27T10:58:30 video: Added a hint to override the display's usable bounds.
Sam Lantinga a8780c6a 2020-01-16T20:49:25 Updated copyright date for 2020
Sam Lantinga e22e77da 2019-12-19T15:01:35 Added an untested driver for the Nintendo GameCube adapter, based on code contributed by Ethan Lee
Sam Lantinga 54748a39 2019-12-08T11:33:06 Fixed bug 4890 - Add hint for SDL that the graphics context is externally managed Aaron Barany Add SDL_HINT_VIDEO_EXTERNAL_CONTEXT hint to notify SDL that the graphics context is external. This disables the automatic context save/restore behavior on Android and avoids using OpenGL by default when SDL_WINDOW_VUKLAN isn't set. When the application wishes to manage the OpenGL contexts on Android, this avoids cases where SDL unbinds the context and creates new contexts, which can interfere with the application's operation. When using Vulkan and Metal renderer implementations, this avoids SDL forcing OpenGL to be enabled on certain platforms. While using the SDL_WINDOW_VULKAN flag can be used to achieve the same thing, it also causes Vulkan to be loaded. If the application uses Vulkan directly, this is not necessary, and fails window creation when using Metal due to Vulkan not being present. (assuming MoltenVK isn't installed)
Sam Lantinga 9a76bebf 2019-11-13T14:24:48 SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS defaults to true, to match Steam's default behavior
Sam Lantinga b3470f04 2019-10-17T17:32:47 Added the hint SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS to control whether Nintendo Switch controllers use their button labels or button positions for game controller button reporting.
hmk 0918903f 2019-09-30T22:54:16 render: add a hint for toggling relative scaling Fixes Bugzilla #4811.
Sam Lantinga e5580e18 2019-09-04T09:27:58 x11: add a hint to force the VisualID used when creating a window.
Sam Lantinga be6cda9f 2019-06-19T15:54:21 Rolling back GameCube HIDAPI support It causes the HIDAPI devices to always be opened on enumeration, which causes crashes in the Windows drivers when multiple applications are reading and writing at the same time. We can revisit this after 2.0.10 release.
Sam Lantinga 762b788f 2019-06-09T12:46:10 Cleanup on bug 3894 - Fuzzing crashes for SDL_LoadWAV Simon Hug Attached is a minor cleanup patch. It changes the option name of one hint to something better, puts one or two more checks in, and adds explicit casting where warnings could appear otherwise. I hope the naming of the hints and their options is acceptable. It would be kind of awkward to change them after they get released with an official SDL version.
Sam Lantinga 990e166a 2019-06-08T19:02:42 Fixed bug 3894 - Fuzzing crashes for SDL_LoadWAV Simon Hug I had a look at this and made some additions to SDL_wave.c. The attached patch adds many checks and error messages. For some reason I also added A-law and ?-law decoders. Forgot exactly why... but hey, they're small. The WAVE format is seriously underspecified (at least by the documents that are publicly available on the internet) and it's a shame Microsoft never put something better out there. The language used in them is so loose at times, it's not surprising the encoders and decoders behave very differently. The Windows Media Player doesn't even support MS ADPCM correctly. The patch also adds some hints to make the decoder more strict at the cost of compatibility with weird WAVE files. I still think it needs a bit of cleaning up (Not happy with the MultiplySize function. Don't like the name and other SDL code may want to use something like this too.) and some duplicated code may be folded together. It does work in this state and I have thrown all kinds of WAVE files at it. The AFL files also pass with it and some even play (obviously just noise). Crafty little fuzzer. Any critique would be welcome. I have a fork of SDL with a audio-loadwav branch over here if someone wants to use the commenting feature of Bitbucket: https://bitbucket.org/ChliHug/SDL I also cobbled some Lua scripts together to create WAVE test files: https://bitbucket.org/ChliHug/gendat
Sam Lantinga 9eac91dd 2019-04-05T08:10:12 Set SDL_HINT_MOUSE_TOUCH_EVENTS for iPhone and iPad as well
Sylvain Becker 05333a6e 2019-04-05T09:16:30 Android: add hint SDL_HINT_ANDROID_BLOCK_ON_PAUSE to set whether the event loop will block itself when the app is paused.
Sylvain Becker b470cd9b 2019-04-05T08:36:31 Android: default SDL_HINT_MOUSE_TOUCH_EVENTS to 1 as previous behaviour