unknown
ebe4f47f2b
Fixed __VA_ARGS__ in gcc when no args
2022-06-26 15:35:18 -07:00
unknown
51c6488f97
Add support for SDL_render_d3d12.c to compile in C++ mode
2022-06-26 15:35:18 -07:00
Anonymous Maarten
fa39f73552
cmake: add generated files to a custom target ( #5851 )
...
This way, headers are only generated once .
2022-06-26 23:34:30 +02:00
Ozkan Sezer
787dc260a8
autotools: properly enable the version static assertions
...
SDL doesn't use automake, therefore instead of AC_DEFINE_UNQUOTED
manually add the defines to EXTRA_CFLAGS.
2022-06-24 20:37:20 +03:00
Anonymous Maarten
76f40e2b3b
cmake: remove stray debug line
2022-06-24 19:12:39 +02: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
Sam Lantinga
12f14bdbeb
Fixed digit count in sscanf, e.g. "%1x"
2022-06-18 07:02:38 -07:00
Sam Lantinga
9065897514
Added test for digit count in sscanf, e.g. "%1x"
2022-06-18 06:53:05 -07:00
Sam Lantinga
28ecdc6bc7
No need to cast from char* to const char*
2022-06-18 06:52:46 -07:00
Sam Lantinga
53e307050b
List the available tests if the filter didn't match
2022-06-18 06:52:16 -07:00
Anonymous Maarten
e7ad511b4b
cmake: fix location of include dir for SDL2 VC sdk
2022-06-18 13:30:54 +02:00
Sam Lantinga
eb7e29a8b2
Fixed crash when the joystick product name isn't available
2022-06-17 17:43:14 -07:00
Ryan C. Gordon
83b766174c
build-scripts/wikiheaders.pl: ignore "Category" wiki pages.
2022-06-17 17:35:52 -04:00
Ryan C. Gordon
20c622f090
build-scripts/wikiheaders.pl: Allow a wiki preamble.
...
This is so we can have everything in SDL_net (etc) start with a
"This is not part of the core SDL API" message.
2022-06-17 14:40:35 -04:00
Sam Lantinga
adc6875870
Added SDL_copyp to avoid size mismatch when copying values (thanks @1bsyl!)
...
Closes https://github.com/libsdl-org/SDL/pull/5811
2022-06-17 10:22:28 -07:00
Sam Lantinga
b0e827fb65
Enable improved rumble emulation on DualSense(tm) Wireless Controllers with firmware version 2.24 and newer
2022-06-17 07:55:53 -07:00
Anonymous Maarten
b19099d557
cmake: use find_package(SampleRate) to find samplerate + allow targets
2022-06-16 16:47:19 -07:00