Commit Graph

7183 Commits

Author SHA1 Message Date
Ozkan Sezer 69203851dc rename PKG_CONFIG_LIBS_PRIV to PKGCONFIG_LIBS_PRIV
i.e.: do not steal PKG_CONFIG namespace.
2021-04-14 21:40:50 +03:00
Ozkan Sezer 197cfcaf71 ran configure.ac through autoupdate-2.69
generated configure script is practically the same except for whitespace
changes.
2021-04-14 21:10:40 +03:00
Sam Lantinga 499d31e9cd Cleanup Linux joystick code 2021-04-13 17:00:24 -07:00
Luis Cáceres 5c78df9c23
Support key composing (i.e. dead keys) in Wayland driver (#4296)
Based on an old patch by chw from the old Bugzilla issue tracker.

Authored-by: chw

Co-authored-by: Sam Lantinga <slouken@libsdl.org>
2021-04-13 16:56:50 -07:00
Sam Lantinga b04136e75e Fixed Xbox controller when using the default Linux gamepad mapping
Tested with the Xbox Series X controller and the xow driver
2021-04-13 16:29:48 -07:00
Sam Lantinga 1aaafc2bd8 Show the real name of the Xbox controller when using the generic mapping on Linux 2021-04-13 16:29:46 -07:00
Paul Cercueil 1542300a89 joystick: linux: Avoid checking for gamepad mapping each frame
The information whether a specific joystick can be used as a gamepad is
not going to change every frame, so we can cache the result into a
variable.

This dramatically reduces the performance impact of SDL2 on small
embedded devices, since the code path that is now avoided was quite
heavy.

Fixes #4229.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2021-04-13 16:07:35 -07:00
okuoku 401f485490 cmake: Weak link with CoreHaptics
Add link to CoreHaptics so we can compile against latest iOS SDKs.
2021-04-13 16:04:04 -07:00
Kyle Schaefer dbedaeceb3 Adding checks to see if any ASAN flags are set, if so then we set(HAVE_ASAN ON) so the infomartion output will properly list ASAN as on. 2021-04-13 16:03:37 -07:00
Kyle Schaefer 70bd205bb1 Adding messages to output CMAKE_C_FLAGS_DEBUG and CMAKE_CXX_FLAGS_DEBUG, this way when using Debug builds you can see which debug flags are set 2021-04-13 16:03:37 -07:00
Kyle Schaefer 320666044e Moving ASAN macros and calls to macros above the information output section so we can display ASAN information properly. 2021-04-13 16:03:37 -07:00
Ethan Lee f88d91d596 wayland: Minor whitespace fix 2021-04-13 16:02:53 -07:00
Ethan Lee d785dab5fd wayland: Add unscaled resolutions to the display mode list 2021-04-13 16:02:53 -07:00
Cacodemon345 b0178fe518 KMSDRM: Report correct window position to the application 2021-04-13 16:01:44 -07:00
Ethan Lee dfcd5fbcad wayland: Set the keymap in keyboard_handle_modifiers 2021-04-13 13:30:50 -07:00
Sylvain e87c7940f5
Fixed bug 3829 - Don't FOURCC format for target textures
FOURCC isn't supported by renderer back-ends for target access
So use a correct format and fallback to with native/yuv path
2021-04-13 14:42:38 +02:00
Sam Lantinga 9ef0b97c6d Changes to macOS event handler to better interact with the running app
- Only focus a new window when one closes if the window that was closed was an SDL window

- If the application already has a key window set that is not an SDL window, don't replace it when the application is activated

- Only register the URL event handler when SDLAppDelegate is going to be set as the applications app delegate. This is to
   be consistent with previous behavior that would only register the handler in -[SDLAppDelegate applicationDidFinishLaunching:]
   and allows the running app to opt out of the behavior by setting its own app delegate.

- The URL event handler is now removed if it was set on SDLAppDelegate dealloc
2021-04-12 11:25:44 -07:00
Sam Lantinga 2a20cc0f1d SDL: let through a SetLED command every 5sec to deall with situations where the controller loses power when a computer is suspended
CR: SamL
2021-04-12 11:25:42 -07:00
Ethan Lee c59d4dcd38 wayland: Dramatically lower the timeout when reading/writing pipes 2021-04-09 22:30:08 -07:00
Ethan Lee cf12496311 wayland: Fall back to clipboard source data if offer came up empty 2021-04-09 22:30:08 -07:00
Ethan Lee 282c052479 wayland: Another strlen->SDL_strlen 2021-04-09 22:30:08 -07:00
Ethan Lee bec133d77b wayland: Use SDL_strlen instead of strlen 2021-04-09 22:30:08 -07:00
Ethan Lee e28d978509 wayland: Minor whitespace cleanup in clipboard.c 2021-04-09 22:30:08 -07:00
Ethan Lee 875f839df4 wayland: A bunch of clipboard safety fixes.
Also removed Wayland_get_data_device because it was a pointless getter function.
2021-04-09 22:30:08 -07:00
Ethan Lee 7510245af9 wayland: Create the data_device only after both device_manager and input exist.
There is no guarantee on what order the Wayland interfaces will come in, but the
callbacks were assuming that wl_data_device_manager would could before wl_seat.
This would cause certain desktops to not have any data_device to work with,
meaning certain features like the clipboard would silently no-op.
2021-04-09 22:30:08 -07:00
okuoku 732cc8ed5b cmake: Fix UWP DLL build by removing /NODEFAUTLIB
On UWP, we need default C runtime for C++ sources.
2021-04-09 22:28:51 -07:00
Vladislav Dmitrievich Turbanov 50db4a59b8 * Support for intrinsics in MSW + Clang scenario.
Utility polyfill is provided, removed the no-longer-needed
conditionals.
2021-04-09 22:28:07 -07:00
Dean Herbert 89b6209313 Fix race condition that can lead to ENTER/LEAVE window events never firing
On windows, when toggling the state of RelativeMode rapidly, there is a
high chance that SDL_WINDOWEVENT_ENTER / SDL_WINDOWEVENT_LEAVE events
will stop firing indefinitely.

This aims to resolve that shortcoming by ensuring mouse focus state is
correctly updated via WM_MOUSELEAVE events arriving via the windows
event hook.
2021-04-07 14:02:43 -07:00
Philippe Coval 4cee1012c6 debian: Align to debian packaging scheme
This will prevent files conflicts among packages

Change-Id: I32d1ec83229aa635d9198a0ab14a9d6708f24d37
Signed-off-by: Philippe Coval <rzr@users.sf.net>
2021-04-07 13:57:23 -07:00
David Edmundson 6fd37194bc wayland: Fix leaked zxdg_decoration_manager 2021-04-07 13:56:48 -07:00
David Edmundson f6a09ef1a9 wayland: Drop support for kwin specific decoration management
KWin has supported the shared and formalised zxdg_decoration since
Plasma 5.16 which came out mid 2019.

Whilst it made sense to support them both for a while, it should not be
needed for future SDL releases.
2021-04-07 13:54:07 -07:00
Ethan Lee a92cca1ab8 wayland: Use the window's display to get wl_output rather than fullscreen_mode.
Because Wayland only supports FULLSCREEN_DESKTOP, fullscreen_mode never gets
assigned at all, meaning driverdata is always NULL! Depending on what the
compositor does this can lead to dramatically different results. GNOME was fine
without this, but Plasma would trip an event that unintentionally unset the
fullscreen mode and caused the game to fire a configure event _every frame_,
and of course the configure would send the fullscreen_mode output which was
still empty. The fix is to just use the SDL_VideoDisplay directly, which will
always have a valid wl_output.
2021-04-07 13:53:15 -07:00
Ethan Lee c7e29a9e95 wayland: Fix toggling fullscreen with fixed-size windows 2021-04-07 13:53:15 -07:00
Ryan C. Gordon 0f4aba7bcd
audio: Fixed assertion failure if trying to use dummy backend. 2021-04-06 18:35:20 -04:00
Ryan C. Gordon 64853b7378
audio: Changed a disk and dummy backends to use _this instead of this. 2021-04-06 18:35:20 -04:00
Ozkan Sezer e97cfe4ad1 KMSDRM_Vulkan_CreateSurface(): fixed pointer-cast warning on 32 bit
Closes: https://github.com/libsdl-org/SDL/issues/4284
2021-04-06 23:56:10 +03:00
Philippe Coval 78095e3701 git: Ignore debian generated files
Signed-off-by: Philippe Coval <rzr@users.sf.net>
Change-Id: Iebfef58f41056c01736aba99f38fdedb9ee93013
2021-04-05 15:38:32 -04:00
Philippe Coval 17ceddf28d debian: Align debian deps
This will enable more flexibility in configuration

I am using this for snapshot built with GLES1 enabled

Relate-to: https://github.com/adoptware/pinball/issues/22
Signed-off-by: Philippe Coval <rzr@users.sf.net>
Change-Id: I4387663605475ddd669694a7828f101881e424b8
2021-04-05 12:09:12 -04:00
Ryan C. Gordon ebc1109866
Removed mkdocs.yml
More GitHub Actions nonsense.
2021-04-04 12:29:18 -04:00
okuoku 7b8c750954 CMake: Enable WASAPI on WinRT
WASAPI backend on WinRT was implemented with 2.0.8
351d6d4784
but CMake source here was written for 2.0.7 in vcpkg
e6c65b93b1
2021-04-04 09:20:04 -04:00
okuoku 8fa2ce5601 WinRT: Rename Interface ID symbols
Rename locally-defined Interface ID symbols to avoid conflict with
locally linked dxgi library. Prefixed with `SDL_` to match with
other references in render_d3d11 or wasapi.
2021-04-04 09:19:16 -04:00
Nicholas "LB" Braden 3dbc4cf233 Fix compilation error for Windows SDK 8.1+
https://docs.microsoft.com/en-us/windows/win32/api/shellscalingapi/ne-shellscalingapi-monitor_dpi_type
2021-04-04 08:39:12 -04:00
Philippe Coval 9634070bad debian: Update README file in doc package
Signed-off-by: Philippe Coval <rzr@users.sf.net>
Change-Id: I7cd02e3094cb60328a24702afecb13f61beb67a1
2021-04-04 08:36:24 -04:00
meyraud705 413a2306bc NULL passed to strcmp in Wayland_ShowMessageBox 2021-04-04 08:15:33 -04:00
Ozkan Sezer 573c5a5bac regenerated configure. 2021-04-04 11:55:50 +03:00
Ryan C. Gordon 4914199665
ibus: make sure we don't pass a NULL path string over D-Bus.
Fixes #2941.
2021-04-04 00:29:26 -04:00
Ryan C. Gordon e006872355
hints: SDL_HINT_TIMER_RESOLUTION applies to all versions of Windows.
Fixes #3654.
2021-04-04 00:24:40 -04:00
Ryan C. Gordon a81fe27271
configure/cmake: Hook up Emscripten threads (disabled by default).
Fixes #3795.
2021-04-04 00:16:30 -04:00
Ryan C. Gordon 354cabd4a7
egl: favor truecolor configurations.
If app requested <= 16 color depth and there is a 24-bit config available,
favor that. This fixes things that quietly expect to get truecolor output
but don't request it (...like SDL's render api...) and things that are
probably requesting 16-bit color as a fallback but expecting reasonable
systems to give them full depth.

Specifically, this fixes Life is Strange on Wayland, which uses the latter
approach, and anything using SDL_Render on Wayland, which uses the former.

Fixes #4056.
Fixes #4132.
2021-04-03 18:48:54 -04:00
Ryan C. Gordon 95e5f0586e
audio: make SDL_OpenAudioDevice declaration look less squashed. 2021-04-03 13:24:10 -04:00