4948 Commits

Author SHA1 Message Date
Ivan Epifanov
8d1e0ca324 Vita: add support for disabling 'screensaver' (screen dimming and suspend) 2021-09-16 09:03:17 -07:00
Ivan Epifanov
79ec8986d3 Vita: refactor gxm texture render and add SDL_RenderGeometry support 2021-09-16 09:03:17 -07:00
Zach Reedy
2a8938f2bf
Fixed: Whitespace being striped from the end of IME strings incorrectly + Regression with SDL_SetTextInputRect (#4752)
* Fixed: Whitespace being striped from the end of IME strings incorrectly

* Fixed: Google IME Candidate Window not placing correctly

* Why are PostBuild events stored in the vcxproj and not a user file?

* Revert SDL.vcxproj properly...

* Remove whitespace as per code review

* Fix Werror=declaration-after-statement error in code
2021-09-15 09:40:22 -07:00
Ivan Epifanov
ce177049f7 Vita: Allow completely skipping pvr init to override apphint from app 2021-09-14 16:20:50 -07:00
Misa
4a9947336c SDL_RenderSetVSync(): Restrict vsync to 0 or 1
In the future, we might want to support special swap intervals. To
prevent applications from expecting nonzero values of vsync to be the
same as "on", fail with SDL_Unsupported() if the value passed is neither
0 nor 1.
2021-09-14 16:18:02 -07:00
Misa
4549769d7d Add SDL_RenderSetVSync()
Currently, if an application wants to toggle VSync, they'd have to tear
down the renderer and recreate it. This patch fixes that by letting
applications call SDL_RenderSetVSync().

This is the same as the patch in #3673, except it applies to all
renderers (including PSP, even thought it seems that the VSync flag is
disabled for that renderer). Furthermore, the renderer flags also change
as well, which #3673 didn't do. It is also an API instead of using hint
callbacks (which could be potentially dangerous).

Closes #3673.
2021-09-14 09:56:29 -07:00
Ivan Epifanov
b2504b5da6 Fix typos 2021-09-11 20:40:50 +03:00
Jaylon Gowie
e455659467 Simplify Backspace and Enter 2021-09-10 19:49:47 -07:00
Jaylon Gowie
f162d9ee23 Fix Indentation 2021-09-10 19:49:47 -07:00
Jaylon Gowie
058c4d36b2 Add envvar to disable touchpads independently 2021-09-10 19:49:47 -07:00
Jaylon Gowie
4435543db1 Add PVR On Screen Keyboard Support 2021-09-10 19:49:47 -07:00
Ivan Epifanov
10d3df44f1 Vita: fix copyright dates 2021-09-09 07:22:01 -07:00
Ivan Epifanov
2a83686071 Fix default path 2021-09-09 07:22:01 -07:00
Ivan Epifanov
134dd46819 Add pvr gles/gles2 context support 2021-09-09 07:22:01 -07:00
Sam Lantinga
ff85d4fbe5 Fixed Xbox Series X controller being detected by both IOKit and GCController on macOS 2021-09-08 17:51:47 -07:00
Sam Lantinga
9f8552588d Added mapping for Xbox One S controller with newer firmware on macOS 2021-09-08 17:50:17 -07:00
Sam Lantinga
bf97c5a22f Make sure SDL file descriptors don't leak into child processes 2021-09-08 14:47:40 -07:00
Ryan C. Gordon
d49d955d73
render: SDL_RenderGeometry should still render when hidden, in most cases.
(otherwise render targets may fail, etc...the check is a legacy helper for
iOS apps that crash if you try to use OpenGL while in the background.)
2021-09-08 11:44:17 -04:00
Sam Lantinga
7d66fa209a Fixed double-copy of the report in BlueZ >= 5.56 2021-09-07 17:38:26 -07:00
Sam Lantinga
7ed7644a26 Fixed compiling HIDAPI Steam Controller support with C89 compiler 2021-09-07 17:37:47 -07:00
Sam Lantinga
27a48b142b Check the pathname first, as that's a faster check for XInput devices 2021-09-07 15:50:21 -07:00
Zach Reedy
6f97205229 Added: Support for showing the IME Candidate Window on Windows 2021-09-02 02:28:54 -10:00
Sylvain
183eb0673b
Fixed bug #4711: prevent opengl SDL_renderer from crashing if GL_ARB_multitexture isn't supported 2021-09-01 15:46:32 +02:00
Rokas Kupstys
515b7e93b5 Fix horizontal wheel scroll direction of X11. 2021-09-01 03:25:49 -10:00
David Gow
a1ffeda0ed 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.
2021-08-30 09:15:11 -04:00
Lee Salzman
9fae8f7088 Treat empty SDL_VIDEODRIVER var to check all video drivers. 2021-08-30 05:00:51 +03:00
Lee Salzman
7d90df0ece Restore previous behavior of empty SDL_AUDIODRIVER trying all drivers.
The recent change to make SDL_AUDIODRIVER support comma-separated lists
broke the previous behavior where an SDL_AUDIODRIVER that was empty
behaved the same as if it was not set at all. This old behavior was
necessary to paper over differences in platforms where SDL_setenv may
or may not actually delete the env var if an empty string is specified.
This patch just adds a simple check to ensure SDL_AUDIODRIVER is not
empty before using it, restoring the old interpretation of the empty
var.
2021-08-30 05:00:51 +03:00
Sam Lantinga
8b1f8b6ec5 Use the high speed alternate setting on new Microsoft Xbox controllers 2021-08-27 11:14:09 -07:00
Sylvain
1fe9ad04be
SDL_ConvertSurface: add an intermediate variable to remove static analysis false positive (see bug #4600) 2021-08-27 14:09:47 +02:00
Sylvain
be6bee0b5a
SW_RenderGeometry: add a redundant check to clear static analysis (see bug #4600) 2021-08-27 07:47:28 +02:00
Sylvain
54ca1d190e
SW_RenderGeometry: add a redundant check to clear static analysis (see bug #4600) 2021-08-27 07:44:03 +02:00
Sylvain
b17aa5d080
SW_RenderGeometry: remove a few static analysis false positives (see bug #4600) 2021-08-27 07:16:40 +02:00
David Gow
3261f7f6ce audio: Support "pulse" as an alias for "pulseaudio"
Originally, SDL 1.2 used "pulse" as the name for its PulseAudio driver.
While it now supports "pulseaudio" as well for compatibility with SDL
2.0 [1], there are still scripts and distro packages which set
SDL_AUDIODRIVER=pulse [2]. While it's possible to remove this in most
circumstances or replace it with "pulseaudio" or a comma-separated list,
this may still conflict if the environment variable is set globally and
old binary builds of SDL 1.2 (e.g. packaged with older games) are being
used.

To fix this on SDL 2.0, add a hardcoded check for "pulse" as an audio
driver name, and replace it with "pulseaudio". This mimics what SDL 1.2
does (but in reverse). Note that setting driver_attempt{,_len} is safe
here as they're reset correctly based on driver_attempt_end on the next
loop.

[1] d951409784
[2] https://bugzilla.opensuse.org/show_bug.cgi?id=1189778
2021-08-25 22:43:32 -10:00
Sam Lantinga
503ea8e89f Don't modify the Nintendo Switch home LED state by default 2021-08-25 14:42:16 -07:00
Vanfanel
b1e492d1fc Search for an appropiate plane instead of simply using the first one. 2021-08-25 10:51:26 -10:00
Eric Engestrom
23ffa3d914 Update SDL's copy of the EGL headers from Khronos 2021-08-25 10:50:21 -10:00
Ethan Lee
524964f966 Add SDL_HINT_VIDEO_EGL_ALLOW_TRANSPARENCY 2021-08-25 16:40:02 -04:00
Eric Engestrom
5113fedfa0 video/wayland: use EGL_EXT_present_opaque when available 2021-08-25 16:40:02 -04:00
Sam Lantinga
130b6bebae Manually scan for Linux joysticks before udev scan runs
This allows us to have joysticks sorted by insert time at startup, fixing https://github.com/libsdl-org/SDL/issues/4688
2021-08-24 17:03:19 -07:00
Sam Lantinga
cbccf5bb50 Use SDL_GetHint() instead of SDL_getenv() for Linux joystick hints 2021-08-24 17:03:19 -07:00
Shawn Ellis
0ae2a9f8c3 Fixed the Atari gamecontroller mappings and added Atari Xbox 360
This change corrects the mappings for the Atari gamecontroller and
adds support for the Atari Xbox 360 compatible gamecontroller. The Atari
game controller can switch between Atari and Xbox 360 mappings.
2021-08-24 13:06:27 -10:00
Ryan C. Gordon
d5fe9c308a x11: Log a warning if we decide to use XVidMode.
Reference issue #1782.
2021-08-24 14:29:39 -04:00
Ryan C. Gordon
9504bb121d
pulseaudio: Fix some function signatures that expect const pointers.
This might have changed at some point in the Pulse API, or this might have
always been wrong, but we didn't notice because the dynamic loading code
hides it by casting things to void *. The static path, where it
assigns the function pointer directly, puts out a clear compiler warning,
though.
2021-08-23 00:47:25 -04:00
Sylvain
e426bb80cb
Fixed bug #4671 - D3D_QueueGeometry: use "count / 3" (Thanks alittlesail!) 2021-08-20 07:50:30 +02:00
Oschowa
70c23b25f0 audio: pipewire: Reset hotplug atomic variables on deinit. 2021-08-19 22:26:25 -04:00
Sylvain
ae5336a3d2
Fixed bug #4669: D3D_QueueGeometry: -0.5f offset position of vertexs
This similar to D3D_QueueCopy positions
2021-08-19 14:03:10 +02:00
Ozkan Sezer
8270172e74 fix -Wshorten-64-to-32 warnings in android builds.
see: https://github.com/libsdl-org/SDL/pull/4195#issuecomment-901506386
2021-08-19 12:11:10 +03:00
Ozkan Sezer
ccb06296b9 SDL_windowsevents.c: fix build against older SDKs. 2021-08-19 03:15:02 +03:00
Sylvain
154384a776 Add (uintptr_t) casts 2021-08-19 00:10:59 +02:00
Sylvain
08d6a4653e Fix dynapi prototypes 2021-08-19 00:10:59 +02:00