Commit Graph

8996 Commits (40b7326b384aef84d3a688babb304bc2f333b6f7)

Author SHA1 Message Date
David Redondo e2ade2bfc4 Fix build against wayland 1.20
Fixes #5088
2021-12-10 08:59:20 -08:00
David Gow 9da93d074b video: x11: Set XImage's byte_order field (fix #5081)
If the X server's byte order is different from the client, things might
display in the wrong colour.

Apparently we can just set the byte_order field to the client's byte
order, and the X server will adjust everything automatically:
https://xorg.freedesktop.narkive.com/GbSD1aPq/ximage-s-byte-order-field
2021-12-09 20:40:12 -08:00
Hanseul Jun e7f84c20bc Fix a typo in comment. 2021-12-09 11:05:23 -08:00
Hanseul Jun 66fbf00e7d Temporarily ignore gl_config.driver_loaded check in Cocoa_GLES_SetupWindow. 2021-12-09 11:05:23 -08:00
Valentin Hăloiu cb8fa5f9c3 wayland: fix keycodes of swapped xkb modifier keys 2021-12-09 09:30:58 -08:00
Ozkan Sezer 615f7b4453 more updates to os2 makefile for libiconv 2021-12-08 23:51:56 +03:00
Ozkan Sezer b6d40b29a9 minor update to os2 makefile. 2021-12-08 21:15:24 +03:00
Ozkan Sezer 8d14e6ea44 replaced use of _MAX_PATH with CCHMAXPATH in os/2 code,
it now compiles without HAVE_LIBC
2021-12-08 14:01:02 +03:00
Sylvain 1940d289bf
SW Renderer: fix invalid read if VSYNC hint is initially set with an empty value (eg "")
because:
- GeHint return a value pointer.
- SetHint free internally the pointer
- The -now invalid- pointer is re-read

==9363== Invalid read of size 1
==9363==    at 0x4946860: SW_CreateRenderer (SDL_render_sw.c:1044)
==9363==    by 0x48F0EC3: SDL_CreateRenderer_REAL (SDL_render.c:938)
==9363==    by 0x48C5921: SDL_CreateRenderer (SDL_dynapi_procs.h:332)
==9363==    by 0x401584: main (main.c:421)
==9363==  Address 0x9c24040 is 0 bytes inside a block of size 1 free'd
==9363==    at 0x484621F: free (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==9363==    by 0x494E403: SDL_free_REAL (SDL_malloc.c:5432)
==9363==    by 0x48A6153: SDL_SetHintWithPriority_REAL (SDL_hints.c:76)
==9363==    by 0x48A6254: SDL_SetHint_REAL (SDL_hints.c:101)
2021-12-08 09:41:33 +01:00
Ozkan Sezer 9409642e08 fix some warnings from vita builds (missing includes)
also some tidy-up to whitespace.
2021-12-07 21:24:24 +03:00
stdgregwar 21d46b7e0c PSP renderer fixed 2021-12-07 20:55:04 +03:00
Sergio Padrino 6f6382f8d0 Fix SDL_GameController API for PSP (#3)
- Add missing mapping
- Make sure the only window has the keyboard focus (so no `SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS` is needed)
2021-12-07 09:04:05 -08:00
Cameron Gutman da0f76de6d cocoa: Don't round scroll deltas from trackpads
Rounding the scroll deltas from trackpads causes jerky scrolling behavior
by artificially amplifying the effects of very small scroll movements.

We should only round events from devices with discrete scroll wheels,
because we know the smallest unit of movement there is a single tick.
2021-12-07 09:02:35 -08:00
Ozkan Sezer 8cee50eea5 removed stdlib.h from SDL_psp_main.c now that exit() is gone. 2021-12-07 19:32:56 +03:00
Ozkan Sezer 4facca0bff made Makefile.psp to build libSDL2main.a 2021-12-07 19:32:56 +03:00
Ozkan Sezer 00014dc2ac fix some warnings from psp builds (missing includes.) 2021-12-07 18:47:10 +03:00
Wouter Wijsman da5dbb4763
Fix SDL2main on PSP (#5076)
- Fix SDL2main on PSP
  SDL2main was not working for PSP, because it wasn't being activated and
  it wasn't unsetting the main. Besides that a debug screen being started
  was causing issues with joystick input and the sceKernelExitGame calli
  is no longer needed with the current PSPDEV SDK.
- Clean up imports in PSP main
- Set PSP GPU and user modes in main
- Fix exit callback in PSP main
2021-12-07 18:43:50 +03:00
Cameron Gutman 2d673e5b56 evdev: Add support for REL_WHEEL_HI_RES and REL_HWHEEL_HI_RES
If supported, these come alongside the regular REL_WHEEL and REL_HWHEEL
events so it's important that we only process one or the other.
2021-12-07 07:00:31 -08:00
Ozkan Sezer 493d45f00f minor tidy-up in cmake script. 2021-12-07 14:24:32 +03:00
Ozkan Sezer f266d92286 psp/SDL_sysjoystick.c: fix -Wshadow warnings. 2021-12-07 14:04:32 +03:00
Ozkan Sezer 801dcbc5ef SDL_render_sw.c: fix -Wshadow warnings. 2021-12-07 14:04:10 +03:00
Wouter Wijsman e17a3154ed Fix build issue 2021-12-07 14:03:00 +03:00
Wouter Wijsman 7266cf66c7 Clean up PSP render code to fit C standard used better 2021-12-07 14:03:00 +03:00
Wouter Wijsman 07608bf45f Fix ISO C90 violations in psp render code 2021-12-07 14:03:00 +03:00
Wouter Wijsman 897c7cfa8b Make sure SDL_VIDEO_RENDER_PSP is set 2021-12-07 14:03:00 +03:00
Wouter Wijsman bfbdf8969e Add automated build for PSP 2021-12-07 14:03:00 +03:00
Wouter Wijsman a79b642638 Make SDL2 able to build or PSP with cmake 2021-12-07 14:03:00 +03:00
Wouter Wijsman 21fd0047e3 Initial for building PSP version with CMake 2021-12-07 14:03:00 +03:00
Sylvain d09f80ef18
SDL_DrawPointsF: fix error message typo 2021-12-07 11:31:57 +01:00
Sylvain 6dafc85017
SDL_DrawLines: minor simpification:
- scale is  1.0f, don't need to multiply
- typo in error message
- remap SDL_DrawLines to SDL_DrawLinesF
2021-12-07 10:44:12 +01:00
Sylvain a0818a63e3
Fixed bug #5071 - Float conversion warnings in SDL_render.c (see also #5003) 2021-12-07 10:07:15 +01:00
Cameron Gutman 9ae56cb353 events: Add logging for SDL_MOUSEWHEEL preciseX/Y fields 2021-12-06 21:18:23 -06:00
Ozkan Sezer 03019c912a autotools, cmake: tighten Xfixes check && explicitly test BarrierEventID
Apparently the older versions of libXi doesn't have it.  Fixes the build
break issue reported at:
4b42c05ba1 (commitcomment-61427659)
2021-12-06 20:37:52 +03:00
David Gow a709b5b602 video: wayland: Handle 0x0 xdg_toplevel_configure in fullscreen
The xdg_shell spec seems to state[1] that xdg_toplevel_configure events can
always provide a 0×0 width/height to signal that the compositor doesn't
care. SDL previously assumed the provided width/height was always valid
for fullscreen windows, and so applied it as-is.

This broke SDL applications on KDE/KWin 5.23, which now sends 0×0
configure events (and, in 5.23.3, 1×1 events for some reason), breaking
all SDL applications in fullscreen[2].

[1]: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/6
[2]: https://bugs.kde.org/show_bug.cgi?id=444962#c6
2021-12-06 09:09:37 -08:00
ALittleDruid 2f0edc2906 IAudioClient::SetEventHandle Parameter eventHandle Should not be NULL 2021-12-06 09:02:31 -08:00
Cameron Gutman b7a0200aab Update 2.0.18 release notes with CMake prefix change 2021-12-03 09:35:47 -08:00
Ozkan Sezer a887b8e28b SDL_test_common.c: replaced all printf() calls with SDL_Log()
Otherwise, if one builds libSDL2_test using a new mingw but builds
the test programs using an older mingw, a link failure happens:

/opt/local/x86_64-w64-mingw32/lib/libSDL2_test.a(SDL_test_common.o): In function `printf':
/opt/local/x86_64-w64-mingw32/include/stdio.h:372: undefined reference to `__imp___acrt_iob_func'
collect2: ld returned 1 exit status
2021-12-03 20:03:10 +03:00
Weng Xuetian 5056b29b0f Fix the wrong int size for fcitx capability. 2021-12-03 04:31:24 -08:00
Anders Jenbo d68b429cfb [ios] Fix failing to link iconv when build using CMake 2021-12-03 04:30:53 -08:00
Ozkan Sezer 514f5858e4 autotools: disable static builds on os/2 2021-12-02 20:11:40 +03:00
Sylvain e14d10263c Change viewport and cliprect to float version: from SDL_Rect to SDL_FRect 2021-12-02 10:01:50 +01:00
Sylvain 7828362da9 SDL_Renderer software, D3D11: don't use "renderer->viewport" in back-ends, but use the one from SETVIEWPORT cmd 2021-12-02 10:01:50 +01:00
Ozkan Sezer a2b13e585c SDL_iconv_string: avoid memory leak if realloc() fails. 2021-12-02 02:28:24 +03:00
Ozkan Sezer f14a8bfa4e fix whitespace. 2021-12-01 21:33:02 +03:00
Ozkan Sezer b71bfdaafb SDL_iconv.c (encodings): mark "WCHAR_T" as ENCODING_UTF16LE for OS/2 too
whcar_t is unsigned short in os/2, like windows
2021-12-01 20:50:40 +03:00
Sam Lantinga cbe97cbf7f Added a step necessary for running on a real device 2021-11-30 21:25:40 -08:00
Davis Mosenkovs 66b0a6ee15 workaround for libmali gbm_device_get_fd()
gbm_device_get_fd() in at least some libmali versions duplicates handle.
Other implementations do not do duplication. To prevent handle leak save
drm_fd in SDL_DisplayData.
2021-11-30 16:20:24 -08:00
Simon McVittie 0c7c4bfcf9 docs: Don't let Doxygen expand HOME environment variable
Otherwise, the API documentation will encode the home directory of the
user or autobuilder that built SDL, instead of telling the user to use
the literal string $(HOME) as intended.

See also <https://github.com/doxygen/doxygen/issues/7073>.

Signed-off-by: Simon McVittie <smcv@debian.org>
2021-12-01 02:37:40 +03:00
Ozkan Sezer 339f0d4097 configure.ac: adjust os2 section for system iconv() use. 2021-12-01 02:32:10 +03:00
Ozkan Sezer 563ef2aeb2 regenerated configure scripts. 2021-12-01 01:56:50 +03:00