src


Log

Author Commit Date CI Message
Chris Mumford 98411c0d 2022-07-05T06:52:04 Added include: libkern/OSAtomic.h When building on macOS without gcc (e.g. clang) where HAVE_GCC_ATOMICS is not defined, `SDL_AtomicTryLock` will call `OSAtomicCompareAndSwap32Barrier` which is not yet declared. Including OSAtomic.h on OSX resolves this error/warning: SDL_spinlock.c:125:12: error: implicit declaration of function 'OSAtomicCompareAndSwap32Barrier' is invalid in C99 [-Werror,-Wimplicit-function-declaration] return OSAtomicCompareAndSwap32Barrier(0, 1, lock); This was reported in issue #3885 but marked Invalid and closed - possibly because the default CMake build uses gcc instead of clang.
Ryan C. Gordon fdb86b82 2022-07-04T12:48:32 x11: Don't try to use XInput2 multitouch if not supported. Fixes #5889.
rohlem b085c182 2022-07-04T16:38:05 make SDL_SetTextInputRect take a pointer to const The documentation doesn't state that the argument is ever modified, and no implementation does so currently. This is a non-breaking change to guarantee as much to callers.
Dav999-v 51f75b8b 2022-07-04T16:42:46 Fix fallback implementations of SDL_strchr and SDL_strrchr for '\0' strchr and strrchr return a pointer to the first/last occurrence of a character in a string, or NULL if the character is not found. According to the C standard, the final null terminator is part of the string, and it should thus be possible to get a pointer to the final null with these functions. The fallback implementations of SDL_strchr and SDL_strrchr would always return NULL if trying to find '\0', and this commit fixes that.
chalonverse 85bbf8ee 2022-07-03T12:19:33 Fixed coment after #endif
Francisco Javier Trujillo Mata 7d7c5b80 2022-06-29T01:26:27 Improving mkdir creating parents folder
chalonverse f317d619 2022-07-01T13:59:14 Xbox GDKX support (#5869) * Xbox GDK support (14 squashed commits) * Added basic keyboard testing * Update readme * Code review fixes * Fixed issue where controller add/removal wasn't working (since the device notification events don't work on Xbox, have to use the joystick thread to poll XInput)
Sam Lantinga 89624485 2022-07-01T13:32:56 Updated the test bitmap font to cover the Latin-1 character set Based on Marcel Sondaar's font8_8.asm, in the public domain
Sam Lantinga e9d5060c 2022-07-01T12:56:47 checkkeys will now render text that is input Also added test functions for multi-line debug text display Currently this only supports ASCII, as the font doesn't have the correct Latin-1 characters
Sam Lantinga bdbf90e3 2022-07-01T09:17:30 on-screen keyboard newline is reported as an Enter key
Sam Lantinga 7ac5d616 2022-07-01T08:58:08 Fixed backspace being delivered after committed text on Android 12 Testing: Enter "hello ", followed by "?" - the events generated are: : commitText hello : Key pressed : scancode 11 = H, keycode 0x00000068 = H modifiers: (none) : Key released: scancode 11 = H, keycode 0x00000068 = H modifiers: (none) : Key pressed : scancode 8 = E, keycode 0x00000065 = E modifiers: (none) : Key released: scancode 8 = E, keycode 0x00000065 = E modifiers: (none) : Key pressed : scancode 15 = L, keycode 0x0000006C = L modifiers: (none) : Key released: scancode 15 = L, keycode 0x0000006C = L modifiers: (none) : Key pressed : scancode 15 = L, keycode 0x0000006C = L modifiers: (none) : Key released: scancode 15 = L, keycode 0x0000006C = L modifiers: (none) : Key pressed : scancode 18 = O, keycode 0x0000006F = O modifiers: (none) : Key released: scancode 18 = O, keycode 0x0000006F = O modifiers: (none) : Key pressed : scancode 44 = Space, keycode 0x00000020 = Space modifiers: (none) : Key released: scancode 44 = Space, keycode 0x00000020 = Space modifiers: (none) : INPUT Text (\x68\x65\x6c\x6c\x6f\x20): "hello " : finishComposingText : deleteSurroundingText 1 / 0 : Key pressed : scancode 42 = Backspace, keycode 0x00000008 = Backspace modifiers: (none) : Key released: scancode 42 = Backspace, keycode 0x00000008 = Backspace modifiers: (none) : commitText ? : Key pressed : scancode 225 = Left Shift, keycode 0x400000E1 = Left Shift modifiers: LSHIFT : Key pressed : scancode 56 = /, keycode 0x0000002F = / modifiers: (none) : Key released: scancode 56 = /, keycode 0x0000002F = / modifiers: (none) : Key released: scancode 225 = Left Shift, keycode 0x400000E1 = Left Shift modifiers: (none) : INPUT Text (\x3f): "?" : setComposingText , at 1 : EDIT Text (): "" Previously, the backspace would be delivered after the "?"
Cameron Cawley 78089e65 2022-07-01T13:08:31 Remove unused internal header SDL_sysevents.h
Cameron Gutman 3e114872 2022-06-30T20:36:45 joystick: Fix redetection of HIDAPI joysticks after reinitializing The HIDAPI joystick driver doesn't properly reset the change counter it uses to track if re-enumeration is needed when the joystick subsystem is quit and then reinitialized. The first SDL_Init(SDL_INIT_JOYSTICK) will result in the expected HIDAPI joysticks appearing, but subsequent calls will result in no joysticks being enumerated until another HIDAPI joystick is added or removed from the system.
chalonverse 4f732197 2022-06-30T00:25:26 Fixed D3D12 renderer not working with batching, and got rid of the vertex buffer size limit
Sam Lantinga 0ad65277 2022-06-29T17:26:09 Refactored code to send scancodes for an ASCII on-screen keyboard key
Francisco Javier Trujillo Mata a054a5f7 2022-06-29T01:09:17 Improve SDL2 main, adding memory card and usb drivers
Jade Macho 6a2e6c82 2022-06-28T21:03:16 Add SDL_HINT_DIRECTINPUT_ENABLED (on by default)
Sam Lantinga 1d1fb95a 2022-06-28T06:21:45 Removed double va_end()
Sylvain f815580d 2022-06-28T13:09:38 Fix SIGSEV in SDL_error. Re-apply same pattern on this uncompiled code (see #5795)
Sylvain d4e6047e 2022-06-28T09:46:12 Fix SIGSEV in SDL_error (After removing the limit on the size of the SDL error message) (see #5795)
Sourcery AI cddf095a 2022-06-27T05:00:43 'Refactored by Sourcery'
Sam Lantinga b6f1c918 2022-06-27T17:44:55 Fixed Watcom C build
Sam Lantinga cbd01874 2022-06-27T16:59:50 Removed the limit on the size of the SDL error message Also added SDL_GetOriginalMemoryFunctions() Fixes https://github.com/libsdl-org/SDL/issues/5795
Pierre Wendling f25b4b27 2022-06-27T16:57:21 Style: Flip `if` statement.
Pierre Wendling 6c536afd 2022-06-27T15:43:17 Fix C89 declaration for macOS modules. Since Clang 14, `-Wdeclaration-after-statement` is enforced on every standard.
Francisco Javier Trujillo Mata e4a80875 2022-06-24T16:43:20 Initial Audio driver
Brad Smith 97239176 2022-06-25T23:33:53 Use proper header for OpenBSD PPC CPU detection
chalonverse 3b191580 2022-06-27T17:19:39 Windows GDK Support (#5830) * Added GDK * Simplfied checks in SDL_config_wingdk.h * Added testgdk sample * Added GDK readme * Fixed error in merge of SDL_windows.h * Additional GDK fixes * OpenWatcom should not export _SDL_GDKGetTaskQueue * Formatting fixes * Moved initialization code into SDL_GDKRunApp
Sylvain 314bb5a1 2022-06-27T14:45:14 Fixed bug #5850: Android EGL_BAD_ACCESS because of viewport command while turning the screen off/on.
Francisco Javier Trujillo Mata 7fd46ec5 2022-06-18T17:40:53 Initial PS2_Joystick implementation
Francisco Javier Trujillo Mata 84d69da4 2022-03-20T19:42:06 Initial SDL_ps2_main implementation
Ivan Epifanov b2f07d94 2022-06-26T15:53:13 Vita: create rendertarget color surface with same format as texture. Fixes #5844
unknown ebe4f47f 2022-06-26T19:04:25 Fixed __VA_ARGS__ in gcc when no args
unknown 51c6488f 2022-06-26T18:47:34 Add support for SDL_render_d3d12.c to compile in C++ mode
Francisco Javier Trujillo Mata 2b41f497 2021-11-18T01:09:45 Improve Joystick removing semaphores
Francisco Javier Trujillo Mata c3a5e4aa 2022-06-22T00:54:03 Adding GetGamepadMapping to Vita Joystick driver
Ozkan Sezer 7adb08a7 2022-06-22T01:37:00 fixed SDL_BlitMap typedef redefinition errors
Ryan C. Gordon 12b371ee 2022-06-21T14:49:00 x11: Don't send diplay-add events for displays connected at init time. Reference Issue #4977.
Frank Praznik c11bdeeb 2022-06-21T13:28:14 wayland: Round fractional backbuffer sizes halfway away from zero Use SDL_lroundf() to round fractional backbuffer sizes halfway away from zero, as this is the rounding method recommended by the forthcoming Wayland fractional scaling protocol.
Pieter-Jan Briers 9914e87f 2022-06-20T12:53:10 Also send DPI change when expected resize.
Pieter-Jan Briers af733c7a 2022-06-20T02:26:40 Fix DPI-raised SDL_WINDOWEVENT_SIZE_CHANGED with event callback. Move the sending of this event down so stuff like calling SDL_GL_GetDrawableSize() from a callback reports the new size instead of the old one.
Ozkan Sezer 2316e568 2022-06-19T11:32:10 SDL_windows.h: match WINVER value to _WIN32_WINNT.
Ozkan Sezer 22a29321 2022-06-19T11:32:10 tweak _WIN32_WINNT value for shellscalingapi.h present but no d3d12
Sam Lantinga abe38bca 2022-06-18T13:08:58 Support SDL_AUDIODRIVER set to "dsound", which was used by SDL 1.2 Fixes https://github.com/libsdl-org/SDL/issues/5818
Ozkan Sezer a8d41b3b 2022-06-18T21:51:32 check for shellscalingapi.h presence instead of WINVER >= 0x0603
Sam Lantinga 5f6d0abe 2022-06-18T12:57:27 SDL_SendEditingText() has int parameters, so use that type for parameter calculation We might want to use ssize_t as @Guldoman suggested, but that's a larger internal API change, and still requires casting of the SDL_utf8strnlen() result. Fixes https://github.com/libsdl-org/SDL/pull/5821
Mathieu Eyraud 00b95e98 2022-06-18T16:59:35 Fix read of uninitialised variable If the condition (dbus->message_iter_get_arg_type(&sub) == DBUS_TYPE_STRING) is false, subtext is not initialised.
Sam Lantinga 12f14bdb 2022-06-18T07:02:38 Fixed digit count in sscanf, e.g. "%1x"
Sam Lantinga 53e30705 2022-06-18T06:52:16 List the available tests if the filter didn't match
Sam Lantinga eb7e29a8 2022-06-17T17:43:14 Fixed crash when the joystick product name isn't available
Sam Lantinga adc68758 2022-06-17T10:22:28 Added SDL_copyp to avoid size mismatch when copying values (thanks @1bsyl!) Closes https://github.com/libsdl-org/SDL/pull/5811
Sam Lantinga b0e827fb 2022-06-17T07:55:33 Enable improved rumble emulation on DualSense(tm) Wireless Controllers with firmware version 2.24 and newer
Sam Lantinga 1eb247fa 2022-06-16T15:44:18 Fixed building D3D12 renderer with latest mingw-64
Sam Lantinga b004133f 2022-06-16T12:49:17 Updated to version 2.23.1 for pre-release checkpoint
Sam Lantinga a5949d7b 2022-06-15T23:00:28 Fixed crash on Windows These functions really are WINAPI
Sam Lantinga 16f55fbd 2022-06-15T20:44:43 Separate the controller protocol from the controller style This allows us to handle controllers that use the Xbox protocol but look like Nintendo Switch or Playstation controllers, like the Qanba Dragon Arcade Stick in PC mode
Sam Lantinga 017e2370 2022-06-15T17:32:46 Removed the Qanba Obsidian Arcade Joystick from the unknown controller list
Sam Lantinga a9cf313e 2022-06-15T17:28:29 Added the Qanba Obsidian and Dragon Arcade Sticks to the arcade stick list
Sam Lantinga bfe81a0c 2022-06-15T17:28:20 Added the name of the Qanba Obsidian Arcade Joystick in PC mode
Sam Lantinga a6a2cdbd 2022-06-15T17:28:18 Added the name of the Qanba Dragon Arcade Joystick in PC mode
Francisco Javier Trujillo Mata 6b03c1ad 2022-06-13T20:59:18 Add filesystem driver
Francisco Javier Trujillo Mata 52f00833 2022-06-13T20:58:18 Add Thread drivers
Francisco Javier Trujillo Mata 217d3a6d 2022-06-13T20:35:27 Add systimer support
Francisco Javier Trujillo Mata 7343ece8 2022-06-06T00:05:43 Define available PS2 RAM
Francisco Javier Trujillo Mata e4409f67 2022-06-06T00:05:20 Include SDL_Log driver
Francisco Javier Trujillo Mata f0a05ed4 2022-06-06T00:04:56 Add some PS2 flags
Francisco Javier Trujillo Mata 273d9e46 2022-06-06T00:00:45 Fix atomic support for PS2
Anonymous Maarten ae7446a9 2022-06-15T20:48:54 stlib: Extract SDL_memcpy and SDL_memset to its own file respectively This is done such that we can disable LTO for these 2 functions when building with MSVC. This is due to a limitation of Link Time Code Generation (LTCG). Code generation might generate a new reference to memset after linking has started. The LTCG must make assumptions about where memset is defined which is normally the C runtime.
Sam Lantinga a5d338bd 2022-06-15T14:11:00 Added support for the Qanba Dragon Arcade Joystick (PS3) on macOS
Sam Lantinga 7d7c4830 2022-06-15T14:10:22 Use python3 for sort_controllers.py
Sam Lantinga 72fea0ed 2022-06-15T13:58:28 Added support for the Qanba Dragon Arcade Joystick
takase1121 f8ae3ef1 2022-06-15T22:01:59 wayland: use libdecor resize edge enums for libdecor
Ozkan Sezer 960b86dc 2022-06-14T01:56:40 update SDL_render_d3d12.c after DPI scaling/highdpi support patch. See https://github.com/libsdl-org/SDL/pull/5778#issuecomment-1153006938
Ryan C. Gordon ded6c22e 2022-06-14T14:09:13 render: Corrected wrong SDL_memcpy() sizes for viewport, cliprect. Fixes #5786.
Frank Praznik e427e80b 2022-06-14T10:41:18 wayland: Use the output descriptions from xdg-output when available Some compositors will provide 'nicer' / 'human readable' output descriptions via the xdg-output protocol. Use these description strings, when available, instead of the model name provided by wl-output. On compositors such as GNOME where this is provided, the display names provided to applications by SDL will now match those in the desktop display settings panel. On compositors where this data isn't provided, the old behavior of using the model string provided by wl-output will remain unchanged. Additionally, per the protocol spec, output data provided by xdg-output should supersede wl-output data, so this is the recommended behavior in general.
Ozkan Sezer 714502d3 2022-06-13T22:15:56 minor windows warning fixes.
Simon McVittie 507ce36d 2022-05-10T10:35:06 video: Note unused SDL_surface creation parameters for removal in SDL 3 Signed-off-by: Simon McVittie <smcv@collabora.com>
Simon McVittie 535fdc3a 2022-05-10T10:34:41 video: Detect and reject nonsense SDL_surface dimensions Signed-off-by: Simon McVittie <smcv@collabora.com>
Simon McVittie 8c9f7104 2022-05-10T10:33:54 video: Harden calculation of SDL_surface pitch and size against overflow If the width is sufficiently ludicrous, then the calculated pitch or the image size could conceivably be a signed integer overflow, which is undefined behaviour. Calculate in the unsigned size_t domain, with overflow checks. Signed-off-by: Simon McVittie <smcv@collabora.com>
Simon McVittie 63b3b9a5 2022-06-13T16:02:40 Fix some typos in diagnostic messages Detected by Debian's packaging QA tool, Lintian. Signed-off-by: Simon McVittie <smcv@collabora.com>
Ryan C. Gordon 9a036767 2022-06-12T15:28:49 windows: Get better name for the physical display, for Vista and later. Fixes #5321.
Cameron Cawley fd8cafc7 2022-06-11T17:11:55 Rename variables in SDL_egl.c to be more intuitive
Eric Wasylishen e09551bc 2022-06-09T02:22:21 Fix WinRT build
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 448e05e3 2022-06-05T12:51:57 add DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED define
Eric Wasylishen 1b797957 2022-06-05T12:36:58 SDL_windowsvideo.c: add HIGHDPI_DEBUG ifdef, print DPI awareness at startup if defined document some additional quirks
Eric Wasylishen 1488c408 2022-06-05T12:01:32 WM_DPICHANGED: remove some dead code, add comment
Eric Wasylishen 60ef11b3 2022-06-03T00:21:36 Fix Watcom compile errors
Eric Wasylishen d3b970d4 2022-05-29T21:56:37 HighDPI: remove SWP_NOSIZE in WIN_SetWindowPosition If the move results in a DPI change, we need to allow the window to resize (e.g. AdjustWindowRectExForDpi frame sizes are different). - WM_DPICHANGED: Don't assume WM_GETDPISCALEDSIZE is always called for PMv2 awareness - it's only called during interactive dragging. - WIN_AdjustWindowRectWithStyle: always calculate final window size including frame based on the destination rect, not based on the current window DPI. - Update wmmsg.h to include WM_GETDPISCALEDSIZE (for WMMSG_DEBUG) - WIN_AdjustWindowRectWithStyle: add optional logging - WM_GETMINMAXINFO: add optional HIGHDPI_DEBUG logging - WM_DPICHANGED: fix potentially clobbering data->expected_resize Together these changes fix the following scenario: - launch testwm2 with the SDL_WINDOWS_DPI_AWARENESS=permonitorv2 environment variable - Windows 10 21H2 (OS Build 19044.1706) - Left (primary) monitor: 3840x2160, 125% scaling - Right (secondary) monitor: 2560x1440, 100% scaling - Alt+Enter, Alt+Enter (to enter + leave desktop fullscreen), Alt+Right (to move window to right monitor). Ensure the window client area stays 640x480. Drag the window back to the 125% monitor, ensure client area stays 640x480.
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
Cameron Gutman 81d3addd 2022-06-11T12:59:33 events: Fix spurious early returns from SDL_WaitEvent()/SDL_WaitEventTimeout() Fixes #5780
Nhalrath b3260e7e 2022-06-11T23:34:20 Remove macro definition for SDL_ERRBUFIZE I was looking at how errors are handled by SDL and came across this #define SDL_ERRBUFIZE which looks like a typo for SDL_ERRBUFSIZE, but either way, it looks like this isn't being used anywhere anymore because it was getting reported whenever I compile SDL with -Wunused-macros, and the last time it was mentioned in the code was from commit 09ca66b.
Frank Praznik 4a3277b0 2022-05-19T15:13:02 wayland: Always commit window constraints before entering fullscreen XDG-toplevel min/max size values are double-buffered data and must be committed before entering the fullscreen state, or a max window size value smaller than the display dimensions may cause the compositor to incorrectly configure the fullscreen window size. This fixes windowed->fullscreen transitions on GNOME, where, previously, certain combinations of window flags and min/max size values could cause entering fullscreen mode to fail with odd window sizes and/or offsets due to the new max size values not being committed before entering fullscreen, causing the compositor to clamp to the old values. In the case of libdecor, it has its own layer of buffering on top of the xdg-toplevel surface for the min/max window dimensions, so both a frame commit and surface commit are required to set the state properly.
Frank Praznik 78698a0b 2022-05-17T12:37:16 wayland: Use a separate frame callback for setting the surface damage region Previously, the surface damage region was being set in the same callback used for preventing render hangs in the GL backend when the surface was not visible. This was not ideal, as the callback was never fired in the case of using a different render backend or having a swap interval of 0. Use a separate frame callback for setting the surface damage region to ensure that it fires reliably, regardless of the backend being used or swap interval.
Frank Praznik 146ea9b0 2022-05-16T18:18:55 wayland: Only set the surface opaque region if EGL transparency is disabled Check if the "SDL_VIDEO_EGL_ALLOW_TRANSPARENCY" hint is enabled and don't mark surfaces as opqaue if it is.
Frank Praznik a20516d4 2022-05-16T10:35:56 wayland: Swap emulated mode dimensions in more cases Some compositors (GNOME for example) don't set the transform flag when dealing with portrait mode displays, so the video modes won't have the width/height swapped in all cases where they should be. Check for both the 90/270 degree transform flag and if the display is taller than it is wide when determining whether to swap the width and height of the emulated video modes, and adjust the comparison logic when size testing against the native mode to account for this.
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.
Frank Praznik e9d3dcea 2022-05-14T18:32:05 wayland: Unify integer and fractional output scaling Previously, scale values used by the displays and surfaces were always integers, with fractional scale values only being calculated when the backbuffer and viewport sizes were being determined. Now, if xdg-output is available, the fractional scale of output displays is calculated when the displays are enumerated and the true scale values of the output devices are used whenever possible. This unifies the integer and fractional scaling systems, allows for the use of more accurate scale values that minimize overdraw when windows straddle multiple outputs, and lays the groundwork for the pending Wayland scaling protocols that will report the preferred scale values per-surface instead of per-output.
Frank Praznik 4fde7dd8 2022-05-14T14:42:52 wayland: Refactor the Wayland mode emulation and viewport logic Compartmentalize the fullscreen mode emulation code blocks, unify the windowed/fullscreen viewport logic, consolidate all window geometry code into a central function to eliminate blocks of duplicate code and rename related variables and functions to more explicitly reflect their purpose.
Sam Lantinga ce576323 2022-06-10T12:42:45 The backlight event is "change", not "add" or "remove"