|
adac3bd1
|
2022-05-03T12:31:50
|
|
video: restore ability to disable fb accel via hint
Somewhere in code refactoring between .20 and .22 this check
was lost, and so the hint had no effect anymore.
|
|
fbd230bb
|
2022-05-03T17:51:49
|
|
Add support for the Nokia N-Gage (#5597)
* Add initial support for the Nokia N-Gage
* N-Gage: disable clipping for the time being, issue needs to be resolved later
* Move va_copy definition to SDL_internal.h
* Move stdlib.h include to SDL_config_ngage.h, much cleaner this way
* Remove redundant include, add HAVE_STDLIB_H
* Revert "N-Gage: disable clipping for the time being, issue needs to be resolved later"
This reverts commit 4f5f0fc36cc7f34fad05e45671dfa7b8dc32fd51.
* N-Gage: fix clipping issue by providing proper math functions
|
|
3fcc2cb5
|
2022-05-03T11:19:39
|
|
x11: get x1/x2 button state in GetGlobalMouseState
|
|
6c2928b4
|
2022-04-29T19:30:47
|
|
Switch uses of MIN() to SDL_min()
We're excluding files in src/hidapi to minimize the
diff against the upstream project.
|
|
7e636b03
|
2022-04-29T10:16:14
|
|
Removed log message length limitation for Apple platforms
This works in conjunction with https://github.com/libsdl-org/SDL/pull/5584
|
|
12f15aaa
|
2022-04-27T10:03:32
|
|
fix build
|
|
05bd225a
|
2022-04-26T23:14:44
|
|
x11: If XRandR isn't available, add a generic display.
We can get _some_ of the info we need out of standard Xlib and report a
single display (which might actually be multiple physical displays mushed
into a single desktop). This is better than nothing, but you should really
just build with XRandR support and get a better X server. :)
|
|
ccc70e64
|
2022-04-26T23:14:21
|
|
x11: Fixed some compiler warnings.
|
|
7d7ec9c9
|
2022-04-26T16:41:28
|
|
x11: Remove XVidMode and Xinerama support.
Fixes #1782.
|
|
b293888c
|
2022-04-26T19:44:34
|
|
Fixes an issue introduced via #5573 when building for i686
|
|
01ef98a5
|
2022-04-26T10:19:03
|
|
Don't force keyboard auto-repeat on, if the user has disabled it for some reason
Fixes https://github.com/libsdl-org/SDL/issues/2400
|
|
795744fc
|
2022-01-07T10:11:46
|
|
Turn off relative mouse before window checks as well
|
|
e2d268a3
|
2022-01-06T23:42:44
|
|
SDL_cocoamouse.m: SetRelativeMouseMode even if out of focus
Should fix #3087
|
|
76afb858
|
2022-04-25T10:35:56
|
|
Introduces Cocoa_GetWindowDisplayIndex. This enable a proper management for dpi when switching between retina and non-retina displays.
|
|
53dea983
|
2022-04-25T13:51:15
|
|
x11: revert checks for _NET_WM_STATE_FULLSCREEN changes.
This reverts commit 85977354fbce9ecb2add660a88e6bec3532c3e26.
This reverts commit 0249df9d960f9bc28b476e1171c5501fc37cca12.
Fixes #5572.
Reopens #5390.
|
|
aeadbdd7
|
2022-04-20T09:00:00
|
|
Remove an unused function prototype
|
|
c8c59a21
|
2022-04-20T08:58:58
|
|
Fix a -Wshadow warning
|
|
3753a7b1
|
2022-04-19T14:42:39
|
|
Fix recent changes in VitaSDK
|
|
02225aa7
|
2022-04-18T22:57:03
|
|
Fixed build
|
|
49a2e4b0
|
2022-04-19T00:36:53
|
|
x11: Revert "Fix keymap updating for X11 backend"
This reverts commit de6d290266d1def0eef9df81bf9be41c12a98c61.
This patch had multiple issues, discussed in #5520.
|
|
9919d1a7
|
2022-04-18T11:51:09
|
|
Remove HWND_TOPMOST for fullscreen windows
Fixes https://github.com/libsdl-org/SDL/issues/5509
|
|
2b529461
|
2022-04-15T11:51:02
|
|
video: Don't minimize fullscreen windows on focus loss by default when mode switching is disabled
When mode switching is disabled in a video backend, fullscreen windows are basically just fullscreen desktop windows with different internal scaling. As no mode switching occurs, there's no need to minimize them on focus loss by default. This can still be overridden by explicitly setting the internal hint for minimizing on focus loss.
This has the side effect of fixing a bug on GNOME, where, when a fullscreen Wayland window has it's focus lost and restored via alt+tab followed by switching back to windowed mode, the top portion of the window won't end up being obstructed by GNOME's top bar.
|
|
c37090f9
|
2022-04-18T12:30:08
|
|
wayland: Add support for TOOLTIP/POPUP_MENU
|
|
254fcc90
|
2022-04-18T09:03:14
|
|
Revert "video: Prefer Wayland over X11"
This reverts commit 8ceba27d6291f1195e13608033ec439aec621fc6.
SDL Wayland support is stable, but there are a number of issues with third-party software (NVIDIA drivers, libwayland event overflow, libdecor not handling plugin load failures, Steam overlay not working with Wayland, etc.) that make it better to default to X11 at this time.
Games which would like to prefer wayland when available can use the following code before SDL_Init():
SDL_SetHint(SDL_HINT_VIDEODRIVER, "wayland,x11");
Fixes https://github.com/libsdl-org/SDL/issues/5527
|
|
c1336b21
|
2022-04-17T12:43:32
|
|
hints: Make SDL_VIDEODRIVER and SDL_AUDIODRIVER formal hints.
They were just environment variables before.
Fixes #5528.
|
|
67e0f546
|
2022-04-15T18:24:57
|
|
x11: Update the display when the WM changes a window's fullscreen state.
Fixes #5390.
|
|
edb473cf
|
2022-04-15T15:03:28
|
|
video: Wayland: Always round scaled pointer coordinates down
Rounding up can cause the pointer coordinates to exceed the window boundaries at the right and bottom edges.
|
|
13393a1c
|
2022-04-15T14:28:07
|
|
video: Wayland: Clamp fullscreen window dimensions to desktop
A scaled fullscreen window may exceed the bounds of the desktop. Clamp the window size to the desktop dimensions in fullscreen mode.
|
|
01b14e14
|
2022-04-12T08:49:19
|
|
avoid NullPointer in SDL_GL_MakeCurrent
|
|
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.
|
|
c2093fab
|
2022-04-08T13:58:45
|
|
video: wayland: Set the surface damage region when using fullscreen viewports
When using emulated display modes, the output size is often larger than the drawable buffer. As the surface damage region is automatically calculated from the smaller drawable buffer size, the damage region needs to be manually set to cover the entire viewport region or visual repaint artifacts can result.
|
|
5613a560
|
2022-04-07T11:32:22
|
|
Make sure the UIKit message box is being handled on the main thread
Potentially fixes https://github.com/libsdl-org/SDL/issues/4865
|
|
49b9e347
|
2022-04-07T08:24:03
|
|
Only update modifier state for keys that are pressed in another application
Fixes https://github.com/libsdl-org/SDL/issues/4432
|
|
85977354
|
2022-04-07T09:14:33
|
|
x11: Treat WM setting the window "fullscreen" like FULLSCREEN_DESKTOP.
Fixes #5390.
|
|
d1f7f9e3
|
2022-04-06T11:18:46
|
|
wayland: Pin the fake window position at (0, 0).
I kind of thought it'd be nice to have it in the center, but this is an issue
for applications that still assume global mouse and window positions are
accessible. For example, this fixes cursor offset issues in UE5.
|
|
279aeb59
|
2022-04-06T01:32:57
|
|
wayland: Add a bug link for the detach FIXME
|
|
3ada694e
|
2022-04-06T01:18:03
|
|
wayland: Try to detach at the beginning of ShowWindow, just in case.
It's possible that an external component (probably a GL/VK context) committed, so we need to cover our bases and detach in both HideWindow and ShowWindow.
Fixes a crash in UE5 editor's pop-ups.
|
|
dcfb7fff
|
2022-04-06T00:55:32
|
|
wayland: Evaluate WINDOWPOS_CENTERED_DISPLAY for move events
Partially fixes the mouse cursor in UE5 editor. Imperfect because UE5 uses window position and global mouse state to get position, but of course we don't have global mouse and this is just to get the right display index so this still fails overall. We really need to make global mouse support a feature query...
|
|
0249df9d
|
2022-04-05T23:04:19
|
|
x11: Try to keep SDL_WINDOW_FULLSCREEN* in sync with window manager.
So if Gnome/KDE/etc have a keyboard shortcut or titlebar decoration to
make any window go fullscreen (with the _NET_WM_FULLSCREEN flag on the
_NET_WM_STATE property), we update the SDL window flag.
Fixes #5390.
|
|
138d96c8
|
2022-04-05T19:30:25
|
|
Send key release event to input method. (#5281)
Co-authored-by: Ethan Lee <flibitijibibo@gmail.com>
|
|
8bae343f
|
2022-04-05T22:19:25
|
|
x11: when waiting on fullscreen changes, not window position _and_ size.
This makes sure the window doesn't have outdated values if you try to access
them (or call something that does, like SDL_SetWindowMinimumSize).
Fixes #5233.
|
|
268c2fa8
|
2022-04-05T18:42:17
|
|
Don't resize fullscreen windows when hiding or minimizing them (thanks @madewokherd!)
This has the benefit of window previews (mousing over the icon) having the correct size and contents.
Fixes https://github.com/libsdl-org/SDL/issues/5320
|
|
def27267
|
2022-02-05T12:32:06
|
|
Ignore focus change messages that contradict GetForegroundWindow.
On Wine, when a window is programmatically minimized in response
to losing focus, we receive a WM_ACTIVATE for the deactivation,
but GetForegroundWindow still indicates that our window is focused.
This causes an incorrect SDL_WINDOWEVENT_FOCUS_GAINED.
This is probably a Wine bug, but it may take a while to fix and
then for the fix to make its way to users.
|
|
a5672b85
|
2022-04-05T11:10:41
|
|
x11: Wait a bit to see if window pos changes when changing fullscreen.
Helps prevent window from moving to 0,0 when leaving fullscreen.
Fixes #4749.
|
|
45372b1c
|
2022-04-04T21:36:25
|
|
x11: Don't unload libGL.so to prevent a crash in XCloseDisplay()
libGL.so may register callbacks that can be invoked upon XCloseDisplay().
If XCloseDisplay() is called after libGL.so is unloaded, the callback pointer
will point at freed memory and invoking it will crash.
The texture framebuffer check optimized out in f37e4a9 was causing libGL.so to
never be unloaded as a side-effect. Skipping it exposed this bug by allowing
libGL.so to actually unload.
|
|
7b3449b8
|
2022-04-04T20:46:56
|
|
Minor cleanup
|
|
ad6bc521
|
2022-04-01T07:59:16
|
|
Move SDL_List functions to SDL_list.c to avoid more merge with eventual PR
|
|
0d7edcb7
|
2022-03-31T16:15:51
|
|
Fixed loading 32-bit BMP files
|
|
ea7d5307
|
2022-03-31T14:11:52
|
|
emscripten: Proxy SDL_GetUsableDisplayBounds to the main thread.
|
|
fe79eb2f
|
2022-02-26T20:46:52
|
|
emscriptenframebuffer: fix formatting
|
|
268cc2a4
|
2022-02-26T20:42:54
|
|
emscriptenmouse: remove useless return statement
|
|
3136a530
|
2022-02-25T14:26:23
|
|
fix formatting and cast warnings
Co-authored-by: Charlie Birks <charlie@daftgames.net>
|
|
40415859
|
2022-02-25T00:12:33
|
|
emscriptenmouse: remove old extra `_INT`
|
|
4dca8f7f
|
2022-02-24T21:09:03
|
|
SDL2 thread proxying fixes
This PR uses new APIs added in [emscripten-core/emscripten#9336](https://github.com/emscripten-core/emscripten/pull/9336)
to improve compatibility with USE_PTHREADS=1.
Original PR: https://github.com/emscripten-ports/SDL2/pull/127
By: @jakogut
Reviewed by: Daft-Freak
|
|
1c7bf478
|
2022-03-31T10:09:02
|
|
x11: Ignore BadValue for extremely small XRRSetScreenSize resolutions.
Reference Issue #4840.
|
|
95c0fec5
|
2022-03-31T12:35:17
|
|
Vita: PVROGL: fix indentation and ifdef guards
|
|
b5700ab3
|
2022-03-29T19:32:21
|
|
Cleanup Spaces
|
|
8c542a35
|
2022-03-29T19:08:56
|
|
Desktop OpenGL 1.X/2.X PSVita Support
|
|
7e15ad2f
|
2022-03-30T14:15:52
|
|
x11: Catch X11 errors in X11_SetWindowPosition and X11_SetWindowSize.
The functions can go south if other operations are in progress, like
X11_SetWindowBordered, which might be doing something traumatic behind the
scenes of the window manager.
We can't make these tasks totally synchronous, which would fix the problem,
because not only can the window manager block however long it wants, it might
also decide to deny our requests without any notification, so we'd be waiting
forever for a window change that isn't coming. :(
Fixes #5274.
|
|
4d1905c9
|
2022-03-29T13:34:14
|
|
video: wayland: Use viewports for non-fullscreen windows with fractional scaling
Use viewports for non-fullscreen windows when the desktop uses fractional scaling and the window is flagged as DPI-aware to provide a backbuffer mapped as close to 1:1 output as possible. In the cases of odd window sizes the backbuffer may be a pixel off of scaling perfectly into the window size due to its scaled size being rounded off, but a minute amount of scaling during output is likely preferable to the large amounts of overdraw needed with integer scaled buffers.
|
|
fa4c5198
|
2022-03-28T21:32:30
|
|
video: wayland: Expose more resolutions for mode emulation
Expose as many emulated display modes as possible. They will currently display stretched to the display's native desktop aspect, but if an application requires a hardcoded resolution, it will work at minimum.
Aside from the change in the emulated display mode list, the Wayland event handling code had to be updated to support separate scaling for the x and y axes, as square pixels are no longer guaranteed.
|
|
d875416a
|
2022-03-28T15:32:30
|
|
wayland: Minor fix for old compilers
|
|
4d76c9cb
|
2022-03-25T20:35:07
|
|
video: wayland: Use wp-viewporter for fullscreen with non-native resolutions
Wayland doesn't support mode switching, however Wayland compositors can support the wp_viewporter protocol, which allows for the mapping of arbitrarily sized buffer regions to output surfaces. Use this functionality, when available, for fullscreen output when using non-native display modes and/or when dealing with scaled desktops, which can incur significant overdraw without this extension.
This also allows for the exposure of arbitrarily sized, emulated display modes, which can be useful for legacy compatability.
|
|
713a6754
|
2022-03-26T22:26:15
|
|
wayland: Relax the check for mismatching output scales
|
|
5655be15
|
2022-03-26T19:57:39
|
|
wayland: Avoid overwriting xdg_output position with wl_output position
|
|
40417b18
|
2022-03-26T19:55:04
|
|
wayland: Work around a GNOME xdg_output scaling issue
|
|
7a1c45bd
|
2022-03-25T12:51:38
|
|
wayland: Optimize keyboard_handle_modifiers.
1. Mod index values are (mostly) constant, so can be done with xkb_state_new
2. Mods can change without the group changing, avoid remap events if possible
Lastly, as a bonus, I added braces to the locale check, because I was nearby.
|
|
bf38fd46
|
2022-03-25T11:52:50
|
|
YUV: fix invalid read on last line when converting from SDL_PIXELFORMAT_YUY2 (see bug #4841)
|
|
2891f082
|
2022-03-25T02:49:49
|
|
wayland: Use xkb_keymap_mod to set mod state
|
|
6d9ca926
|
2022-03-25T01:36:39
|
|
wayland: Enforce text capitalization manually, for remapped keymods
|
|
a75c6150
|
2022-03-25T01:33:40
|
|
wayland: Add an xkb_keysym_t->SDL_Keycode mapping for backspace
|
|
ab74b6a3
|
2022-03-24T15:34:29
|
|
wayland: Remove some now-redundant casts
|
|
ee52ad08
|
2022-03-24T15:32:25
|
|
wayland: Minor fixes for old compilers
|
|
b4d28085
|
2022-03-24T18:30:32
|
|
wayland: Don't overwrite error message from SDL_EGL_CreateSurface
SDL_EGL_CreateSurface sets a more specific error message, so overwriting
it would lose information.
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
d5bbbd3f
|
2022-03-24T18:23:35
|
|
Avoid depending on libwayland 1.20 unnecessarily
When using shared linking (linking in the normal way with
-lwayland-client) rather than loading Wayland libraries dynamically at
runtime, listing symbols that don't exist in the current version results
in a build failure. We don't actually call wl_proxy_marshal_flags() or
wl_proxy_marshal_array_flags() directly; the reason we need them is
that they're called by the code generated by wayland-scanner >= 1.20.
If we're building against an older Wayland library, then we'll have its
corresponding version of wayland-scanner (mismatched versions are not
supported), so we won't need those two symbols, and can avoid generating
a dependency on them.
Conversely, if we're building against a newer Wayland library, the
generated code will call them unconditionally, so we cannot treat them as
optional and gracefully fall back: that would result in a crash. Instead,
treat them as a mandatory part of the Wayland library, so that if they
are not found at runtime, we can fall back to X11 without crashing.
libwayland 1.18 is in several LTS distributions (Ubuntu 20.04,
Debian 11, RHEL 8) so avoiding a hard dependency on 1.20 is quite
useful.
Signed-off-by: Simon McVittie <smcv@collabora.com>
Resolves: https://github.com/libsdl-org/SDL/issues/5376
|
|
d597a9b4
|
2022-03-24T14:25:00
|
|
x11: Minor cleanups and corrections in X11_ShowMessageBox.
Reference issue #3254.
|
|
6c56193a
|
2022-03-24T18:09:45
|
|
Fixed bug #1650: X11 doesn't set KMOD_NUM and KMOD_CAPS to system state
|
|
4fe7b2cb
|
2022-03-24T11:00:43
|
|
static analysis: Fixed several complaints from codechecker.
There are still some pending Objective-C specific issues.
Reference issue #4600.
|
|
0dae35bf
|
2022-03-19T15:58:47
|
|
video: wayland: Use xdg-output for retrieving the desktop dimensions
Using wl-output to get the desktop display dimensions and dividing by the integer scale factor will not return the correct result when using a desktop with fractional scaling (e.g. a 3840x2160 display at 150% will incorrectly report the scaled desktop area as 1920x1080 instead of 2560x1440). Use the xdg-output protocol, if available, to retrieve the correct desktop dimensions and offset.
Versions 1 through 3 of the protocol are supported.
|
|
9125b244
|
2022-03-23T13:46:25
|
|
wayland: Basic support for zwp_tablet_*v2 protocol
|
|
13337e17
|
2022-03-23T13:27:01
|
|
wayland: The rest of the wayland-client 1.18 requirement... Git, please
|
|
f5a98044
|
2022-03-23T10:13:56
|
|
Android: add SetWindowResizable() implementation
- which also enable/disable the orientation lock status.
This is only provided when the window is not SDL_WINDOW_FULLSCREEN (see SDL_video.c).
Final orientation also depends on SDL_HINT_ORIENTATIONS.
|
|
4b8d69a4
|
2022-03-22T17:09:44
|
|
Avoid trying to use texture framebuffers on emscripten
|
|
34fd83ca
|
2022-03-22T06:50:10
|
|
Don't try to hide foreign windows when destroying the SDL window representation
Fixes https://github.com/libsdl-org/SDL/issues/5432
|
|
74680f5c
|
2022-03-21T18:56:56
|
|
regenerated SDL_blit_auto.c.
|
|
dd6c46cb
|
2022-03-21T18:56:56
|
|
blit-auto optimizations
|
|
8f964576
|
2022-03-19T11:01:55
|
|
Fixed parameter operation ordering for ease of reading
|
|
0517b61e
|
2022-03-19T11:00:00
|
|
Relative mouse mode is tied to the window with keyboard focus
This isn't obvious, but makes sense when thinking about how games actually use it. This is also in line with how Windows mouse relative mode is implemented.
Fixes https://github.com/libsdl-org/SDL/issues/5340
|
|
d81fee76
|
2022-03-19T10:27:31
|
|
SDL_Rect: Added floating point versions of all the rectangle APIs.
Fixes #5110.
|
|
4d9bef60
|
2022-03-19T09:44:09
|
|
SDL_Rect: minor code cleanups.
|
|
c573ebe1
|
2022-03-19T09:29:01
|
|
SDL_UnionRect: If both rects are empty, zero out the result struct.
|
|
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
|
|
3167ba34
|
2022-03-17T17:58:35
|
|
Fixed freeing the Windows blank cursor
|
|
0387bf82
|
2022-03-17T17:55:28
|
|
Fixed memory leak in WIN_CreateBlankCursor()
|
|
d4062785
|
2022-03-17T17:01:36
|
|
Try not forcing activation when grabbing the mouse in fullscreen windows
|
|
4e784fce
|
2022-03-17T16:57:33
|
|
When updating grab state, only activate windows that are grabbed, fullscreen, and shown.
Fixes https://github.com/libsdl-org/SDL/issues/5371
|
|
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
|
|
4e49b78a
|
2022-03-17T14:44:17
|
|
Fixed compile warning and comment typo
|
|
0bf8ccfb
|
2022-02-08T22:15:11
|
|
video: Add a hint to allow Vulkan surfaces on foreign windows
|
|
829e15a4
|
2022-02-05T14:38:39
|
|
Ignore unknown WM_SIZE types.
According to MSDN, we can also get SIZE_MAXHIDE and SIZE_MAXSHOW,
based on state changes to other windows. It's not clear under
what circumstances this will happen (I saw some docs indicating
it may require multiple application windows), but it doesn't seem
right to treat them as RESTORED.
|