Commit Graph

9697 Commits

Author SHA1 Message Date
Sam Lantinga b85118f565 Merge commit 'ca30936314e1867c143475ea278988f82af95155' into main 2022-06-29 17:25:03 -07:00
Sam Lantinga 43f55e6f0a Merge commit '118a2189fb203dedc274848833b5431273cb1db5' into main 2022-06-29 17:25:01 -07:00
Sam Lantinga 02cbf8b702 Merge commit 'bd49696133eded6f441b20391b5bb4376b3834d8' into main 2022-06-29 17:24:59 -07:00
Sam Lantinga 808edbcdca Merge commit '6dcb2868b03b21a4cfacf0d5804ee07cfde0a0c7' into main 2022-06-29 17:24:57 -07:00
Sam Lantinga 88816d65d5 Merge commit '78a37516593dbcedb2b0d1a5177f37c348dbb528' into main 2022-06-29 17:24:55 -07:00
Sam Lantinga 233e88f707 Merge commit 'c61367c2731dca1e7ea0e881f69d96317c0aaaab' into main 2022-06-29 17:24:53 -07:00
Sam Lantinga 048da613a5 Merge commit '965c16453785279d921b584c92f14bd0ef034730' into main 2022-06-29 17:24:51 -07:00
Sam Lantinga 4ff3d844ad Merge commit '3617691fe0cb3b29ffcdeb5567d85126de91ba15' into main 2022-06-29 17:24:49 -07:00
Sam Lantinga c01ad8e24a Merge commit 'b3159714dbb1afe1de9a32e86f9ed8e40ae543af' into main 2022-06-29 17:24:48 -07:00
Sam Lantinga 7d0ce0f719 Merge commit 'de409d2a816745b3eb02e780bc7af070a2cc8449' into main 2022-06-29 17:24:46 -07:00
Sam Lantinga 3276436760 Merge commit '2f321fb73c6408b368a20bb08bd08e6265e6ce38' into main 2022-06-29 17:24:44 -07:00
Sam Lantinga ec1ad6b2ef Merge commit '3b0c86a36fd97d4fddc8d025d0473a7a6c6de3ca' into main 2022-06-29 17:24:42 -07:00
Sam Lantinga 6b11992678 Merge commit '5f4e9fb9b3b53897cb9ed43791e2180a942b3377' into main 2022-06-29 17:24:40 -07:00
Sam Lantinga 3420751c4f Merge commit '485b1037b061edb4e9768b6f3b08c35454a621ce' into main 2022-06-29 17:24:38 -07:00
Sam Lantinga fe00c19455 Merge commit '3e1021239a29b377fec7af9b45cd49b5d42531ca' into main 2022-06-29 17:24:36 -07:00
Sam Lantinga f716a9a271 Merge commit '4ad4fe67c7f832ec6e8e8a5c04b030691753f39a' into main 2022-06-29 17:24:34 -07:00
Anonymous Maarten ca30936314 cmake: check and use clock_gettime by default on android 2022-06-24 19:12:15 +02:00
Ryan C. Gordon 118a2189fb
build-scripts/wikiheaders.pl: ignore the 'FrontPage' wiki pages. 2022-06-23 16:07:35 -04:00
hsdk123 bd49696133
cmake: use CMAKE_CURRENT_BINARY_DIR instead of CMAKE_BINARY_DIR (#5834)
* Update install directory to match generated

https://github.com/libsdl-org/SDL/blob/main/CMakeLists.txt#L3122
Sets `SDL2Config.cmake` to `CMAKE_BINARY_DIR`, whereas the install file tries to find it from a different location.

* cmake: use CMAKE_CURRENT_BINARY_DIR instead of CMAKE_BINARY_DIR

* ci: test SDL included as a cmake subproject

Co-authored-by: Anonymous Maarten <anonymous.maarten@gmail.com>
2022-06-23 14:18:44 +02:00
Anonymous Maarten 6dcb2868b0 cmake: avoid use of possible non-available XEXT_LIB 2022-06-23 14:17:38 +02:00
Anonymous Maarten 78a3751659 cmake+ci: fix+test sdl2-config + sdl2.pc for all supported platforms 2022-06-23 14:17:38 +02:00
Anonymous Maarten c61367c273 cmake: do list(APPEND SDLMAIN_SOURCES) 2022-06-23 14:17:38 +02:00
Anonymous Maarten 965c164537 cmake: let cmake test script make use of the installed cmake scripts 2022-06-23 14:17:38 +02:00
Anonymous Maarten 3617691fe0 cmake: install Android.mk files for ndk-build
This allows including SDL2 with ndk-build using
NDK_MODULE_PATH + import-module

An install tree looks like:
```
`-- share
    |-- aclocal
    |   `-- sdl2.m4
    |-- licenses
    |   `-- SDL2
    |       `-- LICENSE.txt
    `-- ndk-modules
        |-- SDL2
        |   `-- Android.mk
        |-- SDL2-static
        |   `-- Android.mk
        |-- SDL2main
        |   `-- Android.mk
        `-- SDL2test
            `-- Android.mk
```

The generated `/share/ndk-modules/SDL2/Android.mk` contains:
```
LOCAL_PATH := $(call my-dir)
_IMPORT_PREFIX := $(LOCAL_PATH)/../../..

include $(CLEAR_VARS)
LOCAL_MODULE := SDL2
LOCAL_SRC_FILES := $(_IMPORT_PREFIX)/lib/libSDL2.so
LOCAL_CPP_FEATURES := rtti exceptions
LOCAL_EXPORT_C_INCLUDES := ${_IMPORT_PREFIX}/include\
${_IMPORT_PREFIX}/include/SDL2
include $(PREBUILT_SHARED_LIBRARY)`
```
2022-06-23 14:17:38 +02:00
Anonymous Maarten b3159714db cmake: set HAVE_STATIC_PIC for correct summary 2022-06-23 14:17:38 +02:00
Anonymous Maarten de409d2a81 cmake: remove spurious UNIX_SYS in dep_option 2022-06-23 14:17:38 +02:00
Anonymous Maarten 2f321fb73c cmake: disable UNIX_SYS by default for Android
This force disables SDL_OSS, SDL_ALSA, SDL_JACK, SDL_ESD,
SDL_PIPEWIRE, SDL_ARTS, SDL_NAS, SDL_SNDIO, SDL_LIBSAMPLERATE,
SDL_RPATH, SDL_CLOCK_GETTIME and SDL_X11.
2022-06-23 14:17:38 +02:00
Wouter Wijsman 3b0c86a36f
Merge pull request #5835 from fjtrujy/psp/improveJoystickDriver
[PSP] Improve Joystick driver
2022-06-23 01:14:56 +02:00
Anonymous Maarten 5f4e9fb9b3 cmake: use add_custom_command to copy include files
Otherwise, the make program would not rebuild when a header got changed
2022-06-22 17:04:58 +02:00
Anonymous Maarten 485b1037b0 cmake: copy all headers to the build directory and exclusively use that 2022-06-22 17:04:58 +02:00
Anonymous Maarten 3e1021239a cmake: also add the recently-added include folder to the public interface 2022-06-22 17:04:58 +02:00
Anonymous Maarten 4ad4fe67c7 cmake: install generated SDL_config.h
The generated SDL_config.h recently changed location, so update the install.
2022-06-22 17:04:58 +02:00
Francisco Javier Trujillo Mata 2b41f497db Improve Joystick removing semaphores 2022-06-22 15:08:41 +02:00
Francisco Javier Trujillo Mata c3a5e4aa7b Adding GetGamepadMapping to Vita Joystick driver 2022-06-22 02:23:00 +03:00
Ozkan Sezer 7adb08a79a fixed SDL_BlitMap typedef redefinition errors 2022-06-22 01:37:00 +03:00
Ryan C. Gordon 12b371ee0f
x11: Don't send diplay-add events for displays connected at init time.
Reference Issue #4977.
2022-06-21 14:49:21 -04:00
Frank Praznik c11bdeeb69 wayland: Round fractional backbuffer sizes halfway away from zero
Use SDL_lroundf() to round fractional backbuffer sizes halfway away from zero, as this is the rounding method recommended by the forthcoming Wayland fractional scaling protocol.
2022-06-21 14:01:29 -04:00
Ryan C. Gordon ff735b3c0f
SDL_Surface: don't implicitly declare struct SDL_BlitMap.
It's just an opaque type, but it's more clear to have it typedef'd outside
the containing struct.

Fixes #5828.
2022-06-20 18:31:39 -04:00
Anonymous Maarten d460000b45 cmake: use add_definitions for compatibility with cmake 3.0 2022-06-20 19:29:13 +02:00
Pieter-Jan Briers 9914e87faa Also send DPI change when expected resize. 2022-06-20 06:54:40 -07:00
Pieter-Jan Briers af733c7a32 Fix DPI-raised SDL_WINDOWEVENT_SIZE_CHANGED with event callback.
Move the sending of this event down so stuff like calling SDL_GL_GetDrawableSize() from a callback reports the new size instead of the old one.
2022-06-20 06:54:40 -07:00
Ozkan Sezer 2316e5682e SDL_windows.h: match WINVER value to _WIN32_WINNT. 2022-06-19 08:33:28 -07:00
Ozkan Sezer 22a29321e9 tweak _WIN32_WINNT value for shellscalingapi.h present but no d3d12 2022-06-19 08:33:28 -07:00
Ozkan Sezer bdcdbfc757 Enable D3D12 detection when using mingw-w64 with cmake too
c.f.: autotools commit 59fb7acbf7
2022-06-19 11:04:24 +03:00
Ryan C. Gordon 48a232969d
wikiheaders: Strip `[[wiki hyperlink]]` from See Also fields. 2022-06-19 00:15:41 -04:00
Sam Lantinga abe38bca3e Support SDL_AUDIODRIVER set to "dsound", which was used by SDL 1.2
Fixes https://github.com/libsdl-org/SDL/issues/5818
2022-06-18 13:08:58 -07:00
Ozkan Sezer a8d41b3b45 check for shellscalingapi.h presence instead of WINVER >= 0x0603 2022-06-18 13:00:44 -07:00
Sam Lantinga 5f6d0abebe SDL_SendEditingText() has int parameters, so use that type for parameter calculation
We might want to use ssize_t as @Guldoman suggested, but that's a larger internal API change, and still requires casting of the SDL_utf8strnlen() result.

Fixes https://github.com/libsdl-org/SDL/pull/5821
2022-06-18 12:59:28 -07:00
Mathieu Eyraud 00b95e989b Fix read of uninitialised variable
If the condition (dbus->message_iter_get_arg_type(&sub) == DBUS_TYPE_STRING) is false, subtext is not initialised.
2022-06-18 18:23:50 +03:00
Alex Richardson d51a8f530e cmake: freebsd: Fix -Wformat warning during tests build
Without using <inttypes.h>, SDL_PRIx64 will expand to llx, but on 64-bit
FreeBSD platforms (u)int64_t is `(usigned) long`:
SDL_test_memory.c:261:77: error: format specifies type 'unsigned long long' but the argument has type 'Uint64' (aka 'unsigned long') [-Werror,-Wformat]

This commit updates config_minimal.h to also assume presence of inttypes.h
for everything except old MSVC.
2022-06-18 07:37:57 -07:00