|
f8ae3ef1
|
2022-06-15T22:01:59
|
|
wayland: use libdecor resize edge enums for libdecor
|
|
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
|
|
ded6c22e
|
2022-06-14T14:09:13
|
|
render: Corrected wrong SDL_memcpy() sizes for viewport, cliprect.
Fixes #5786.
|
|
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.
|
|
714502d3
|
2022-06-13T22:15:56
|
|
minor windows warning fixes.
|
|
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>
|
|
535fdc3a
|
2022-05-10T10:34:41
|
|
video: Detect and reject nonsense SDL_surface dimensions
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
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>
|
|
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>
|
|
9a036767
|
2022-06-12T15:28:49
|
|
windows: Get better name for the physical display, for Vista and later.
Fixes #5321.
|
|
fd8cafc7
|
2022-06-11T17:11:55
|
|
Rename variables in SDL_egl.c to be more intuitive
|
|
e09551bc
|
2022-06-09T02:22:21
|
|
Fix WinRT build
|
|
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.
|
|
448e05e3
|
2022-06-05T12:51:57
|
|
add DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED define
|
|
1b797957
|
2022-06-05T12:36:58
|
|
SDL_windowsvideo.c: add HIGHDPI_DEBUG ifdef, print DPI awareness at startup if defined
document some additional quirks
|
|
1488c408
|
2022-06-05T12:01:32
|
|
WM_DPICHANGED: remove some dead code, add comment
|
|
60ef11b3
|
2022-06-03T00:21:36
|
|
Fix Watcom compile errors
|
|
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.
|
|
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
|
|
81d3addd
|
2022-06-11T12:59:33
|
|
events: Fix spurious early returns from SDL_WaitEvent()/SDL_WaitEventTimeout()
Fixes #5780
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
ce576323
|
2022-06-10T12:42:45
|
|
The backlight event is "change", not "add" or "remove"
|
|
68544be4
|
2022-06-10T11:31:59
|
|
Added support for the Nintendo Online controllers
|
|
b75cd2b3
|
2022-06-10T14:12:03
|
|
x11: Force window back to expected size after SDL_SetWindowBordered.
This helps if the window manager decided to let it fill the space that
an existing border was using before its removal.
Fixes #5718.
|
|
51db7754
|
2022-06-10T06:23:20
|
|
updated windows watcom exports file after last commit.
|
|
9202df04
|
2022-06-09T18:11:34
|
|
Implemented SDL_GameControllerGetFirmwareVersion() for HIDAPI PS5 controllers
|
|
e5a3acd6
|
2022-05-05T04:01:05
|
|
ime: fcitx: Retrieve cursor position and selection
Also, if `SDL_HINT_IME_SUPPORT_EXTENDED_TEXT` is enabled, make use of
`SDL_TEXTEDITING_EXT` by sending the full preedit string.
|
|
dd7bed9e
|
2022-05-05T03:10:35
|
|
ime: ibus: Retrieve cursor position and selection
Also, if `SDL_HINT_IME_SUPPORT_EXTENDED_TEXT` is enabled, make use of
`SDL_TEXTEDITING_EXT` by sending the full preedit string.
|
|
d11702ce
|
2022-05-05T02:34:16
|
|
ime: wayland: Make use of `SDL_TEXTEDITING_EXT`
Because we were sending multiple chunks of preedit strings,
`SDL_SendEditingText` was using the old `SDL_TEXTEDITING` event only.
Now if `SDL_HINT_IME_SUPPORT_EXTENDED_TEXT` is enabled, we send the full
string and correctly set the cursor position and selection size.
|
|
74bcc5a0
|
2022-05-05T02:23:05
|
|
stdlib: Add `SDL_utf8strnlen`
|
|
c7f41038
|
2022-06-09T13:47:29
|
|
Special case for k_eControllerType_XInputSwitchController in the raw input path
|
|
e6cb0822
|
2022-06-09T13:20:38
|
|
Fixed the default mapping on Windows for the HORI Fighting Commander
|
|
0a93ac12
|
2022-05-08T18:06:47
|
|
Work around the lack of clock() on PS Vita
|
|
6f69bbc5
|
2022-06-08T12:38:43
|
|
D3D11: Fix SDL_TEXTUREACCESS_TARGET not working if SDL_HAVE_YUV was 0
Added a couple of missing SDL_zeros in CreateTexture
|
|
8303c5d0
|
2022-06-08T12:37:36
|
|
Added missing SDL_zero for renderTargetViewDesc
|
|
d58d637a
|
2022-06-08T11:07:36
|
|
Added support for the Qanba Obsidian Arcade Joystick on Linux
|
|
0fcfaf9e
|
2022-06-08T14:20:50
|
|
emscripten: use MAIN_THREAD_EM_ASM for the fb/cursor proxying
This is how everything else was handled and fixes undefined symbol
errors in non-threads builds.
|
|
7a335df9
|
2022-06-07T16:11:25
|
|
Updated CMakeLists.txt and configure.asc/script so that it checks for the required Windows SDK version before it enables the d3d12 renderer. Also fixed reported warnings in some builds.
|
|
2cc22604
|
2022-06-07T16:30:01
|
|
Fixed bug #5768 - SDL_RenderGeometry's software backend failed to render when texture coordinates are reversed
handle flip vertical/horizontal when reconstructing rects from triangles
|
|
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>
|
|
63e12cf6
|
2022-06-06T22:55:56
|
|
SDL_windows_main.c: replace CopyMemory() with SDL_memcpy()
|
|
ec0204d2
|
2022-06-06T14:38:26
|
|
x11: Don't use GetXftDPI() when XRandR can tell us the DPI per-output.
Fixes #5764.
|
|
61115aeb
|
2022-06-06T19:29:56
|
|
update dynapi after the loongarch support patch
|
|
50d8642f
|
2022-06-06T20:18:38
|
|
Add optimiztion function with LSX in LoongArch
1. yuv420_rgb24_lsx
1. yuv420_rgba_lsx
2. yuv420_bgra_lsx
3. yuv420_argb_lsx
4. yuv420_abgr_lsx
|
|
17f63e53
|
2022-05-31T19:10:05
|
|
Add loongarch support
LSX and LASX are enabled by default if compiler supports them.
|
|
9703f236
|
2022-06-06T10:54:16
|
|
SDL_SetHintWithPriority: actually, this test is good.
Otherwise, we end up calling the callback if both the old and new value
are NULL.
This reverts commit 5f25a6ea78605f9f5b600015b7532a06df3f02e2 (and also
trims some whitespace).
|
|
5f25a6ea
|
2022-06-06T09:36:20
|
|
Revert "SDL_SetHintWithPriority: better test if hint value has changed."
Actually, the original test was fine, disregard.
This reverts commit c391bdc1607de896a0f0b577e2b4a57e5f5740b7.
|
|
c391bdc1
|
2022-06-06T09:31:35
|
|
SDL_SetHintWithPriority: better test if hint value has changed.
|
|
55a07d91
|
2022-06-06T09:30:43
|
|
SDL_SetHintWithPriority: Allow setting NULL hints.
Fixes #5120.
|
|
a236bf4f
|
2022-06-06T02:13:37
|
|
x11: Hook up display hotplug notifications.
Obviously this needs XRandR support.
Fixes #4977.
|
|
6b4bd5a7
|
2022-06-05T09:34:12
|
|
test_harness: Report if zero tests to run.
Fixes static analysis complain about a potential malloc(0) call.
|
|
3a20274d
|
2022-06-04T20:16:28
|
|
Refactoring: move GUID operations out of Joystick
- SDL_JoystickGUID -> SDL_GUID (though we retain a type alias)
- Operations for GUID <-> String ops are now in
src/SDL_guid.c and include/SDL_guid.h
- The corresponding Joystick operations delegate to SDL_guid.c
- Added test/testguid.c
|
|
423141bf
|
2022-06-03T18:49:41
|
|
Added a function to get the controller firmware version
|
|
17410887
|
2022-06-03T15:02:31
|
|
Separated controller type data into a C file
|
|
ae2cc29f
|
2022-06-03T09:44:34
|
|
Make sure initial state is set correctly for the D3D renderer
Fixes https://github.com/libsdl-org/SDL/issues/5749
|
|
847539af
|
2022-06-01T23:06:19
|
|
wayland: Only call libdecor_dispatch() if we've loaded libdecor
As of #5703, we call libdecor_dispatch() in Wayland_WaitEventTimeout(),
but this will crash if we don't load libdecor, as
SDL_VideoData::shell.libdecor will be NULL.
Since we don't load libdecor if we don't intend to use it (i.e., if
should_use_libdecor returns false), this results in a crash under KDE in
almost all circumstances.
|
|
7fa46ec4
|
2022-05-31T11:11:19
|
|
The Google Pixel fingerprint sensor also shows up on Linux when running on the phone
|
|
964e979d
|
2022-05-30T16:17:04
|
|
hidapi: Allow disabling libusb support at runtime
|
|
c87b0142
|
2022-05-30T12:02:08
|
|
Fixed building with C89 compiler
|
|
f78f7752
|
2022-05-28T03:53:43
|
|
ime: windows: allocate space for null terminator
|
|
fd2a2eea
|
2022-05-28T07:49:18
|
|
Fixed declaration-after-statement warning
|
|
d2c4d74d
|
2022-05-27T15:49:35
|
|
Fixed build with MinGW-64 windows.devices.power.h
The MinGW-64 header defines the parameters as ABI::Windows::Foundation::IReference<INT32 > **, but the Windows header defines the parameters as __FIReference_1_int**
|
|
bd22ca76
|
2022-05-27T15:40:50
|
|
Revert "Workaround for compiling with MinGW-w64"
This reverts commit efdf43aa9b4f4d623ffba01f503d9793d5021330.
The broken mingw headers aren't in an official release yet, so reporting this upstream.
|
|
efdf43aa
|
2022-05-27T15:34:45
|
|
Workaround for compiling with MinGW-w64
Fixes bug https://github.com/libsdl-org/SDL/issues/5589
|
|
bef9f2b2
|
2022-05-26T20:45:13
|
|
Don't trigger device notifications when Steam Deck backlight changes
|
|
347659e8
|
2022-05-25T22:07:12
|
|
riscos: Ensure that last_mouse_buttons is initialised correctly
|
|
cb43eb43
|
2022-05-25T21:43:36
|
|
riscos: Ensure the mouse focus is set when creating the window
|
|
6eda520f
|
2022-05-25T21:40:28
|
|
riscos: Add a basic implementation of SDL_ShowCursor()
|
|
22d6e09a
|
2022-05-25T11:04:58
|
|
Don't try to call hid_ble_scan() if HIDAPI is disabled
Fixes https://github.com/libsdl-org/SDL/issues/5699
|
|
b28d304b
|
2022-05-24T17:24:03
|
|
Only include controller_type.h in SDL_joystick.c
It has a huge array of controllers and we only want it instantiated once
|
|
9220f92b
|
2022-05-25T01:01:02
|
|
hidapi/libusb/hid.c (read_thread): mark as SDLCALL
|
|
412ceb84
|
2022-05-24T16:27:54
|
|
video: Only check major version in SDL_GetWindowWMInfo
Since #5602, SDL is intended to have the same ABI across the whole
major-version 2 cycle, so we should not check that the minor version
matches the one that was used to compile an application.
There are two checks that could make sense here.
The first check is that the major version matches the expected major
version. This is usually unnecessary and is not usually done (if we're
calling into the wrong library we'll likely crash anyway), but since we
have the information, we might as well continue to use it.
The second check is whether the version provided by the caller is
equal to or greater than a threshold version at which additional fields
were added to the struct. If it is, we should populate those fields;
if it is not, then we cannot. This is only useful on platforms where
additional fields have genuinely been added during the lifetime of
SDL 2, like Windows and DirectFB (but not X11).
This commit changes the first check to be consistent about only looking
at the minor version, while leaving the second check using SDL_VERSIONNUM
(which will be removed or widened in SDL 3, but it's fine for now).
Resolves: https://github.com/libsdl-org/SDL/issues/5711
Fixes: cd7c2f1 "Switch versioning scheme to be the same as GLib and Flatpak"
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
fe46569c
|
2022-05-21T10:44:50
|
|
Fix potential memory leak in SDL_AddHintCallback
|
|
e4b5afa5
|
2022-05-21T13:16:12
|
|
fix unused variable depending on YUV format
|
|
e59cba95
|
2022-05-21T13:50:56
|
|
add libdecor_dispatch
|
|
dc62fec5
|
2022-05-20T21:07:25
|
|
audio: Fix locking in backends that manage their own callback threads.
Otherwise you might get a race where an app pauses the device, but
the audio callback still manages to run after the pause is in place.
|
|
b1cf3229
|
2022-05-19T16:49:47
|
|
Fixed HIDAPI PS4 controller being picked up when running under Steam
Input with PS4 configuration enabled
|
|
9edd411a
|
2022-05-19T17:15:10
|
|
x11: send move/resize events when waiting on fullscreen change.
Otherwise we ignore the Configure/etc events when they come in because
the window is already in an identical state as far as SDL is concerned.
Fixes #5593.
May also fix:
Issue #5572.
Issue #5595.
|
|
b798e49c
|
2022-05-19T21:44:38
|
|
Fix build warning with MSVC
|
|
f0566702
|
2022-05-19T16:58:11
|
|
Fix enabling SDL_DYNAMIC_API in OpenWatcom builds
|
|
3d52d049
|
2022-05-19T15:38:35
|
|
Remove the '_' prefix from symbol names in Windows OpenWatcom builds
|
|
9dfa000b
|
2022-05-18T20:20:03
|
|
Initial support for building for Windows with OpenWatcom
|
|
5669743a
|
2022-05-19T09:45:57
|
|
Make sure SDL_CaptureMouse() is only called on the main thread
Windows handles mouse capture on a per-thread basis, and capture must be done on the thread used to create a window.
Fixes https://github.com/libsdl-org/SDL/issues/5577
|
|
15781a69
|
2022-05-19T18:55:02
|
|
dynapi: fix SDL_DYNAPI_PROC for SDL_iPhoneSetAnimationCallback()
|
|
f5cf0e37
|
2022-05-19T14:51:25
|
|
Remove unused and duplicate defines from SDL_dynapi_overrides.h
|
|
03ebc439
|
2022-05-19T14:01:10
|
|
dynapi: add missing SDLCALL for SDL_TLSSet's dtor param.
|
|
501a4991
|
2022-05-05T18:44:32
|
|
Add clang-format on/off comments where necessary.
Comments were added in places where INDENT-ON/OFF comments are. Places
like stdlib's asm don't need it as clang-format doesn't try to indent it.
|
|
0e6d4baa
|
2022-05-19T01:23:24
|
|
Fixed compile warning on gcc 11
|
|
c7dff3a2
|
2022-05-19T00:35:22
|
|
Attempt to get the X1 and X2 button state on X11 by using the current event state instead of direct X11 query.
|
|
57130b75
|
2022-05-19T00:31:20
|
|
Revert "x11: get x1/x2 button state in GetGlobalMouseState"
This reverts commit 3fcc2cb500a752698687ad0c8bb14778e6cb84c3.
Button4 and Button5 are for the scrollwheel, not the extended buttons.
I don't know of a way to query the state of the extended buttons using X11.
|
|
47f1cb55
|
2022-05-18T23:48:15
|
|
Fixed picking up the correct mapping for virtual controllers on Android
Fixes https://github.com/libsdl-org/SDL/issues/5662
|
|
f7b774a7
|
2022-05-18T17:59:17
|
|
Fixed build error on Linux if HAVE_INOTIFY isn't defined
Fixes https://github.com/libsdl-org/SDL/issues/5682
|
|
f9a9d3c8
|
2022-05-18T17:23:49
|
|
Also restore previous capture window if CaptureMouse() fails
|