mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-05 09:26:25 +00:00
Compare commits
13 Commits
release-3.
...
release-3.
Author | SHA1 | Date | |
---|---|---|---|
![]() |
2be2fb4918 | ||
![]() |
fec1dd4a8b | ||
![]() |
2a3a8f736c | ||
![]() |
d3aff13aa3 | ||
![]() |
54fb312a2c | ||
![]() |
20aa0ad1c5 | ||
![]() |
ff667d35f2 | ||
![]() |
ff9599fb7e | ||
![]() |
0448f20394 | ||
![]() |
db07924104 | ||
![]() |
e60acdc477 | ||
![]() |
d69f658835 | ||
![]() |
3eb9328d3e |
2
.github/workflows/generic.yml
vendored
2
.github/workflows/generic.yml
vendored
@@ -75,7 +75,7 @@ jobs:
|
|||||||
if: ${{ matrix.platform.android-ndk }}
|
if: ${{ matrix.platform.android-ndk }}
|
||||||
id: setup-ndk
|
id: setup-ndk
|
||||||
with:
|
with:
|
||||||
local-cache: true
|
local-cache: false
|
||||||
ndk-version: r28c
|
ndk-version: r28c
|
||||||
- name: 'Configure Android NDK variables'
|
- name: 'Configure Android NDK variables'
|
||||||
if: ${{ matrix.platform.android-ndk }}
|
if: ${{ matrix.platform.android-ndk }}
|
||||||
|
8
.github/workflows/release.yml
vendored
8
.github/workflows/release.yml
vendored
@@ -534,7 +534,7 @@ jobs:
|
|||||||
- name: 'Setup Android NDK'
|
- name: 'Setup Android NDK'
|
||||||
uses: nttld/setup-ndk@v1
|
uses: nttld/setup-ndk@v1
|
||||||
with:
|
with:
|
||||||
local-cache: true
|
local-cache: false
|
||||||
ndk-version: r28c
|
ndk-version: r28c
|
||||||
- name: 'Setup Java JDK'
|
- name: 'Setup Java JDK'
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v4
|
||||||
@@ -607,8 +607,14 @@ jobs:
|
|||||||
python "${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}.aar" -o /tmp/SDL3-android
|
python "${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}.aar" -o /tmp/SDL3-android
|
||||||
echo "prefix=/tmp/SDL3-android" >>$GITHUB_OUTPUT
|
echo "prefix=/tmp/SDL3-android" >>$GITHUB_OUTPUT
|
||||||
echo "sdl3-aar=/tmp/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}.aar" >>$GITHUB_OUTPUT
|
echo "sdl3-aar=/tmp/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}.aar" >>$GITHUB_OUTPUT
|
||||||
|
- name: 'Verify alignment of libSDL3.so (arm64-v8a/x86_64)'
|
||||||
|
run: |
|
||||||
|
set -e
|
||||||
|
${{ steps.src.outputs.path }}/build-scripts/check_elf_alignment.sh ${{ steps.sdk.outputs.prefix }}/lib/arm64-v8a/libSDL3.so
|
||||||
|
${{ steps.src.outputs.path }}/build-scripts/check_elf_alignment.sh ${{ steps.sdk.outputs.prefix }}/lib/x86_64/libSDL3.so
|
||||||
- name: 'CMake (configure + build) x86, x64, arm32, arm64'
|
- name: 'CMake (configure + build) x86, x64, arm32, arm64'
|
||||||
run: |
|
run: |
|
||||||
|
set -e
|
||||||
android_abis="x86 x86_64 armeabi-v7a arm64-v8a"
|
android_abis="x86 x86_64 armeabi-v7a arm64-v8a"
|
||||||
for android_abi in ${android_abis}; do
|
for android_abi in ${android_abis}; do
|
||||||
echo "Configuring ${android_abi}..."
|
echo "Configuring ${android_abi}..."
|
||||||
|
@@ -5,7 +5,7 @@ if(NOT DEFINED CMAKE_BUILD_TYPE)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# See docs/release_checklist.md
|
# See docs/release_checklist.md
|
||||||
project(SDL3 LANGUAGES C VERSION "3.2.24")
|
project(SDL3 LANGUAGES C VERSION "3.2.25")
|
||||||
|
|
||||||
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
|
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
|
||||||
set(SDL3_MAINPROJECT ON)
|
set(SDL3_MAINPROJECT ON)
|
||||||
@@ -1489,6 +1489,9 @@ if(ANDROID)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
if(TARGET SDL3-static)
|
||||||
|
target_link_options(SDL3-static INTERFACE "-Wl,-u,JNI_OnLoad")
|
||||||
|
endif()
|
||||||
|
|
||||||
elseif(EMSCRIPTEN)
|
elseif(EMSCRIPTEN)
|
||||||
# Hide noisy warnings that intend to aid mostly during initial stages of porting a new
|
# Hide noisy warnings that intend to aid mostly during initial stages of porting a new
|
||||||
@@ -1914,7 +1917,7 @@ elseif(WINDOWS)
|
|||||||
target_compile_options(SDL_uclibc PRIVATE $<$<COMPILE_LANGUAGE:C,CXX>:/GS-> $<$<COMPILE_LANGUAGE:C,CXX>:/Gs1048576>)
|
target_compile_options(SDL_uclibc PRIVATE $<$<COMPILE_LANGUAGE:C,CXX>:/GS-> $<$<COMPILE_LANGUAGE:C,CXX>:/Gs1048576>)
|
||||||
if(SDL_CPU_X86)
|
if(SDL_CPU_X86)
|
||||||
target_compile_options(SDL3-shared PRIVATE "/arch:SSE")
|
target_compile_options(SDL3-shared PRIVATE "/arch:SSE")
|
||||||
target_compile_options(SDL3-SDL_uclibc PRIVATE "/arch:SSE")
|
target_compile_options(SDL_uclibc PRIVATE "/arch:SSE")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@@ -19,10 +19,10 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>FMWK</string>
|
<string>FMWK</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>3.2.24</string>
|
<string>3.2.25</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>SDLX</string>
|
<string>SDLX</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>3.2.24</string>
|
<string>3.2.25</string>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
@@ -3086,7 +3086,7 @@
|
|||||||
CLANG_ENABLE_OBJC_ARC = YES;
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
DEPLOYMENT_POSTPROCESSING = YES;
|
DEPLOYMENT_POSTPROCESSING = YES;
|
||||||
DYLIB_COMPATIBILITY_VERSION = 201.0.0;
|
DYLIB_COMPATIBILITY_VERSION = 201.0.0;
|
||||||
DYLIB_CURRENT_VERSION = 201.24.0;
|
DYLIB_CURRENT_VERSION = 201.25.0;
|
||||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
GCC_ALTIVEC_EXTENSIONS = YES;
|
GCC_ALTIVEC_EXTENSIONS = YES;
|
||||||
@@ -3121,7 +3121,7 @@
|
|||||||
"@loader_path/Frameworks",
|
"@loader_path/Frameworks",
|
||||||
);
|
);
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.13;
|
MACOSX_DEPLOYMENT_TARGET = 10.13;
|
||||||
MARKETING_VERSION = 3.2.24;
|
MARKETING_VERSION = 3.2.25;
|
||||||
OTHER_LDFLAGS = "$(CONFIG_FRAMEWORK_LDFLAGS)";
|
OTHER_LDFLAGS = "$(CONFIG_FRAMEWORK_LDFLAGS)";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = org.libsdl.SDL3;
|
PRODUCT_BUNDLE_IDENTIFIER = org.libsdl.SDL3;
|
||||||
PRODUCT_NAME = SDL3;
|
PRODUCT_NAME = SDL3;
|
||||||
@@ -3150,7 +3150,7 @@
|
|||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CLANG_ENABLE_OBJC_ARC = YES;
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
DYLIB_COMPATIBILITY_VERSION = 201.0.0;
|
DYLIB_COMPATIBILITY_VERSION = 201.0.0;
|
||||||
DYLIB_CURRENT_VERSION = 201.24.0;
|
DYLIB_CURRENT_VERSION = 201.25.0;
|
||||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
ENABLE_TESTABILITY = YES;
|
ENABLE_TESTABILITY = YES;
|
||||||
@@ -3182,7 +3182,7 @@
|
|||||||
"@loader_path/Frameworks",
|
"@loader_path/Frameworks",
|
||||||
);
|
);
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.13;
|
MACOSX_DEPLOYMENT_TARGET = 10.13;
|
||||||
MARKETING_VERSION = 3.2.24;
|
MARKETING_VERSION = 3.2.25;
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
OTHER_LDFLAGS = "$(CONFIG_FRAMEWORK_LDFLAGS)";
|
OTHER_LDFLAGS = "$(CONFIG_FRAMEWORK_LDFLAGS)";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = org.libsdl.SDL3;
|
PRODUCT_BUNDLE_IDENTIFIER = org.libsdl.SDL3;
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
Title SDL 3.2.24
|
Title SDL 3.2.25
|
||||||
Version 1
|
Version 1
|
||||||
Description SDL Library for macOS (http://www.libsdl.org)
|
Description SDL Library for macOS (http://www.libsdl.org)
|
||||||
DefaultLocation /Library/Frameworks
|
DefaultLocation /Library/Frameworks
|
||||||
|
@@ -61,7 +61,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||||||
private static final String TAG = "SDL";
|
private static final String TAG = "SDL";
|
||||||
private static final int SDL_MAJOR_VERSION = 3;
|
private static final int SDL_MAJOR_VERSION = 3;
|
||||||
private static final int SDL_MINOR_VERSION = 2;
|
private static final int SDL_MINOR_VERSION = 2;
|
||||||
private static final int SDL_MICRO_VERSION = 24;
|
private static final int SDL_MICRO_VERSION = 25;
|
||||||
/*
|
/*
|
||||||
// Display InputType.SOURCE/CLASS of events and devices
|
// Display InputType.SOURCE/CLASS of events and devices
|
||||||
//
|
//
|
||||||
|
@@ -1,16 +1,21 @@
|
|||||||
# Helper for Find modules
|
# Helper for Find modules
|
||||||
|
|
||||||
function(get_flags_from_pkg_config _library _pc_prefix _out_prefix)
|
function(get_flags_from_pkg_config _library _pc_prefix _out_prefix)
|
||||||
if("${_library}" MATCHES "${CMAKE_STATIC_LIBRARY_SUFFIX}$")
|
if(MINGW)
|
||||||
set(_cflags ${_pc_prefix}_STATIC_CFLAGS_OTHER)
|
set(re_shared_suffix ".dll.a$")
|
||||||
set(_link_libraries ${_pc_prefix}_STATIC_LIBRARIES)
|
|
||||||
set(_link_options ${_pc_prefix}_STATIC_LDFLAGS_OTHER)
|
|
||||||
set(_library_dirs ${_pc_prefix}_STATIC_LIBRARY_DIRS)
|
|
||||||
else()
|
else()
|
||||||
|
set(re_shared_suffix "${CMAKE_SHARED_LIBRARY_SUFFIX}$")
|
||||||
|
endif()
|
||||||
|
if("${_library}" MATCHES "${re_shared_suffix}")
|
||||||
set(_cflags ${_pc_prefix}_CFLAGS_OTHER)
|
set(_cflags ${_pc_prefix}_CFLAGS_OTHER)
|
||||||
set(_link_libraries ${_pc_prefix}_LIBRARIES)
|
set(_link_libraries ${_pc_prefix}_LIBRARIES)
|
||||||
set(_link_options ${_pc_prefix}_LDFLAGS_OTHER)
|
set(_link_options ${_pc_prefix}_LDFLAGS_OTHER)
|
||||||
set(_library_dirs ${_pc_prefix}_LIBRARY_DIRS)
|
set(_library_dirs ${_pc_prefix}_LIBRARY_DIRS)
|
||||||
|
else()
|
||||||
|
set(_cflags ${_pc_prefix}_STATIC_CFLAGS_OTHER)
|
||||||
|
set(_link_libraries ${_pc_prefix}_STATIC_LIBRARIES)
|
||||||
|
set(_link_options ${_pc_prefix}_STATIC_LDFLAGS_OTHER)
|
||||||
|
set(_library_dirs ${_pc_prefix}_STATIC_LIBRARY_DIRS)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# The *_LIBRARIES lists always start with the library itself
|
# The *_LIBRARIES lists always start with the library itself
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Main include header for the SDL library, version 3.2.24
|
* Main include header for the SDL library, version 3.2.25
|
||||||
*
|
*
|
||||||
* It is almost always best to include just this one header instead of
|
* It is almost always best to include just this one header instead of
|
||||||
* picking out individual headers included here. There are exceptions to
|
* picking out individual headers included here. There are exceptions to
|
||||||
|
@@ -62,7 +62,7 @@ extern "C" {
|
|||||||
*
|
*
|
||||||
* \since This macro is available since SDL 3.2.0.
|
* \since This macro is available since SDL 3.2.0.
|
||||||
*/
|
*/
|
||||||
#define SDL_MICRO_VERSION 24
|
#define SDL_MICRO_VERSION 25
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This macro turns the version numbers into a numeric value.
|
* This macro turns the version numbers into a numeric value.
|
||||||
|
@@ -9,8 +9,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
|||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 3,2,24,0
|
FILEVERSION 3,2,25,0
|
||||||
PRODUCTVERSION 3,2,24,0
|
PRODUCTVERSION 3,2,25,0
|
||||||
FILEFLAGSMASK 0x3fL
|
FILEFLAGSMASK 0x3fL
|
||||||
FILEFLAGS 0x0L
|
FILEFLAGS 0x0L
|
||||||
FILEOS 0x40004L
|
FILEOS 0x40004L
|
||||||
@@ -23,12 +23,12 @@ BEGIN
|
|||||||
BEGIN
|
BEGIN
|
||||||
VALUE "CompanyName", "\0"
|
VALUE "CompanyName", "\0"
|
||||||
VALUE "FileDescription", "SDL\0"
|
VALUE "FileDescription", "SDL\0"
|
||||||
VALUE "FileVersion", "3, 2, 24, 0\0"
|
VALUE "FileVersion", "3, 2, 25, 0\0"
|
||||||
VALUE "InternalName", "SDL\0"
|
VALUE "InternalName", "SDL\0"
|
||||||
VALUE "LegalCopyright", "Copyright (C) 2025 Sam Lantinga\0"
|
VALUE "LegalCopyright", "Copyright (C) 2025 Sam Lantinga\0"
|
||||||
VALUE "OriginalFilename", "SDL3.dll\0"
|
VALUE "OriginalFilename", "SDL3.dll\0"
|
||||||
VALUE "ProductName", "Simple DirectMedia Layer\0"
|
VALUE "ProductName", "Simple DirectMedia Layer\0"
|
||||||
VALUE "ProductVersion", "3, 2, 24, 0\0"
|
VALUE "ProductVersion", "3, 2, 25, 0\0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
@@ -149,6 +149,52 @@ static SDL_vidpid_list SDL_ignored_gamepads = {
|
|||||||
false
|
false
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
List of words in gamepad names that indicate that the gamepad should not be detected.
|
||||||
|
See also `initial_blacklist_devices` in SDL_joystick.c
|
||||||
|
*/
|
||||||
|
|
||||||
|
enum SDL_GamepadBlacklistWordsPosition {
|
||||||
|
GAMEPAD_BLACKLIST_BEGIN,
|
||||||
|
GAMEPAD_BLACKLIST_END,
|
||||||
|
GAMEPAD_BLACKLIST_ANYWHERE,
|
||||||
|
};
|
||||||
|
|
||||||
|
struct SDL_GamepadBlacklistWords {
|
||||||
|
const char* str;
|
||||||
|
enum SDL_GamepadBlacklistWordsPosition pos;
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct SDL_GamepadBlacklistWords SDL_gamepad_blacklist_words[] = {
|
||||||
|
#ifdef SDL_PLATFORM_LINUX
|
||||||
|
{" Motion Sensors", GAMEPAD_BLACKLIST_END}, // Don't treat the PS3 and PS4 motion controls as a separate gamepad
|
||||||
|
{" IMU", GAMEPAD_BLACKLIST_END}, // Don't treat the Nintendo IMU as a separate gamepad
|
||||||
|
|
||||||
|
// Don't treat the Wii extension controls as a separate gamepad
|
||||||
|
{" Accelerometer", GAMEPAD_BLACKLIST_END},
|
||||||
|
{" IR", GAMEPAD_BLACKLIST_END},
|
||||||
|
{" Motion Plus", GAMEPAD_BLACKLIST_END},
|
||||||
|
{" Nunchuk", GAMEPAD_BLACKLIST_END},
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// The Google Pixel fingerprint sensor, as well as other fingerprint sensors, reports itself as a joystick
|
||||||
|
{"uinput-", GAMEPAD_BLACKLIST_BEGIN},
|
||||||
|
|
||||||
|
{" TouchPad", GAMEPAD_BLACKLIST_END}, // "SynPS/2 Synaptics TouchPad"
|
||||||
|
{" Touchpad", GAMEPAD_BLACKLIST_END}, // "Sony Interactive Entertainment DualSense Wireless Controller Touchpad"
|
||||||
|
{"Synaptics ", GAMEPAD_BLACKLIST_BEGIN}, // "Synaptics TM2768-001"
|
||||||
|
{"Trackpad", GAMEPAD_BLACKLIST_ANYWHERE},
|
||||||
|
{"Clickpad", GAMEPAD_BLACKLIST_ANYWHERE},
|
||||||
|
// "PG-90215 Keyboard", "Usb Keyboard Usb Keyboard Consumer Control", "Framework Laptop 16 Keyboard Module - ISO System Control"
|
||||||
|
{" Keyboard", GAMEPAD_BLACKLIST_ANYWHERE},
|
||||||
|
{" Laptop ", GAMEPAD_BLACKLIST_ANYWHERE}, // "Framework Laptop 16 Numpad Module System Control"
|
||||||
|
{"Mouse ", GAMEPAD_BLACKLIST_BEGIN}, // "Mouse passthrough"
|
||||||
|
{" Pen", GAMEPAD_BLACKLIST_END}, // "Wacom One by Wacom S Pen"
|
||||||
|
{" Finger", GAMEPAD_BLACKLIST_END}, // "Wacom HID 495F Finger"
|
||||||
|
{" LED ", GAMEPAD_BLACKLIST_ANYWHERE}, // "ASRock LED Controller"
|
||||||
|
{" Thelio ", GAMEPAD_BLACKLIST_ANYWHERE}, // "System76 Thelio Io 2"
|
||||||
|
};
|
||||||
|
|
||||||
static GamepadMapping_t *SDL_PrivateAddMappingForGUID(SDL_GUID jGUID, const char *mappingString, bool *existing, SDL_GamepadMappingPriority priority);
|
static GamepadMapping_t *SDL_PrivateAddMappingForGUID(SDL_GUID jGUID, const char *mappingString, bool *existing, SDL_GamepadMappingPriority priority);
|
||||||
static void SDL_PrivateLoadButtonMapping(SDL_Gamepad *gamepad, GamepadMapping_t *pGamepadMapping);
|
static void SDL_PrivateLoadButtonMapping(SDL_Gamepad *gamepad, GamepadMapping_t *pGamepadMapping);
|
||||||
static GamepadMapping_t *SDL_PrivateGetGamepadMapping(SDL_JoystickID instance_id, bool create_mapping);
|
static GamepadMapping_t *SDL_PrivateGetGamepadMapping(SDL_JoystickID instance_id, bool create_mapping);
|
||||||
@@ -2665,27 +2711,29 @@ bool SDL_IsGamepad(SDL_JoystickID instance_id)
|
|||||||
*/
|
*/
|
||||||
bool SDL_ShouldIgnoreGamepad(Uint16 vendor_id, Uint16 product_id, Uint16 version, const char *name)
|
bool SDL_ShouldIgnoreGamepad(Uint16 vendor_id, Uint16 product_id, Uint16 version, const char *name)
|
||||||
{
|
{
|
||||||
#ifdef SDL_PLATFORM_LINUX
|
int i;
|
||||||
if (SDL_endswith(name, " Motion Sensors")) {
|
for (i = 0; i < SDL_arraysize(SDL_gamepad_blacklist_words); i++) {
|
||||||
// Don't treat the PS3 and PS4 motion controls as a separate gamepad
|
const struct SDL_GamepadBlacklistWords *blacklist_word = &SDL_gamepad_blacklist_words[i];
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (SDL_strncmp(name, "Nintendo ", 9) == 0 && SDL_strstr(name, " IMU") != NULL) {
|
|
||||||
// Don't treat the Nintendo IMU as a separate gamepad
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (SDL_endswith(name, " Accelerometer") ||
|
|
||||||
SDL_endswith(name, " IR") ||
|
|
||||||
SDL_endswith(name, " Motion Plus") ||
|
|
||||||
SDL_endswith(name, " Nunchuk")) {
|
|
||||||
// Don't treat the Wii extension controls as a separate gamepad
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (name && SDL_startswith(name, "uinput-")) {
|
switch (blacklist_word->pos) {
|
||||||
// The Google Pixel fingerprint sensor, as well as other fingerprint sensors, reports itself as a joystick
|
case GAMEPAD_BLACKLIST_BEGIN:
|
||||||
return true;
|
if (SDL_startswith(name, blacklist_word->str)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case GAMEPAD_BLACKLIST_END:
|
||||||
|
if (SDL_endswith(name, blacklist_word->str)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case GAMEPAD_BLACKLIST_ANYWHERE:
|
||||||
|
if (SDL_strstr(name, blacklist_word->str) != NULL) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SDL_PLATFORM_WIN32
|
#ifdef SDL_PLATFORM_WIN32
|
||||||
|
@@ -878,9 +878,11 @@ static bool SW_RunCommandQueue(SDL_Renderer *renderer, SDL_RenderCommand *cmd, v
|
|||||||
PrepTextureForCopy(cmd, &drawstate);
|
PrepTextureForCopy(cmd, &drawstate);
|
||||||
|
|
||||||
// Apply viewport
|
// Apply viewport
|
||||||
if (drawstate.viewport && (drawstate.viewport->x || drawstate.viewport->y)) {
|
if (drawstate.viewport &&
|
||||||
copydata->dstrect.x += drawstate.viewport->x;
|
(drawstate.viewport->x || drawstate.viewport->y) &&
|
||||||
copydata->dstrect.y += drawstate.viewport->y;
|
(copydata->scale_x > 0.0f && copydata->scale_y > 0.0f)) {
|
||||||
|
copydata->dstrect.x += (int)(drawstate.viewport->x / copydata->scale_x);
|
||||||
|
copydata->dstrect.y += (int)(drawstate.viewport->y / copydata->scale_y);
|
||||||
}
|
}
|
||||||
|
|
||||||
SW_RenderCopyEx(renderer, surface, cmd->data.draw.texture, ©data->srcrect,
|
SW_RenderCopyEx(renderer, surface, cmd->data.draw.texture, ©data->srcrect,
|
||||||
|
@@ -95,6 +95,39 @@ void _ftol2()
|
|||||||
_ftol();
|
_ftol();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void __declspec(naked) _ftoul2_legacy()
|
||||||
|
{
|
||||||
|
static const Uint64 LLONG_MAX_PLUS_ONE = 0x43e0000000000000ULL;
|
||||||
|
/* *INDENT-OFF* */
|
||||||
|
__asm {
|
||||||
|
fld qword ptr [LLONG_MAX_PLUS_ONE]
|
||||||
|
fcom
|
||||||
|
fnstsw ax
|
||||||
|
test ah, 41h
|
||||||
|
jnp greater_than_int64
|
||||||
|
|
||||||
|
fstp st(0)
|
||||||
|
jmp _ftol
|
||||||
|
|
||||||
|
greater_than_int64:
|
||||||
|
fsub st(1), st(0)
|
||||||
|
fcomp
|
||||||
|
fnstsw ax
|
||||||
|
test ah, 41h
|
||||||
|
jnz greater_than_uint64
|
||||||
|
|
||||||
|
call _ftol
|
||||||
|
add edx, 80000000h
|
||||||
|
ret
|
||||||
|
|
||||||
|
greater_than_uint64:
|
||||||
|
xor eax, eax
|
||||||
|
mov edx, 80000000h
|
||||||
|
ret
|
||||||
|
}
|
||||||
|
/* *INDENT-ON* */
|
||||||
|
}
|
||||||
|
|
||||||
// 64-bit math operators for 32-bit systems
|
// 64-bit math operators for 32-bit systems
|
||||||
void __declspec(naked) _allmul()
|
void __declspec(naked) _allmul()
|
||||||
{
|
{
|
||||||
|
@@ -770,7 +770,8 @@ bool WIN_GetDisplayModes(SDL_VideoDevice *_this, SDL_VideoDisplay *display)
|
|||||||
|
|
||||||
dxgi_output = WIN_GetDXGIOutput(_this, data->DeviceName);
|
dxgi_output = WIN_GetDXGIOutput(_this, data->DeviceName);
|
||||||
|
|
||||||
for (i = 0;; ++i) {
|
// Make sure we add the current mode to the list in case it's a custom mode that doesn't enumerate
|
||||||
|
for (i = ENUM_CURRENT_SETTINGS; ; ++i) {
|
||||||
if (!WIN_GetDisplayMode(_this, dxgi_output, data->MonitorHandle, data->DeviceName, i, &mode, NULL, NULL)) {
|
if (!WIN_GetDisplayMode(_this, dxgi_output, data->MonitorHandle, data->DeviceName, i, &mode, NULL, NULL)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@@ -265,6 +265,14 @@ static int SDLCALL stdlib_snprintf(void *arg)
|
|||||||
SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, "Check text, expected: '%s', got: '%s'", expected, text);
|
SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, "Check text, expected: '%s', got: '%s'", expected, text);
|
||||||
SDLTest_AssertCheck(result == 6, "Check result value, expected: 6, got: %d", result);
|
SDLTest_AssertCheck(result == 6, "Check result value, expected: 6, got: %d", result);
|
||||||
|
|
||||||
|
result = SDL_snprintf(text, sizeof(text), "%06.0f", ((double)SDL_MAX_SINT64) * 1.5);
|
||||||
|
predicted = SDL_snprintf(NULL, 0, "%06.0f", ((double)SDL_MAX_SINT64) * 1.5);
|
||||||
|
expected = "13835058055282163712";
|
||||||
|
SDLTest_AssertPass("Call to SDL_snprintf(\"%%06.2f\", SDL_MAX_SINT64 * 1.5)");
|
||||||
|
SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, "Check text, expected: '%s', got: '%s'", expected, text);
|
||||||
|
SDLTest_AssertCheck(result == SDL_strlen(text), "Check result value, expected: %d, got: %d", (int)SDL_strlen(text), result);
|
||||||
|
SDLTest_AssertCheck(predicted == result, "Check predicted value, expected: %d, got: %d", result, predicted);
|
||||||
|
|
||||||
{
|
{
|
||||||
static struct
|
static struct
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user