1820 Commits

Author SHA1 Message Date
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
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
Zach Reedy
6f97205229 Added: Support for showing the IME Candidate Window on Windows 2021-09-02 02:28:54 -10:00
Rokas Kupstys
515b7e93b5 Fix horizontal wheel scroll direction of X11. 2021-09-01 03:25:49 -10:00
Lee Salzman
9fae8f7088 Treat empty SDL_VIDEODRIVER var to check all video drivers. 2021-08-30 05:00:51 +03: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
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
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
Ozkan Sezer
ccb06296b9 SDL_windowsevents.c: fix build against older SDKs. 2021-08-19 03:15:02 +03:00
Aleksey Rybalkin
402b86f2a8 waylandevents: prevent segfault if xkb compose table is not found
this can happen e.g. on pure wayland system where there is no X11
locales for xkbcommon to find.
2021-08-15 10:11:19 -04:00
Jānis Rūcis
454943cf3e emscripten: Don't flag window fullscreen on external requests
Also, the condition was always true.
2021-08-14 17:04:46 +01:00
Joseph Kogut
55af8dcad9 emscripten: use emscripten_set_window_title api 2021-08-14 17:04:46 +01:00
Joseph Kogut
d8baad7e48 emscripten: use emscripten_get_screen_size api 2021-08-14 17:04:46 +01:00
Charlie Birks
abc04270b7 emscripten: Fix framebuffer array creation optimisation 2021-08-14 17:04:46 +01:00
Charlie Birks
b4f11a3669 emscripten: Drop commented out code from the dummy driver 2021-08-14 17:04:46 +01:00
David Gow
fbc364908a Use the new SDL_clamp() macro where sensible
There were a few places throughout the SDL code where values were
clamped using SDL_min() and SDL_max(). Now that we have an SDL_clamp()
macro, use this instead.
2021-08-14 09:01:14 -07:00
Sam Lantinga
91a55a02de Relative mouse motion is delivered to the window with keyboard focus
This was the original intent (note SDL_UpdateWindowGrab() in SDL_OnWindowFocusGained() and SDL_OnWindowFocusLost()) and fixes a bug where relative motion unexpectedly stops if the task bar is covering the bottom of the game window and the mouse happens to move over it while relative mode is enabled.

Another alternative would be to confine the mouse when relative mode is enabled, but that generates mouse motion which would need to be ignored, and it's possible for the user moving the mouse to combine with the mouse moving into the confined area so you can't easily tell whether to ignore the mouse motion. See https://github.com/libsdl-org/SDL/issues/4165 for a case where this is problematic.
2021-08-14 00:00:57 -07:00
Sam Lantinga
4d9efcb55c Fixed flag test for boolean correctness 2021-08-13 11:52:25 -07:00
Sam Lantinga
b28ed02803 Don't warp the mouse for relative mode when the window doesn't have focus 2021-08-13 11:39:41 -07:00
Sam Lantinga
629e9f820a Fixed return value of SDL_GetGrabbedWindow() when we have an internal grab because of mouse relative mode 2021-08-13 11:06:43 -07:00
Sam Lantinga
6aa1498b98 This assert wasn't correct, we set the internal grab for mouse relative mode as well. 2021-08-13 11:03:19 -07:00
Simon McVittie
25cd749adb x11: Don't change mode if we are already in the correct mode
If we are already in the desired mode, changing it is a no-op at best,
and harmful at worst: on Xwayland, it sometimes happens that we disable
the crtc and cannot re-enable it.

Resolves: https://github.com/libsdl-org/SDL/issues/4630
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-08-12 12:23:40 -07:00
Andrei Alexeyev
68ca35c318 wayland: fix memleak in output listener 2021-08-11 14:11:52 -07:00
Ethan Lee
ae7ee2a59c wayland: Ignore stateless/sizeless configs when starting in fullscreen mode 2021-08-11 11:02:33 -04:00
Sam Lantinga
cb1e20b058 Added KMOD_SCROLL to track the scroll lock state
Fixes https://github.com/libsdl-org/SDL/issues/4566
2021-08-10 17:50:17 -07:00
Sam Lantinga
016b02f24c Fixed build, C89 doesn't allow non-constant static initializers 2021-08-10 12:17:37 -07:00
Ozkan Sezer
77c8d11137 configuration updates for dlopen:
- cmake, configure (CheckDLOPEN): --enable-sdl-dlopen is now history..
  detach the dl api discovery from SDL_LOADSO_DLOPEN functionality.
  define HAVE_DLOPEN. also define DYNAPI_NEEDS_DLOPEN (CheckDLOPEN is
  called only for relevant platforms.)
- update SDL_config.in and SDL_config.cmake accordingly.
- SDL_dynapi.h: set SDL_DYNAMIC_API to 0 if DYNAPI_NEEDS_DLOPEN is
  defined, but HAVE_DLOPEN is not.
- pthread/SDL_systhread.c: conditionalize dl api use to HAVE_DLOPEN
- SDL_x11opengl.c, SDL_DirectFB_opengl.c, SDL_naclopengles.c: rely
  on HAVE_DLOPEN, not SDL_LOADSO_DLOPEN.
- SDL_config_android.h, SDL_config_iphoneos.h, SDL_config_macosx.h,
  SDL_config_pandora.h, and SDL_config_wiz.h: define HAVE_DLOPEN.

Closes: https://github.com/libsdl-org/SDL/pull/4351
2021-08-10 12:07:32 -07:00
hgs3
cb0fd05eeb Adding a clarifying comment in case a programmer unfamiliar with UTF-16 and UTF-32's relationship chances upon the code. 2021-08-10 12:07:11 -07:00
Henry G. Stratmann III
3470112969 Optimizing the implementation. 2021-08-10 12:07:11 -07:00
Henry G. Stratmann III
712e0d1f06 Fixing WM_CHAR event handling for Unicode characters outside the Basic Multilingual Plane. 2021-08-10 12:07:11 -07:00
Sam Lantinga
fcfd19db86 Added support for SDL_RENDERER_PRESENTVSYNC to the software renderer
This fixes https://github.com/libsdl-org/SDL/issues/4612
2021-08-10 12:02:59 -07:00
Sebastian Krzyszkowiak
b3a989d0df video: Fix false positives in driver name comparison
Without this change, driver names don't get matched correctly;
for example "x" can get matched with "x11" since it only checks
whether the string matches up to the length of the requested
driver name.
2021-08-10 08:34:07 -07:00
Cameron Gutman
6ae227d011 x11/wayland: fix screensaver suspension via D-Bus
b08b1bde introduced a subtle bug. Despite not using D-Bus types directly,
the code used the SDL_USE_LIBDBUS definition set by SDL_dbus.h to conditionally
compile calls SDL_DBus_ScreensaverTickle() and SDL_DBus_ScreensaverInhibit().
As a result, it still compiled without SDL_dbus.h included, but screensaver
suspension silently failed to work.

The D-Bus stuff could probably use some tweaks to be harder to accidentally
break, but for now just restore the header includes.
2021-08-08 23:47:42 -05:00
Sebastian Krzyszkowiak
2e6dac870f wayland: Add a hint to allow disabling libdecor use
Useful for testing xdg-shell path with compositors like Weston.
2021-08-08 18:05:47 -07:00
Cameron Gutman
092a20d945 wayland: Avoid busy waiting for vsync 2021-08-08 18:04:08 -07:00
Ethan Lee
7be970db31 wayland: Avoid setting floating width/height when re-entering fullscreen 2021-08-06 19:51:27 -04:00
Sam Lantinga
a91ab883e9 Fixed building on Windows with cmake, ninja, and clang 2021-08-06 12:28:24 -07:00
Ethan Lee
10979d37fb wayland: Always assume configure is wrong for non-resizable windows.
Configure events from compositors have an extremely annoying habit of giving us
completely bogus sizes, from all sorts of places. Thankfully, the protocol
gives us the ability to completely ignore the width/height and just stick with
what we know, so for all windows that are not meant to be resized, pretend we
never even got the width/height at all, the compositor is required to respect
our dimensions whether they match configure's suggestion or not.
2021-08-05 17:19:11 -04:00
Sam Lantinga
88674b4a0e Fixed build 2021-08-04 13:17:35 -07:00