mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-03-23 01:01:07 +01:00
Compare commits
80 Commits
release-2.
...
release-2.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
92fe3b19c8 | ||
|
|
30e2b03a65 | ||
|
|
f8943854fd | ||
|
|
325465935d | ||
|
|
1cdd37b32c | ||
|
|
499bff9c3a | ||
|
|
bd06e43b87 | ||
|
|
72e5620202 | ||
|
|
fbb9646806 | ||
|
|
4b91f0793c | ||
|
|
6243a80b3f | ||
|
|
e0b0a98c8e | ||
|
|
785eac863b | ||
|
|
ab8659922d | ||
|
|
d48f9c4af4 | ||
|
|
5cc0644aa0 | ||
|
|
91accc391d | ||
|
|
3ee20388c5 | ||
|
|
2449510673 | ||
|
|
2c07ed320e | ||
|
|
607f37dafd | ||
|
|
acc2e040ce | ||
|
|
faa9bbdc8e | ||
|
|
cf6c760cd3 | ||
|
|
e49349ac0c | ||
|
|
1e5db996ff | ||
|
|
793a0681a9 | ||
|
|
825ffaa168 | ||
|
|
9ad6a36b7b | ||
|
|
c3b53c72c7 | ||
|
|
0800d81fb4 | ||
|
|
c27219695a | ||
|
|
9dcfc308ef | ||
|
|
77b3a6afaf | ||
|
|
dd42795131 | ||
|
|
fb1497566c | ||
|
|
cc6c0fe230 | ||
|
|
f9a46a319b | ||
|
|
48a0592a45 | ||
|
|
1c74a8b5ae | ||
|
|
3d18043005 | ||
|
|
6e1e00701e | ||
|
|
5570d846ea | ||
|
|
f5dcb8f7ad | ||
|
|
f6f1b09b69 | ||
|
|
bf540985aa | ||
|
|
c39f86c28a | ||
|
|
b5da8ad00d | ||
|
|
f62b86263a | ||
|
|
3449c734d5 | ||
|
|
3f29d985fe | ||
|
|
2f4a7bbced | ||
|
|
a0522e4c21 | ||
|
|
f461d91cd2 | ||
|
|
ef54e0c4f4 | ||
|
|
863f39fb9f | ||
|
|
d33b28c9fe | ||
|
|
c15a87a614 | ||
|
|
45de0635ac | ||
|
|
bca314c339 | ||
|
|
f05490d0e2 | ||
|
|
442e201705 | ||
|
|
9c346b2321 | ||
|
|
a6b684d05a | ||
|
|
8fb82da226 | ||
|
|
0949f89028 | ||
|
|
350a49e1cc | ||
|
|
bc19e38728 | ||
|
|
228a2954d7 | ||
|
|
3d6d4ca2cd | ||
|
|
4c3e5cf1d1 | ||
|
|
27b1b6d4eb | ||
|
|
24269007d8 | ||
|
|
d849036927 | ||
|
|
5be47255ba | ||
|
|
8f860b3698 | ||
|
|
35992597ae | ||
|
|
3f0d7a2937 | ||
|
|
dae1232489 | ||
|
|
8e388843b8 |
1
.github/workflows/main.yml
vendored
1
.github/workflows/main.yml
vendored
@@ -64,6 +64,7 @@ jobs:
|
||||
if: runner.os == 'macOS'
|
||||
run: |
|
||||
brew install \
|
||||
autoconf \
|
||||
ninja \
|
||||
pkg-config
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ endif()
|
||||
# See docs/release_checklist.md
|
||||
set(SDL_MAJOR_VERSION 2)
|
||||
set(SDL_MINOR_VERSION 30)
|
||||
set(SDL_MICRO_VERSION 1)
|
||||
set(SDL_MICRO_VERSION 4)
|
||||
set(SDL_VERSION "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}.${SDL_MICRO_VERSION}")
|
||||
|
||||
# Set defaults preventing destination file conflicts
|
||||
@@ -241,7 +241,7 @@ endif()
|
||||
if(UNIX OR MINGW OR MSYS OR (USE_CLANG AND NOT WINDOWS) OR VITA OR PSP OR PS2 OR N3DS)
|
||||
set(OPT_DEF_LIBC ON)
|
||||
endif()
|
||||
if(WINDOWS OR IOS OR TVOS)
|
||||
if(WINDOWS OR DARWIN OR MACOSX OR IOS OR TVOS)
|
||||
set(SDL_SYSTEM_ICONV_DEFAULT OFF)
|
||||
else()
|
||||
set(SDL_SYSTEM_ICONV_DEFAULT ON)
|
||||
@@ -926,22 +926,6 @@ if(SDL_ASSEMBLY)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(SDL_LASX)
|
||||
cmake_push_check_state()
|
||||
set(CMAKE_REQUIRED_FLAGS "-mlasx")
|
||||
check_c_source_compiles("
|
||||
#ifndef __loongarch_asx
|
||||
#error Assembler CPP flag not enabled
|
||||
#endif
|
||||
int main(int argc, char **argv) { return 0; }" CPU_SUPPORTS_LASX)
|
||||
check_include_file("lasxintrin.h" HAVE_LASXINTRIN_H)
|
||||
cmake_pop_check_state()
|
||||
if(CPU_SUPPORTS_LASX AND HAVE_LASXINTRIN_H)
|
||||
list(APPEND EXTRA_CFLAGS "-mlasx")
|
||||
set(HAVE_LASX TRUE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(SDL_ARMSIMD)
|
||||
set(ORIG_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
|
||||
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -x assembler-with-cpp")
|
||||
@@ -1107,6 +1091,8 @@ if(SDL_LIBC)
|
||||
check_symbol_exists(getauxval "sys/auxv.h" HAVE_GETAUXVAL)
|
||||
check_symbol_exists(elf_aux_info "sys/auxv.h" HAVE_ELF_AUX_INFO)
|
||||
check_symbol_exists(poll "poll.h" HAVE_POLL)
|
||||
check_symbol_exists(memfd_create "sys/mman.h" HAVE_MEMFD_CREATE)
|
||||
check_symbol_exists(posix_fallocate "fcntl.h" HAVE_POSIX_FALLOCATE)
|
||||
|
||||
check_library_exists(m pow "" HAVE_LIBM)
|
||||
if(HAVE_LIBM)
|
||||
@@ -1824,13 +1810,11 @@ elseif(WINDOWS)
|
||||
check_include_file(d3d9.h HAVE_D3D_H)
|
||||
check_include_file(d3d11_1.h HAVE_D3D11_H)
|
||||
check_c_source_compiles("
|
||||
#include <winsdkver.h>
|
||||
#include <sdkddkver.h>
|
||||
#include <d3d12.h>
|
||||
#include <d3d12sdklayers.h>
|
||||
ID3D12Device1 *device;
|
||||
#if WDK_NTDDI_VERSION > 0x0A000008
|
||||
int main(int argc, char **argv) { return 0; }
|
||||
#endif" HAVE_D3D12_H)
|
||||
int main(int argc, char **argv) {return 0; }
|
||||
" HAVE_D3D12_H)
|
||||
check_include_file(ddraw.h HAVE_DDRAW_H)
|
||||
check_include_file(dsound.h HAVE_DSOUND_H)
|
||||
check_include_file(dinput.h HAVE_DINPUT_H)
|
||||
|
||||
@@ -52,7 +52,7 @@ WAYLAND_SCANNER_CODE_MODE = @WAYLAND_SCANNER_CODE_MODE@
|
||||
|
||||
INSTALL_SDL2_CONFIG = @INSTALL_SDL2_CONFIG@
|
||||
|
||||
SRC_DIST = *.md *.txt acinclude Android.mk autogen.sh android-project build-scripts cmake cmake_uninstall.cmake.in configure configure.ac docs include Makefile.* mingw sdl2-config.cmake.in sdl2-config-version.cmake.in sdl2-config.in sdl2.m4 sdl2.pc.in SDL2.spec.in SDL2Config.cmake.in src test VisualC VisualC-WinRT Xcode Xcode-iOS wayland-protocols
|
||||
SRC_DIST = *.md *.txt acinclude Android.mk autogen.sh android-project build-scripts cmake cmake_uninstall.cmake.in configure configure.ac docs include Makefile.* mingw sdl2-config.cmake.in sdl2-config-version.cmake.in sdl2-config.in sdl2.m4 sdl2.pc.in SDL2.spec.in SDL2Config.cmake.in src test VisualC VisualC-GDK VisualC-WinRT Xcode Xcode-iOS wayland-protocols
|
||||
GEN_DIST = SDL2.spec
|
||||
|
||||
ifneq ($V,1)
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
LIBNAME = SDL2
|
||||
MAJOR_VERSION = 2
|
||||
MINOR_VERSION = 30
|
||||
MICRO_VERSION = 1
|
||||
MICRO_VERSION = 4
|
||||
VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION)
|
||||
DESCRIPTION = Simple DirectMedia Layer 2
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
LIBNAME = SDL2
|
||||
MAJOR_VERSION = 2
|
||||
MINOR_VERSION = 30
|
||||
MICRO_VERSION = 1
|
||||
MICRO_VERSION = 4
|
||||
VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION)
|
||||
|
||||
LIBHOME = .
|
||||
|
||||
@@ -499,7 +499,6 @@
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vk_platform.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vk_sdk_platform.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan.hpp" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_android.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_beta.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_core.h" />
|
||||
|
||||
@@ -780,9 +780,6 @@
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan.h">
|
||||
<Filter>video\khronos\vulkan</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan.hpp">
|
||||
<Filter>video\khronos\vulkan</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_android.h">
|
||||
<Filter>video\khronos\vulkan</Filter>
|
||||
</ClInclude>
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<AdditionalDependencies>xgameruntime.lib;../Microsoft.Xbox.Services.141.GDK.C.Thunks.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>xgameruntime.lib;../Microsoft.Xbox.Services.GDK.C.Thunks.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">
|
||||
@@ -211,7 +211,7 @@
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<AdditionalDependencies>xgameruntime.lib;../Microsoft.Xbox.Services.141.GDK.C.Thunks.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>xgameruntime.lib;../Microsoft.Xbox.Services.GDK.C.Thunks.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">
|
||||
@@ -409,7 +409,7 @@
|
||||
<CopyFileToFolders Include="..\..\logos\Logo480x480.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CopyFileToFolders Include="$(Console_GRDKExtLibRoot)Xbox.Services.API.C\DesignTime\CommonConfiguration\Neutral\Lib\Release\Microsoft.Xbox.Services.141.GDK.C.Thunks.dll">
|
||||
<CopyFileToFolders Include="$(Console_GRDKExtLibRoot)Xbox.Services.API.C\DesignTime\CommonConfiguration\Neutral\Lib\Release\Microsoft.Xbox.Services.GDK.C.Thunks.dll">
|
||||
<FileType>Document</FileType>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">true</ExcludedFromBuild>
|
||||
|
||||
@@ -394,7 +394,6 @@
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vk_platform.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vk_sdk_platform.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan.hpp" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_android.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_beta.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_core.h" />
|
||||
|
||||
@@ -780,9 +780,6 @@
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan.h">
|
||||
<Filter>video\khronos\vulkan</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan.hpp">
|
||||
<Filter>video\khronos\vulkan</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_android.h">
|
||||
<Filter>video\khronos\vulkan</Filter>
|
||||
</ClInclude>
|
||||
|
||||
@@ -19,10 +19,10 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.30.1</string>
|
||||
<string>2.30.4</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>SDLX</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>2.30.1</string>
|
||||
<string>2.30.4</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -206,7 +206,6 @@
|
||||
A75FCD4823E25AB700529352 /* SDL_keycode.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557DB1595D4D800BBD41B /* SDL_keycode.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
A75FCD4A23E25AB700529352 /* SDL_cocoakeyboard.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A68023E2513E00DCD162 /* SDL_cocoakeyboard.h */; };
|
||||
A75FCD4B23E25AB700529352 /* SDL_uikitvulkan.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A63323E2513D00DCD162 /* SDL_uikitvulkan.h */; };
|
||||
A75FCD4E23E25AB700529352 /* vulkan.hpp in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73223E2513E00DCD162 /* vulkan.hpp */; };
|
||||
A75FCD4F23E25AB700529352 /* SDL_loadso.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557DC1595D4D800BBD41B /* SDL_loadso.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
A75FCD5023E25AB700529352 /* gl2ext.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A72323E2513E00DCD162 /* gl2ext.h */; };
|
||||
A75FCD5123E25AB700529352 /* SDL_clipboardevents_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A93923E2514000DCD162 /* SDL_clipboardevents_c.h */; };
|
||||
@@ -282,7 +281,6 @@
|
||||
A75FCDA123E25AB700529352 /* vulkan_xlib.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73A23E2513E00DCD162 /* vulkan_xlib.h */; };
|
||||
A75FCDA223E25AB700529352 /* SDL_uikitwindow.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A62723E2513D00DCD162 /* SDL_uikitwindow.h */; };
|
||||
A75FCDA323E25AB700529352 /* vulkan_vi.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A72F23E2513E00DCD162 /* vulkan_vi.h */; };
|
||||
A75FCDA423E25AB700529352 /* vulkan_mir.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73923E2513E00DCD162 /* vulkan_mir.h */; };
|
||||
A75FCDA523E25AB700529352 /* SDL_quit.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557E81595D4D800BBD41B /* SDL_quit.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
A75FCDA623E25AB700529352 /* default_cursor.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A93323E2514000DCD162 /* default_cursor.h */; };
|
||||
A75FCDA723E25AB700529352 /* SDL_render_sw_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A8F523E2514000DCD162 /* SDL_render_sw_c.h */; };
|
||||
@@ -580,7 +578,6 @@
|
||||
A75FCF0123E25AC700529352 /* SDL_keycode.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557DB1595D4D800BBD41B /* SDL_keycode.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
A75FCF0323E25AC700529352 /* SDL_cocoakeyboard.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A68023E2513E00DCD162 /* SDL_cocoakeyboard.h */; };
|
||||
A75FCF0423E25AC700529352 /* SDL_uikitvulkan.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A63323E2513D00DCD162 /* SDL_uikitvulkan.h */; };
|
||||
A75FCF0723E25AC700529352 /* vulkan.hpp in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73223E2513E00DCD162 /* vulkan.hpp */; };
|
||||
A75FCF0823E25AC700529352 /* SDL_loadso.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557DC1595D4D800BBD41B /* SDL_loadso.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
A75FCF0923E25AC700529352 /* gl2ext.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A72323E2513E00DCD162 /* gl2ext.h */; };
|
||||
A75FCF0A23E25AC700529352 /* SDL_clipboardevents_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A93923E2514000DCD162 /* SDL_clipboardevents_c.h */; };
|
||||
@@ -656,7 +653,6 @@
|
||||
A75FCF5A23E25AC700529352 /* vulkan_xlib.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73A23E2513E00DCD162 /* vulkan_xlib.h */; };
|
||||
A75FCF5B23E25AC700529352 /* SDL_uikitwindow.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A62723E2513D00DCD162 /* SDL_uikitwindow.h */; };
|
||||
A75FCF5C23E25AC700529352 /* vulkan_vi.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A72F23E2513E00DCD162 /* vulkan_vi.h */; };
|
||||
A75FCF5D23E25AC700529352 /* vulkan_mir.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73923E2513E00DCD162 /* vulkan_mir.h */; };
|
||||
A75FCF5E23E25AC700529352 /* SDL_quit.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557E81595D4D800BBD41B /* SDL_quit.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
A75FCF5F23E25AC700529352 /* default_cursor.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A93323E2514000DCD162 /* default_cursor.h */; };
|
||||
A75FCF6023E25AC700529352 /* SDL_render_sw_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A8F523E2514000DCD162 /* SDL_render_sw_c.h */; };
|
||||
@@ -974,7 +970,6 @@
|
||||
A769B0CD23E259AE00872273 /* SDL_systhread_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A78423E2513E00DCD162 /* SDL_systhread_c.h */; };
|
||||
A769B0D023E259AE00872273 /* SDL_cocoakeyboard.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A68023E2513E00DCD162 /* SDL_cocoakeyboard.h */; };
|
||||
A769B0D123E259AE00872273 /* SDL_uikitvulkan.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A63323E2513D00DCD162 /* SDL_uikitvulkan.h */; };
|
||||
A769B0D423E259AE00872273 /* vulkan.hpp in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73223E2513E00DCD162 /* vulkan.hpp */; };
|
||||
A769B0D623E259AE00872273 /* gl2ext.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A72323E2513E00DCD162 /* gl2ext.h */; };
|
||||
A769B0D723E259AE00872273 /* SDL_clipboardevents_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A93923E2514000DCD162 /* SDL_clipboardevents_c.h */; };
|
||||
A769B0D923E259AE00872273 /* SDL_syshaptic_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A5CF23E2513D00DCD162 /* SDL_syshaptic_c.h */; };
|
||||
@@ -1036,7 +1031,6 @@
|
||||
A769B12923E259AE00872273 /* vulkan_xlib.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73A23E2513E00DCD162 /* vulkan_xlib.h */; };
|
||||
A769B12A23E259AE00872273 /* SDL_uikitwindow.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A62723E2513D00DCD162 /* SDL_uikitwindow.h */; };
|
||||
A769B12B23E259AE00872273 /* vulkan_vi.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A72F23E2513E00DCD162 /* vulkan_vi.h */; };
|
||||
A769B12C23E259AE00872273 /* vulkan_mir.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73923E2513E00DCD162 /* vulkan_mir.h */; };
|
||||
A769B12E23E259AE00872273 /* default_cursor.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A93323E2514000DCD162 /* default_cursor.h */; };
|
||||
A769B12F23E259AE00872273 /* SDL_render_sw_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A8F523E2514000DCD162 /* SDL_render_sw_c.h */; };
|
||||
A769B13223E259AE00872273 /* SDL_nullvideo.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A60A23E2513D00DCD162 /* SDL_nullvideo.h */; };
|
||||
@@ -2110,12 +2104,6 @@
|
||||
A7D8B26923E2514200DCD162 /* vk_platform.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73123E2513E00DCD162 /* vk_platform.h */; };
|
||||
A7D8B26A23E2514200DCD162 /* vk_platform.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73123E2513E00DCD162 /* vk_platform.h */; };
|
||||
A7D8B26B23E2514200DCD162 /* vk_platform.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73123E2513E00DCD162 /* vk_platform.h */; };
|
||||
A7D8B26C23E2514200DCD162 /* vulkan.hpp in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73223E2513E00DCD162 /* vulkan.hpp */; };
|
||||
A7D8B26D23E2514200DCD162 /* vulkan.hpp in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73223E2513E00DCD162 /* vulkan.hpp */; };
|
||||
A7D8B26E23E2514200DCD162 /* vulkan.hpp in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73223E2513E00DCD162 /* vulkan.hpp */; };
|
||||
A7D8B26F23E2514200DCD162 /* vulkan.hpp in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73223E2513E00DCD162 /* vulkan.hpp */; };
|
||||
A7D8B27023E2514200DCD162 /* vulkan.hpp in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73223E2513E00DCD162 /* vulkan.hpp */; };
|
||||
A7D8B27123E2514200DCD162 /* vulkan.hpp in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73223E2513E00DCD162 /* vulkan.hpp */; };
|
||||
A7D8B27223E2514200DCD162 /* vulkan_fuchsia.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73323E2513E00DCD162 /* vulkan_fuchsia.h */; };
|
||||
A7D8B27323E2514200DCD162 /* vulkan_fuchsia.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73323E2513E00DCD162 /* vulkan_fuchsia.h */; };
|
||||
A7D8B27423E2514200DCD162 /* vulkan_fuchsia.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73323E2513E00DCD162 /* vulkan_fuchsia.h */; };
|
||||
@@ -2152,12 +2140,6 @@
|
||||
A7D8B29323E2514200DCD162 /* vulkan_xcb.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73823E2513E00DCD162 /* vulkan_xcb.h */; };
|
||||
A7D8B29423E2514200DCD162 /* vulkan_xcb.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73823E2513E00DCD162 /* vulkan_xcb.h */; };
|
||||
A7D8B29523E2514200DCD162 /* vulkan_xcb.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73823E2513E00DCD162 /* vulkan_xcb.h */; };
|
||||
A7D8B29623E2514200DCD162 /* vulkan_mir.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73923E2513E00DCD162 /* vulkan_mir.h */; };
|
||||
A7D8B29723E2514200DCD162 /* vulkan_mir.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73923E2513E00DCD162 /* vulkan_mir.h */; };
|
||||
A7D8B29823E2514200DCD162 /* vulkan_mir.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73923E2513E00DCD162 /* vulkan_mir.h */; };
|
||||
A7D8B29923E2514200DCD162 /* vulkan_mir.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73923E2513E00DCD162 /* vulkan_mir.h */; };
|
||||
A7D8B29A23E2514200DCD162 /* vulkan_mir.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73923E2513E00DCD162 /* vulkan_mir.h */; };
|
||||
A7D8B29B23E2514200DCD162 /* vulkan_mir.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73923E2513E00DCD162 /* vulkan_mir.h */; };
|
||||
A7D8B29C23E2514200DCD162 /* vulkan_xlib.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73A23E2513E00DCD162 /* vulkan_xlib.h */; };
|
||||
A7D8B29D23E2514200DCD162 /* vulkan_xlib.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73A23E2513E00DCD162 /* vulkan_xlib.h */; };
|
||||
A7D8B29E23E2514200DCD162 /* vulkan_xlib.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73A23E2513E00DCD162 /* vulkan_xlib.h */; };
|
||||
@@ -3968,14 +3950,12 @@
|
||||
A7D8A72F23E2513E00DCD162 /* vulkan_vi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vulkan_vi.h; sourceTree = "<group>"; };
|
||||
A7D8A73023E2513E00DCD162 /* vulkan.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vulkan.h; sourceTree = "<group>"; };
|
||||
A7D8A73123E2513E00DCD162 /* vk_platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vk_platform.h; sourceTree = "<group>"; };
|
||||
A7D8A73223E2513E00DCD162 /* vulkan.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = vulkan.hpp; sourceTree = "<group>"; };
|
||||
A7D8A73323E2513E00DCD162 /* vulkan_fuchsia.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vulkan_fuchsia.h; sourceTree = "<group>"; };
|
||||
A7D8A73423E2513E00DCD162 /* vulkan_wayland.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vulkan_wayland.h; sourceTree = "<group>"; };
|
||||
A7D8A73523E2513E00DCD162 /* vulkan_win32.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vulkan_win32.h; sourceTree = "<group>"; };
|
||||
A7D8A73623E2513E00DCD162 /* vulkan_macos.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vulkan_macos.h; sourceTree = "<group>"; };
|
||||
A7D8A73723E2513E00DCD162 /* vulkan_xlib_xrandr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vulkan_xlib_xrandr.h; sourceTree = "<group>"; };
|
||||
A7D8A73823E2513E00DCD162 /* vulkan_xcb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vulkan_xcb.h; sourceTree = "<group>"; };
|
||||
A7D8A73923E2513E00DCD162 /* vulkan_mir.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vulkan_mir.h; sourceTree = "<group>"; };
|
||||
A7D8A73A23E2513E00DCD162 /* vulkan_xlib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vulkan_xlib.h; sourceTree = "<group>"; };
|
||||
A7D8A73B23E2513E00DCD162 /* vulkan_ios.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vulkan_ios.h; sourceTree = "<group>"; };
|
||||
A7D8A73C23E2513E00DCD162 /* vulkan_core.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vulkan_core.h; sourceTree = "<group>"; };
|
||||
@@ -5003,7 +4983,6 @@
|
||||
A7D8A73323E2513E00DCD162 /* vulkan_fuchsia.h */,
|
||||
A7D8A73B23E2513E00DCD162 /* vulkan_ios.h */,
|
||||
A7D8A73623E2513E00DCD162 /* vulkan_macos.h */,
|
||||
A7D8A73923E2513E00DCD162 /* vulkan_mir.h */,
|
||||
A7D8A72F23E2513E00DCD162 /* vulkan_vi.h */,
|
||||
A7D8A73423E2513E00DCD162 /* vulkan_wayland.h */,
|
||||
A7D8A73523E2513E00DCD162 /* vulkan_win32.h */,
|
||||
@@ -5011,7 +4990,6 @@
|
||||
A7D8A73723E2513E00DCD162 /* vulkan_xlib_xrandr.h */,
|
||||
A7D8A73A23E2513E00DCD162 /* vulkan_xlib.h */,
|
||||
A7D8A73023E2513E00DCD162 /* vulkan.h */,
|
||||
A7D8A73223E2513E00DCD162 /* vulkan.hpp */,
|
||||
);
|
||||
path = vulkan;
|
||||
sourceTree = "<group>";
|
||||
@@ -5596,7 +5574,6 @@
|
||||
5616CA63252BB35F005D5928 /* SDL_sysurl.h in Headers */,
|
||||
A75FCD4A23E25AB700529352 /* SDL_cocoakeyboard.h in Headers */,
|
||||
A75FCD4B23E25AB700529352 /* SDL_uikitvulkan.h in Headers */,
|
||||
A75FCD4E23E25AB700529352 /* vulkan.hpp in Headers */,
|
||||
A75FCD4F23E25AB700529352 /* SDL_loadso.h in Headers */,
|
||||
A75FCD5023E25AB700529352 /* gl2ext.h in Headers */,
|
||||
A75FCD5123E25AB700529352 /* SDL_clipboardevents_c.h in Headers */,
|
||||
@@ -5680,7 +5657,6 @@
|
||||
A75FCDA123E25AB700529352 /* vulkan_xlib.h in Headers */,
|
||||
A75FCDA223E25AB700529352 /* SDL_uikitwindow.h in Headers */,
|
||||
A75FCDA323E25AB700529352 /* vulkan_vi.h in Headers */,
|
||||
A75FCDA423E25AB700529352 /* vulkan_mir.h in Headers */,
|
||||
A75FCDA523E25AB700529352 /* SDL_quit.h in Headers */,
|
||||
A75FCDA623E25AB700529352 /* default_cursor.h in Headers */,
|
||||
A75FCDA723E25AB700529352 /* SDL_render_sw_c.h in Headers */,
|
||||
@@ -5833,7 +5809,6 @@
|
||||
5616CA66252BB361005D5928 /* SDL_sysurl.h in Headers */,
|
||||
A75FCF0323E25AC700529352 /* SDL_cocoakeyboard.h in Headers */,
|
||||
A75FCF0423E25AC700529352 /* SDL_uikitvulkan.h in Headers */,
|
||||
A75FCF0723E25AC700529352 /* vulkan.hpp in Headers */,
|
||||
A75FCF0823E25AC700529352 /* SDL_loadso.h in Headers */,
|
||||
A75FCF0923E25AC700529352 /* gl2ext.h in Headers */,
|
||||
A75FCF0A23E25AC700529352 /* SDL_clipboardevents_c.h in Headers */,
|
||||
@@ -5917,7 +5892,6 @@
|
||||
A75FCF5A23E25AC700529352 /* vulkan_xlib.h in Headers */,
|
||||
A75FCF5B23E25AC700529352 /* SDL_uikitwindow.h in Headers */,
|
||||
A75FCF5C23E25AC700529352 /* vulkan_vi.h in Headers */,
|
||||
A75FCF5D23E25AC700529352 /* vulkan_mir.h in Headers */,
|
||||
A75FCF5E23E25AC700529352 /* SDL_quit.h in Headers */,
|
||||
A75FCF5F23E25AC700529352 /* default_cursor.h in Headers */,
|
||||
A75FCF6023E25AC700529352 /* SDL_render_sw_c.h in Headers */,
|
||||
@@ -6043,7 +6017,6 @@
|
||||
A769B0D023E259AE00872273 /* SDL_cocoakeyboard.h in Headers */,
|
||||
5616CA5D252BB35E005D5928 /* SDL_sysurl.h in Headers */,
|
||||
A769B0D123E259AE00872273 /* SDL_uikitvulkan.h in Headers */,
|
||||
A769B0D423E259AE00872273 /* vulkan.hpp in Headers */,
|
||||
A769B0D623E259AE00872273 /* gl2ext.h in Headers */,
|
||||
A769B0D723E259AE00872273 /* SDL_clipboardevents_c.h in Headers */,
|
||||
A769B0D923E259AE00872273 /* SDL_syshaptic_c.h in Headers */,
|
||||
@@ -6114,7 +6087,6 @@
|
||||
F386F6F52884663E001840AA /* SDL_utils_c.h in Headers */,
|
||||
A769B12A23E259AE00872273 /* SDL_uikitwindow.h in Headers */,
|
||||
A769B12B23E259AE00872273 /* vulkan_vi.h in Headers */,
|
||||
A769B12C23E259AE00872273 /* vulkan_mir.h in Headers */,
|
||||
A769B12E23E259AE00872273 /* default_cursor.h in Headers */,
|
||||
A769B12F23E259AE00872273 /* SDL_render_sw_c.h in Headers */,
|
||||
A769B13223E259AE00872273 /* SDL_nullvideo.h in Headers */,
|
||||
@@ -6387,13 +6359,11 @@
|
||||
A7D8B26723E2514200DCD162 /* vk_platform.h in Headers */,
|
||||
A7D8B2AF23E2514200DCD162 /* vk_sdk_platform.h in Headers */,
|
||||
A7D8B26123E2514200DCD162 /* vulkan.h in Headers */,
|
||||
A7D8B26D23E2514200DCD162 /* vulkan.hpp in Headers */,
|
||||
A7D8B2B523E2514200DCD162 /* vulkan_android.h in Headers */,
|
||||
A7D8B2A923E2514200DCD162 /* vulkan_core.h in Headers */,
|
||||
A7D8B27323E2514200DCD162 /* vulkan_fuchsia.h in Headers */,
|
||||
A7D8B2A323E2514200DCD162 /* vulkan_ios.h in Headers */,
|
||||
A7D8B28523E2514200DCD162 /* vulkan_macos.h in Headers */,
|
||||
A7D8B29723E2514200DCD162 /* vulkan_mir.h in Headers */,
|
||||
A7D8B25B23E2514200DCD162 /* vulkan_vi.h in Headers */,
|
||||
A7D8B27923E2514200DCD162 /* vulkan_wayland.h in Headers */,
|
||||
A7D8B27F23E2514200DCD162 /* vulkan_win32.h in Headers */,
|
||||
@@ -6629,13 +6599,11 @@
|
||||
A7D8B26823E2514200DCD162 /* vk_platform.h in Headers */,
|
||||
A7D8B2B023E2514200DCD162 /* vk_sdk_platform.h in Headers */,
|
||||
A7D8B26223E2514200DCD162 /* vulkan.h in Headers */,
|
||||
A7D8B26E23E2514200DCD162 /* vulkan.hpp in Headers */,
|
||||
A7D8B2B623E2514200DCD162 /* vulkan_android.h in Headers */,
|
||||
A7D8B2AA23E2514200DCD162 /* vulkan_core.h in Headers */,
|
||||
A7D8B27423E2514200DCD162 /* vulkan_fuchsia.h in Headers */,
|
||||
A7D8B2A423E2514200DCD162 /* vulkan_ios.h in Headers */,
|
||||
A7D8B28623E2514200DCD162 /* vulkan_macos.h in Headers */,
|
||||
A7D8B29823E2514200DCD162 /* vulkan_mir.h in Headers */,
|
||||
A7D8B25C23E2514200DCD162 /* vulkan_vi.h in Headers */,
|
||||
A7D8B27A23E2514200DCD162 /* vulkan_wayland.h in Headers */,
|
||||
A7D8B28023E2514200DCD162 /* vulkan_win32.h in Headers */,
|
||||
@@ -6704,7 +6672,6 @@
|
||||
A7D8AE9223E2514100DCD162 /* SDL_cocoakeyboard.h in Headers */,
|
||||
5616CA5A252BB35D005D5928 /* SDL_sysurl.h in Headers */,
|
||||
A7D8ACE523E2514100DCD162 /* SDL_uikitvulkan.h in Headers */,
|
||||
A7D8B27023E2514200DCD162 /* vulkan.hpp in Headers */,
|
||||
A7D8B22823E2514200DCD162 /* gl2ext.h in Headers */,
|
||||
A7D8BB7323E2514500DCD162 /* SDL_clipboardevents_c.h in Headers */,
|
||||
A7D8AAE423E2514100DCD162 /* SDL_syshaptic_c.h in Headers */,
|
||||
@@ -6775,7 +6742,6 @@
|
||||
F386F6F42884663E001840AA /* SDL_utils_c.h in Headers */,
|
||||
A7D8AC9D23E2514100DCD162 /* SDL_uikitwindow.h in Headers */,
|
||||
A7D8B25E23E2514200DCD162 /* vulkan_vi.h in Headers */,
|
||||
A7D8B29A23E2514200DCD162 /* vulkan_mir.h in Headers */,
|
||||
A7D8BB4F23E2514500DCD162 /* default_cursor.h in Headers */,
|
||||
A7D8B9FF23E2514400DCD162 /* SDL_render_sw_c.h in Headers */,
|
||||
A7D8ABFB23E2514100DCD162 /* SDL_nullvideo.h in Headers */,
|
||||
@@ -7048,13 +7014,11 @@
|
||||
A7D8B26623E2514200DCD162 /* vk_platform.h in Headers */,
|
||||
A7D8B2AE23E2514200DCD162 /* vk_sdk_platform.h in Headers */,
|
||||
A7D8B26023E2514200DCD162 /* vulkan.h in Headers */,
|
||||
A7D8B26C23E2514200DCD162 /* vulkan.hpp in Headers */,
|
||||
A7D8B2B423E2514200DCD162 /* vulkan_android.h in Headers */,
|
||||
A7D8B2A823E2514200DCD162 /* vulkan_core.h in Headers */,
|
||||
A7D8B27223E2514200DCD162 /* vulkan_fuchsia.h in Headers */,
|
||||
A7D8B2A223E2514200DCD162 /* vulkan_ios.h in Headers */,
|
||||
A7D8B28423E2514200DCD162 /* vulkan_macos.h in Headers */,
|
||||
A7D8B29623E2514200DCD162 /* vulkan_mir.h in Headers */,
|
||||
A7D8B25A23E2514200DCD162 /* vulkan_vi.h in Headers */,
|
||||
A7D8B27823E2514200DCD162 /* vulkan_wayland.h in Headers */,
|
||||
A7D8B27E23E2514200DCD162 /* vulkan_win32.h in Headers */,
|
||||
@@ -7118,7 +7082,6 @@
|
||||
A7D8BA7623E2514400DCD162 /* SDL_shaders_gl.h in Headers */,
|
||||
A7D8B42B23E2514300DCD162 /* SDL_systhread_c.h in Headers */,
|
||||
A7D8AE9123E2514100DCD162 /* SDL_cocoakeyboard.h in Headers */,
|
||||
A7D8B26F23E2514200DCD162 /* vulkan.hpp in Headers */,
|
||||
A7D8B22723E2514200DCD162 /* gl2ext.h in Headers */,
|
||||
A7D8BB7223E2514500DCD162 /* SDL_clipboardevents_c.h in Headers */,
|
||||
A7D8AAE323E2514100DCD162 /* SDL_syshaptic_c.h in Headers */,
|
||||
@@ -7189,7 +7152,6 @@
|
||||
A7D8B29F23E2514200DCD162 /* vulkan_xlib.h in Headers */,
|
||||
A7D8B25D23E2514200DCD162 /* vulkan_vi.h in Headers */,
|
||||
F316AB882B5A02C3002EF551 /* yuv_rgb_common.h in Headers */,
|
||||
A7D8B29923E2514200DCD162 /* vulkan_mir.h in Headers */,
|
||||
A1BB8B6F27F6CF330057CFA8 /* SDL_list.h in Headers */,
|
||||
A7D8BB4E23E2514500DCD162 /* default_cursor.h in Headers */,
|
||||
A7D8B9FE23E2514400DCD162 /* SDL_render_sw_c.h in Headers */,
|
||||
@@ -7325,7 +7287,6 @@
|
||||
DB313FDB17554B71006C0E22 /* SDL_keycode.h in Headers */,
|
||||
A7D8AE9323E2514100DCD162 /* SDL_cocoakeyboard.h in Headers */,
|
||||
A7D8ACE623E2514100DCD162 /* SDL_uikitvulkan.h in Headers */,
|
||||
A7D8B27123E2514200DCD162 /* vulkan.hpp in Headers */,
|
||||
DB313FDC17554B71006C0E22 /* SDL_loadso.h in Headers */,
|
||||
A7D8B22923E2514200DCD162 /* gl2ext.h in Headers */,
|
||||
A7D8BB7423E2514500DCD162 /* SDL_clipboardevents_c.h in Headers */,
|
||||
@@ -7409,7 +7370,6 @@
|
||||
A7D8B2A123E2514200DCD162 /* vulkan_xlib.h in Headers */,
|
||||
A7D8AC9E23E2514100DCD162 /* SDL_uikitwindow.h in Headers */,
|
||||
A7D8B25F23E2514200DCD162 /* vulkan_vi.h in Headers */,
|
||||
A7D8B29B23E2514200DCD162 /* vulkan_mir.h in Headers */,
|
||||
DB313FE817554B71006C0E22 /* SDL_quit.h in Headers */,
|
||||
A7D8BB5023E2514500DCD162 /* default_cursor.h in Headers */,
|
||||
A7D8BA0023E2514400DCD162 /* SDL_render_sw_c.h in Headers */,
|
||||
@@ -9769,7 +9729,7 @@
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
DEPLOYMENT_POSTPROCESSING = YES;
|
||||
DYLIB_COMPATIBILITY_VERSION = 3001.0.0;
|
||||
DYLIB_CURRENT_VERSION = 3001.1.0;
|
||||
DYLIB_CURRENT_VERSION = 3001.4.0;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_ALTIVEC_EXTENSIONS = YES;
|
||||
@@ -9810,7 +9770,7 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_LINK_OBJC_RUNTIME = NO;
|
||||
MARKETING_VERSION = 2.30.1;
|
||||
MARKETING_VERSION = 2.30.4;
|
||||
OTHER_LDFLAGS = "-liconv";
|
||||
};
|
||||
name = Release;
|
||||
@@ -9854,7 +9814,7 @@
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
DYLIB_COMPATIBILITY_VERSION = 3001.0.0;
|
||||
DYLIB_CURRENT_VERSION = 3001.1.0;
|
||||
DYLIB_CURRENT_VERSION = 3001.4.0;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
@@ -9896,7 +9856,7 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_LINK_OBJC_RUNTIME = NO;
|
||||
MARKETING_VERSION = 2.30.1;
|
||||
MARKETING_VERSION = 2.30.4;
|
||||
OTHER_LDFLAGS = "-liconv";
|
||||
};
|
||||
name = Debug;
|
||||
@@ -10103,7 +10063,7 @@
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
DYLIB_COMPATIBILITY_VERSION = 3001.0.0;
|
||||
DYLIB_CURRENT_VERSION = 3001.1.0;
|
||||
DYLIB_CURRENT_VERSION = 3001.4.0;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
@@ -10155,7 +10115,7 @@
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
DYLIB_COMPATIBILITY_VERSION = 3001.0.0;
|
||||
DYLIB_CURRENT_VERSION = 3001.1.0;
|
||||
DYLIB_CURRENT_VERSION = 3001.4.0;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Title SDL 2.30.1
|
||||
Title SDL 2.30.4
|
||||
Version 1
|
||||
Description SDL Library for Mac OS X (http://www.libsdl.org)
|
||||
DefaultLocation /Library/Frameworks
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
<application android:label="@string/app_name"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:allowBackup="true"
|
||||
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
|
||||
android:theme="@style/AppTheme"
|
||||
android:hardwareAccelerated="true" >
|
||||
|
||||
<!-- Example of setting SDL hints from AndroidManifest.xml:
|
||||
|
||||
@@ -61,7 +61,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
private static final String TAG = "SDL";
|
||||
private static final int SDL_MAJOR_VERSION = 2;
|
||||
private static final int SDL_MINOR_VERSION = 30;
|
||||
private static final int SDL_MICRO_VERSION = 1;
|
||||
private static final int SDL_MICRO_VERSION = 4;
|
||||
/*
|
||||
// Display InputType.SOURCE/CLASS of events and devices
|
||||
//
|
||||
@@ -995,8 +995,8 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
/* No valid hint, nothing is explicitly allowed */
|
||||
if (!is_portrait_allowed && !is_landscape_allowed) {
|
||||
if (resizable) {
|
||||
/* All orientations are allowed */
|
||||
req = ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR;
|
||||
/* All orientations are allowed, respecting user orientation lock setting */
|
||||
req = ActivityInfo.SCREEN_ORIENTATION_FULL_USER;
|
||||
} else {
|
||||
/* Fixed window and nothing specified. Get orientation from w/h of created window */
|
||||
req = (w > h ? ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE : ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT);
|
||||
@@ -1005,8 +1005,8 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
/* At least one orientation is allowed */
|
||||
if (resizable) {
|
||||
if (is_portrait_allowed && is_landscape_allowed) {
|
||||
/* hint allows both landscape and portrait, promote to full sensor */
|
||||
req = ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR;
|
||||
/* hint allows both landscape and portrait, promote to full user */
|
||||
req = ActivityInfo.SCREEN_ORIENTATION_FULL_USER;
|
||||
} else {
|
||||
/* Use the only one allowed "orientation" */
|
||||
req = (is_landscape_allowed ? orientation_landscape : orientation_portrait);
|
||||
|
||||
@@ -546,13 +546,15 @@ class SDLHapticHandler {
|
||||
if (haptic == null) {
|
||||
InputDevice device = InputDevice.getDevice(deviceIds[i]);
|
||||
Vibrator vib = device.getVibrator();
|
||||
if (vib.hasVibrator()) {
|
||||
haptic = new SDLHaptic();
|
||||
haptic.device_id = deviceIds[i];
|
||||
haptic.name = device.getName();
|
||||
haptic.vib = vib;
|
||||
mHaptics.add(haptic);
|
||||
SDLControllerManager.nativeAddHaptic(haptic.device_id, haptic.name);
|
||||
if (vib != null) {
|
||||
if (vib.hasVibrator()) {
|
||||
haptic = new SDLHaptic();
|
||||
haptic.device_id = deviceIds[i];
|
||||
haptic.name = device.getName();
|
||||
haptic.vib = vib;
|
||||
mHaptics.add(haptic);
|
||||
SDLControllerManager.nativeAddHaptic(haptic.device_id, haptic.name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- Base application theme. -->
|
||||
<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar">
|
||||
<style name="AppTheme" parent="android:Theme.NoTitleBar.Fullscreen">
|
||||
<!-- Customize your theme here. -->
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
||||
103
configure
vendored
103
configure
vendored
@@ -873,7 +873,6 @@ enable_sse2
|
||||
enable_sse3
|
||||
enable_altivec
|
||||
enable_lsx
|
||||
enable_lasx
|
||||
enable_oss
|
||||
enable_alsa
|
||||
with_alsa_prefix
|
||||
@@ -1675,7 +1674,6 @@ Optional Features:
|
||||
--enable-sse3 use SSE3 assembly routines [default=maybe]
|
||||
--enable-altivec use Altivec assembly routines [default=yes]
|
||||
--enable-lsx use LSX assembly routines [default=yes]
|
||||
--enable-lasx use LASX assembly routines [default=yes]
|
||||
--enable-oss support the OSS audio API [default=maybe]
|
||||
--enable-alsa support the ALSA audio API [default=yes]
|
||||
--disable-alsatest Do not try to compile and run a test Alsa program
|
||||
@@ -3510,7 +3508,7 @@ orig_CFLAGS="$CFLAGS"
|
||||
# See docs/release_checklist.md
|
||||
SDL_MAJOR_VERSION=2
|
||||
SDL_MINOR_VERSION=30
|
||||
SDL_MICRO_VERSION=1
|
||||
SDL_MICRO_VERSION=4
|
||||
SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
|
||||
|
||||
SDL_BINARY_AGE=`expr $SDL_MINOR_VERSION \* 100 + $SDL_MICRO_VERSION`
|
||||
@@ -18818,7 +18816,7 @@ fi
|
||||
|
||||
enable_system_iconv_default=yes
|
||||
case "$host" in
|
||||
*-*-cygwin*|*-*-mingw*)
|
||||
*-*-cygwin*|*-*-mingw*|*-*-darwin*|*-ios-*)
|
||||
enable_system_iconv_default=no
|
||||
;;
|
||||
esac
|
||||
@@ -19749,6 +19747,18 @@ if test "x$ac_cv_func_poll" = xyes
|
||||
then :
|
||||
printf "%s\n" "#define HAVE_POLL 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "memfd_create" "ac_cv_func_memfd_create"
|
||||
if test "x$ac_cv_func_memfd_create" = xyes
|
||||
then :
|
||||
printf "%s\n" "#define HAVE_MEMFD_CREATE 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "posix_fallocate" "ac_cv_func_posix_fallocate"
|
||||
if test "x$ac_cv_func_posix_fallocate" = xyes
|
||||
then :
|
||||
printf "%s\n" "#define HAVE_POSIX_FALLOCATE 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "_Exit" "ac_cv_func__Exit"
|
||||
if test "x$ac_cv_func__Exit" = xyes
|
||||
@@ -21100,80 +21110,6 @@ printf "%s\n" "#define HAVE_LSXINTRIN_H 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
# Check whether --enable-lasx was given.
|
||||
if test ${enable_lasx+y}
|
||||
then :
|
||||
enableval=$enable_lasx;
|
||||
else $as_nop
|
||||
enable_LASX=yes
|
||||
fi
|
||||
|
||||
if test x$enable_LASX = xyes; then
|
||||
save_CFLAGS="$CFLAGS"
|
||||
have_gcc_lasx=no
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GCC -mlasx option" >&5
|
||||
printf %s "checking for GCC -mlasx option... " >&6; }
|
||||
lasx_CFLAGS="-mlasx"
|
||||
CFLAGS="$save_CFLAGS $lasx_CFLAGS"
|
||||
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#ifndef __loongarch_asx
|
||||
#error Assembler CPP flag not enabled
|
||||
#endif
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"
|
||||
then :
|
||||
have_gcc_lasx=yes
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_gcc_lasx" >&5
|
||||
printf "%s\n" "$have_gcc_lasx" >&6; }
|
||||
CFLAGS="$save_CFLAGS"
|
||||
|
||||
if test x$have_gcc_lasx = xyes; then
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS $lasx_CFLAGS"
|
||||
SUMMARY_math="${SUMMARY_math} lasx"
|
||||
fi
|
||||
fi
|
||||
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lasxintrin.h" >&5
|
||||
printf %s "checking for lasxintrin.h... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <lasxintrin.h>
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"
|
||||
then :
|
||||
have_lasxintrin_h_hdr=yes
|
||||
else $as_nop
|
||||
have_lasxintrin_h_hdr=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_lasxintrin_h_hdr" >&5
|
||||
printf "%s\n" "$have_lasxintrin_h_hdr" >&6; }
|
||||
if test x$have_lasxintrin_h_hdr = xyes; then
|
||||
|
||||
printf "%s\n" "#define HAVE_LASXINTRIN_H 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
CheckOSS()
|
||||
{
|
||||
# Check whether --enable-oss was given.
|
||||
@@ -27577,18 +27513,14 @@ then :
|
||||
have_d3d11=yes
|
||||
fi
|
||||
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for d3d12 Windows SDK version" >&5
|
||||
printf %s "checking for d3d12 Windows SDK version... " >&6; }
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compatible d3d12 headers" >&5
|
||||
printf %s "checking for compatible d3d12 headers... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <winsdkver.h>
|
||||
#include <sdkddkver.h>
|
||||
#include <d3d12.h>
|
||||
#include <d3d12sdklayers.h>
|
||||
ID3D12Device1 *device;
|
||||
#if WDK_NTDDI_VERSION <= 0x0A000008
|
||||
asdf
|
||||
#endif
|
||||
|
||||
int
|
||||
main (void)
|
||||
@@ -27607,6 +27539,7 @@ fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_d3d12" >&5
|
||||
printf "%s\n" "$have_d3d12" >&6; }
|
||||
|
||||
ac_fn_c_check_header_compile "$LINENO" "ddraw.h" "ac_cv_header_ddraw_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_ddraw_h" = xyes
|
||||
then :
|
||||
|
||||
47
configure.ac
47
configure.ac
@@ -13,7 +13,7 @@ dnl Set various version strings - taken gratefully from the GTk sources
|
||||
# See docs/release_checklist.md
|
||||
SDL_MAJOR_VERSION=2
|
||||
SDL_MINOR_VERSION=30
|
||||
SDL_MICRO_VERSION=1
|
||||
SDL_MICRO_VERSION=4
|
||||
SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
|
||||
|
||||
SDL_BINARY_AGE=`expr $SDL_MINOR_VERSION \* 100 + $SDL_MICRO_VERSION`
|
||||
@@ -322,7 +322,7 @@ AC_ARG_ENABLE(libc,
|
||||
dnl See whether we are allowed to use system iconv
|
||||
enable_system_iconv_default=yes
|
||||
case "$host" in
|
||||
*-*-cygwin*|*-*-mingw*)
|
||||
*-*-cygwin*|*-*-mingw*|*-*-darwin*|*-ios-*)
|
||||
enable_system_iconv_default=no
|
||||
;;
|
||||
esac
|
||||
@@ -359,7 +359,7 @@ dnl Checks for library functions.
|
||||
AC_DEFINE(HAVE_MPROTECT, 1, [ ])
|
||||
],[]),
|
||||
)
|
||||
AC_CHECK_FUNCS(malloc calloc realloc free getenv setenv putenv unsetenv bsearch qsort abs bcopy memset memcmp memcpy memmove wcslen wcslcpy wcslcat _wcsdup wcsdup wcsstr wcscmp wcsncmp wcscasecmp _wcsicmp wcsncasecmp _wcsnicmp strlen strlcpy strlcat _strrev _strupr _strlwr index rindex strchr strrchr strstr strtok_r itoa _ltoa _uitoa _ultoa strtod strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp strcasestr vsscanf vsnprintf fopen64 fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname getauxval elf_aux_info poll _Exit)
|
||||
AC_CHECK_FUNCS(malloc calloc realloc free getenv setenv putenv unsetenv bsearch qsort abs bcopy memset memcmp memcpy memmove wcslen wcslcpy wcslcat _wcsdup wcsdup wcsstr wcscmp wcsncmp wcscasecmp _wcsicmp wcsncasecmp _wcsnicmp strlen strlcpy strlcat _strrev _strupr _strlwr index rindex strchr strrchr strstr strtok_r itoa _ltoa _uitoa _ultoa strtod strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp strcasestr vsscanf vsnprintf fopen64 fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname getauxval elf_aux_info poll memfd_create posix_fallocate _Exit)
|
||||
|
||||
AC_CHECK_LIB(m, pow, [LIBS="$LIBS -lm"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm"])
|
||||
AC_CHECK_FUNCS(acos acosf asin asinf atan atanf atan2 atan2f ceil ceilf copysign copysignf cos cosf exp expf fabs fabsf floor floorf trunc truncf fmod fmodf log logf log10 log10f lround lroundf pow powf round roundf scalbn scalbnf sin sinf sqrt sqrtf tan tanf)
|
||||
@@ -938,38 +938,6 @@ fi
|
||||
AC_DEFINE(HAVE_LSXINTRIN_H, 1, [ ])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(lasx,
|
||||
[AS_HELP_STRING([--enable-lasx], [use LASX assembly routines [default=yes]])],
|
||||
, enable_LASX=yes)
|
||||
if test x$enable_LASX = xyes; then
|
||||
save_CFLAGS="$CFLAGS"
|
||||
have_gcc_lasx=no
|
||||
AC_MSG_CHECKING(for GCC -mlasx option)
|
||||
lasx_CFLAGS="-mlasx"
|
||||
CFLAGS="$save_CFLAGS $lasx_CFLAGS"
|
||||
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#ifndef __loongarch_asx
|
||||
#error Assembler CPP flag not enabled
|
||||
#endif
|
||||
]], [])], [have_gcc_lasx=yes], [])
|
||||
AC_MSG_RESULT($have_gcc_lasx)
|
||||
CFLAGS="$save_CFLAGS"
|
||||
|
||||
if test x$have_gcc_lasx = xyes; then
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS $lasx_CFLAGS"
|
||||
SUMMARY_math="${SUMMARY_math} lasx"
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(for lasxintrin.h)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <lasxintrin.h>]])],
|
||||
[have_lasxintrin_h_hdr=yes],[have_lasxintrin_h_hdr=no])
|
||||
AC_MSG_RESULT($have_lasxintrin_h_hdr)
|
||||
if test x$have_lasxintrin_h_hdr = xyes; then
|
||||
AC_DEFINE(HAVE_LASXINTRIN_H, 1, [ ])
|
||||
fi
|
||||
|
||||
dnl See if the OSS audio interface is supported
|
||||
CheckOSS()
|
||||
{
|
||||
@@ -3375,17 +3343,14 @@ CheckDIRECTX()
|
||||
if test x$enable_directx = xyes; then
|
||||
AC_CHECK_HEADER(d3d9.h, have_d3d=yes)
|
||||
AC_CHECK_HEADER(d3d11_1.h, have_d3d11=yes)
|
||||
AC_MSG_CHECKING(for d3d12 Windows SDK version)
|
||||
AC_MSG_CHECKING(for compatible d3d12 headers)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <winsdkver.h>
|
||||
#include <sdkddkver.h>
|
||||
#include <d3d12.h>
|
||||
#include <d3d12sdklayers.h>
|
||||
ID3D12Device1 *device;
|
||||
#if WDK_NTDDI_VERSION <= 0x0A000008
|
||||
asdf
|
||||
#endif
|
||||
]])], [have_d3d12=yes],[have_d3d12=no])
|
||||
AC_MSG_RESULT($have_d3d12)
|
||||
|
||||
AC_CHECK_HEADER(ddraw.h, have_ddraw=yes)
|
||||
AC_CHECK_HEADER(dsound.h, have_dsound=yes)
|
||||
AC_CHECK_HEADER(dinput.h, have_dinput=yes)
|
||||
|
||||
@@ -190,6 +190,8 @@
|
||||
#cmakedefine HAVE_FOPEN64 1
|
||||
#cmakedefine HAVE_FSEEKO 1
|
||||
#cmakedefine HAVE_FSEEKO64 1
|
||||
#cmakedefine HAVE_MEMFD_CREATE 1
|
||||
#cmakedefine HAVE_POSIX_FALLOCATE 1
|
||||
#cmakedefine HAVE_SIGACTION 1
|
||||
#cmakedefine HAVE_SA_SIGACTION 1
|
||||
#cmakedefine HAVE_SETJMP 1
|
||||
|
||||
@@ -211,6 +211,8 @@
|
||||
#undef HAVE_GETAUXVAL
|
||||
#undef HAVE_ELF_AUX_INFO
|
||||
#undef HAVE_POLL
|
||||
#undef HAVE_MEMFD_CREATE
|
||||
#undef HAVE_POSIX_FALLOCATE
|
||||
#undef HAVE__EXIT
|
||||
|
||||
#else
|
||||
|
||||
@@ -114,9 +114,6 @@
|
||||
#define HAVE_MEMCPY 1
|
||||
#define HAVE_MEMMOVE 1
|
||||
#define HAVE_MEMCMP 1
|
||||
#define HAVE_WCSLEN 1
|
||||
#define HAVE_WCSLCPY 1
|
||||
#define HAVE_WCSLCAT 1
|
||||
#define HAVE_WCSCMP 1
|
||||
#define HAVE__WCSICMP 1
|
||||
#define HAVE__WCSNICMP 1
|
||||
|
||||
@@ -99,9 +99,11 @@ typedef unsigned int uintptr_t;
|
||||
#define HAVE_D3D11_H 1
|
||||
#define HAVE_ROAPI_H 1
|
||||
#endif
|
||||
#if defined(WDK_NTDDI_VERSION) && WDK_NTDDI_VERSION > 0x0A000008 /* 10.0.19041.0 */
|
||||
#if defined(__has_include)
|
||||
#if __has_include(<d3d12.h>) && __has_include(<d3d12sdklayers.h>)
|
||||
#define HAVE_D3D12_H 1
|
||||
#endif
|
||||
#endif
|
||||
#if defined(_WIN32_MAXVER) && _WIN32_MAXVER >= 0x0603 /* Windows 8.1 SDK */
|
||||
#define HAVE_SHELLSCALINGAPI_H 1
|
||||
#endif
|
||||
|
||||
@@ -73,7 +73,13 @@
|
||||
#if defined(__APPLE__)
|
||||
/* lets us know what version of Mac OS X we're compiling on */
|
||||
#include <AvailabilityMacros.h>
|
||||
#ifndef __has_extension /* Older compilers don't support this */
|
||||
#define __has_extension(x) 0
|
||||
#include <TargetConditionals.h>
|
||||
#undef __has_extension
|
||||
#else
|
||||
#include <TargetConditionals.h>
|
||||
#endif
|
||||
|
||||
/* Fix building with older SDKs that don't define these
|
||||
See this for more information:
|
||||
@@ -199,8 +205,10 @@
|
||||
#undef __GDK__
|
||||
#define __GDK__ 1
|
||||
#endif
|
||||
#if defined(__PSP__)
|
||||
#if defined(__PSP__) || defined(__psp__)
|
||||
#ifdef __PSP__
|
||||
#undef __PSP__
|
||||
#endif
|
||||
#define __PSP__ 1
|
||||
#endif
|
||||
#if defined(PS2)
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
# elif defined(__MRC__)
|
||||
void *alloca(unsigned);
|
||||
# else
|
||||
char *alloca();
|
||||
void *alloca(size_t);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -253,10 +253,10 @@ typedef uint64_t Uint64;
|
||||
* <stdint.h> should define these but this is not true all platforms.
|
||||
* (for example win32) */
|
||||
#ifndef SDL_PRIs64
|
||||
#ifdef PRIs64
|
||||
#define SDL_PRIs64 PRIs64
|
||||
#elif defined(__WIN32__) || defined(__GDK__)
|
||||
#if defined(__WIN32__) || defined(__GDK__)
|
||||
#define SDL_PRIs64 "I64d"
|
||||
#elif defined(PRIs64)
|
||||
#define SDL_PRIs64 PRIs64
|
||||
#elif defined(__LP64__) && !defined(__APPLE__)
|
||||
#define SDL_PRIs64 "ld"
|
||||
#else
|
||||
@@ -264,10 +264,10 @@ typedef uint64_t Uint64;
|
||||
#endif
|
||||
#endif
|
||||
#ifndef SDL_PRIu64
|
||||
#ifdef PRIu64
|
||||
#define SDL_PRIu64 PRIu64
|
||||
#elif defined(__WIN32__) || defined(__GDK__)
|
||||
#if defined(__WIN32__) || defined(__GDK__)
|
||||
#define SDL_PRIu64 "I64u"
|
||||
#elif defined(PRIu64)
|
||||
#define SDL_PRIu64 PRIu64
|
||||
#elif defined(__LP64__) && !defined(__APPLE__)
|
||||
#define SDL_PRIu64 "lu"
|
||||
#else
|
||||
@@ -275,10 +275,10 @@ typedef uint64_t Uint64;
|
||||
#endif
|
||||
#endif
|
||||
#ifndef SDL_PRIx64
|
||||
#ifdef PRIx64
|
||||
#define SDL_PRIx64 PRIx64
|
||||
#elif defined(__WIN32__) || defined(__GDK__)
|
||||
#if defined(__WIN32__) || defined(__GDK__)
|
||||
#define SDL_PRIx64 "I64x"
|
||||
#elif defined(PRIx64)
|
||||
#define SDL_PRIx64 PRIx64
|
||||
#elif defined(__LP64__) && !defined(__APPLE__)
|
||||
#define SDL_PRIx64 "lx"
|
||||
#else
|
||||
@@ -286,10 +286,10 @@ typedef uint64_t Uint64;
|
||||
#endif
|
||||
#endif
|
||||
#ifndef SDL_PRIX64
|
||||
#ifdef PRIX64
|
||||
#define SDL_PRIX64 PRIX64
|
||||
#elif defined(__WIN32__) || defined(__GDK__)
|
||||
#if defined(__WIN32__) || defined(__GDK__)
|
||||
#define SDL_PRIX64 "I64X"
|
||||
#elif defined(PRIX64)
|
||||
#define SDL_PRIX64 PRIX64
|
||||
#elif defined(__LP64__) && !defined(__APPLE__)
|
||||
#define SDL_PRIX64 "lX"
|
||||
#else
|
||||
|
||||
@@ -59,7 +59,7 @@ typedef struct SDL_version
|
||||
*/
|
||||
#define SDL_MAJOR_VERSION 2
|
||||
#define SDL_MINOR_VERSION 30
|
||||
#define SDL_PATCHLEVEL 1
|
||||
#define SDL_PATCHLEVEL 4
|
||||
|
||||
/**
|
||||
* Macro to determine SDL version program was compiled against.
|
||||
|
||||
@@ -161,6 +161,10 @@ const char *SDL_GetHint(const char *name)
|
||||
const char *env;
|
||||
SDL_Hint *hint;
|
||||
|
||||
if (!name) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
env = SDL_getenv(name);
|
||||
for (hint = SDL_hints; hint; hint = hint->next) {
|
||||
if (SDL_strcmp(name, hint->name) == 0) {
|
||||
|
||||
@@ -36,6 +36,7 @@ extern "C" {
|
||||
static XTaskQueueHandle GDK_GlobalTaskQueue;
|
||||
|
||||
PAPPSTATE_REGISTRATION hPLM = {};
|
||||
PAPPCONSTRAIN_REGISTRATION hCPLM = {};
|
||||
HANDLE plmSuspendComplete = nullptr;
|
||||
|
||||
extern "C" DECLSPEC int
|
||||
@@ -177,6 +178,23 @@ SDL_GDKRunApp(SDL_main_func mainFunction, void *reserved)
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Register constrain/unconstrain handling */
|
||||
auto raccn = [](BOOLEAN constrained, PVOID context) {
|
||||
SDL_LogDebug(SDL_LOG_CATEGORY_APPLICATION, "[GDK] in RegisterAppConstrainedChangeNotification handler");
|
||||
SDL_VideoDevice *_this = SDL_GetVideoDevice();
|
||||
if (_this) {
|
||||
if (constrained) {
|
||||
SDL_SetKeyboardFocus(NULL);
|
||||
} else {
|
||||
SDL_SetKeyboardFocus(_this->windows);
|
||||
}
|
||||
}
|
||||
};
|
||||
if (RegisterAppConstrainedChangeNotification(raccn, NULL, &hCPLM)) {
|
||||
SDL_SetError("[GDK] Unable to call RegisterAppConstrainedChangeNotification");
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Run the application main() code */
|
||||
result = mainFunction(argc, argv);
|
||||
|
||||
@@ -184,6 +202,9 @@ SDL_GDKRunApp(SDL_main_func mainFunction, void *reserved)
|
||||
UnregisterAppStateChangeNotification(hPLM);
|
||||
CloseHandle(plmSuspendComplete);
|
||||
|
||||
/* Unregister constrain/unconstrain handling */
|
||||
UnregisterAppConstrainedChangeNotification(hCPLM);
|
||||
|
||||
/* !!! FIXME: This follows the docs exactly, but for some reason still leaks handles on exit? */
|
||||
/* Terminate the task queue and dispatch any pending tasks */
|
||||
XTaskQueueTerminate(taskQueue, false, nullptr, nullptr);
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#ifdef SDL_USE_LIBUDEV
|
||||
|
||||
#include <linux/input.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "SDL_assert.h"
|
||||
#include "SDL_evdev_capabilities.h"
|
||||
@@ -227,61 +228,59 @@ void SDL_UDEV_Scan(void)
|
||||
|
||||
SDL_bool SDL_UDEV_GetProductInfo(const char *device_path, Uint16 *vendor, Uint16 *product, Uint16 *version, int *class)
|
||||
{
|
||||
struct udev_enumerate *enumerate = NULL;
|
||||
struct udev_list_entry *devs = NULL;
|
||||
struct udev_list_entry *item = NULL;
|
||||
SDL_bool found = SDL_FALSE;
|
||||
struct stat statbuf;
|
||||
char type;
|
||||
struct udev_device *dev;
|
||||
const char* val;
|
||||
int class_temp;
|
||||
|
||||
if (!_this) {
|
||||
return SDL_FALSE;
|
||||
}
|
||||
|
||||
enumerate = _this->syms.udev_enumerate_new(_this->udev);
|
||||
if (!enumerate) {
|
||||
SDL_SetError("udev_enumerate_new() failed");
|
||||
if (stat(device_path, &statbuf) == -1) {
|
||||
return SDL_FALSE;
|
||||
}
|
||||
|
||||
_this->syms.udev_enumerate_scan_devices(enumerate);
|
||||
devs = _this->syms.udev_enumerate_get_list_entry(enumerate);
|
||||
for (item = devs; item && !found; item = _this->syms.udev_list_entry_get_next(item)) {
|
||||
const char *path = _this->syms.udev_list_entry_get_name(item);
|
||||
struct udev_device *dev = _this->syms.udev_device_new_from_syspath(_this->udev, path);
|
||||
if (dev) {
|
||||
const char *val = NULL;
|
||||
const char *existing_path;
|
||||
|
||||
existing_path = _this->syms.udev_device_get_devnode(dev);
|
||||
if (existing_path && SDL_strcmp(device_path, existing_path) == 0) {
|
||||
int class_temp;
|
||||
found = SDL_TRUE;
|
||||
|
||||
val = _this->syms.udev_device_get_property_value(dev, "ID_VENDOR_ID");
|
||||
if (val) {
|
||||
*vendor = (Uint16)SDL_strtol(val, NULL, 16);
|
||||
}
|
||||
|
||||
val = _this->syms.udev_device_get_property_value(dev, "ID_MODEL_ID");
|
||||
if (val) {
|
||||
*product = (Uint16)SDL_strtol(val, NULL, 16);
|
||||
}
|
||||
|
||||
val = _this->syms.udev_device_get_property_value(dev, "ID_REVISION");
|
||||
if (val) {
|
||||
*version = (Uint16)SDL_strtol(val, NULL, 16);
|
||||
}
|
||||
|
||||
class_temp = device_class(dev);
|
||||
if (class_temp) {
|
||||
*class = class_temp;
|
||||
}
|
||||
}
|
||||
_this->syms.udev_device_unref(dev);
|
||||
}
|
||||
if (S_ISBLK(statbuf.st_mode)) {
|
||||
type = 'b';
|
||||
}
|
||||
else if (S_ISCHR(statbuf.st_mode)) {
|
||||
type = 'c';
|
||||
}
|
||||
else {
|
||||
return SDL_FALSE;
|
||||
}
|
||||
_this->syms.udev_enumerate_unref(enumerate);
|
||||
|
||||
return found;
|
||||
dev = _this->syms.udev_device_new_from_devnum(_this->udev, type, statbuf.st_rdev);
|
||||
|
||||
if (!dev) {
|
||||
return SDL_FALSE;
|
||||
}
|
||||
|
||||
val = _this->syms.udev_device_get_property_value(dev, "ID_VENDOR_ID");
|
||||
if (val) {
|
||||
*vendor = (Uint16)SDL_strtol(val, NULL, 16);
|
||||
}
|
||||
|
||||
val = _this->syms.udev_device_get_property_value(dev, "ID_MODEL_ID");
|
||||
if (val) {
|
||||
*product = (Uint16)SDL_strtol(val, NULL, 16);
|
||||
}
|
||||
|
||||
val = _this->syms.udev_device_get_property_value(dev, "ID_REVISION");
|
||||
if (val) {
|
||||
*version = (Uint16)SDL_strtol(val, NULL, 16);
|
||||
}
|
||||
|
||||
class_temp = device_class(dev);
|
||||
if (class_temp) {
|
||||
*class = class_temp;
|
||||
}
|
||||
|
||||
_this->syms.udev_device_unref(dev);
|
||||
|
||||
return SDL_TRUE;
|
||||
}
|
||||
|
||||
void SDL_UDEV_UnloadLibrary(void)
|
||||
|
||||
@@ -34,13 +34,6 @@
|
||||
#include "../video/SDL_sysvideo.h"
|
||||
#include "SDL_syswm.h"
|
||||
|
||||
#undef SDL_PRIs64
|
||||
#if (defined(__WIN32__) || defined(__GDK__)) && !defined(__CYGWIN__)
|
||||
#define SDL_PRIs64 "I64d"
|
||||
#else
|
||||
#define SDL_PRIs64 "lld"
|
||||
#endif
|
||||
|
||||
/* An arbitrary limit so we don't have unbounded growth */
|
||||
#define SDL_MAX_QUEUED_EVENTS 65535
|
||||
|
||||
@@ -454,8 +447,8 @@ static void SDL_LogEvent(const SDL_Event *event)
|
||||
|
||||
#define PRINT_FINGER_EVENT(event) \
|
||||
(void)SDL_snprintf(details, sizeof(details), " (timestamp=%u touchid=%" SDL_PRIs64 " fingerid=%" SDL_PRIs64 " x=%f y=%f dx=%f dy=%f pressure=%f)", \
|
||||
(uint)event->tfinger.timestamp, (long long)event->tfinger.touchId, \
|
||||
(long long)event->tfinger.fingerId, event->tfinger.x, event->tfinger.y, \
|
||||
(uint)event->tfinger.timestamp, event->tfinger.touchId, \
|
||||
event->tfinger.fingerId, event->tfinger.x, event->tfinger.y, \
|
||||
event->tfinger.dx, event->tfinger.dy, event->tfinger.pressure)
|
||||
SDL_EVENT_CASE(SDL_FINGERDOWN)
|
||||
PRINT_FINGER_EVENT(event);
|
||||
@@ -470,8 +463,8 @@ static void SDL_LogEvent(const SDL_Event *event)
|
||||
|
||||
#define PRINT_DOLLAR_EVENT(event) \
|
||||
(void)SDL_snprintf(details, sizeof(details), " (timestamp=%u touchid=%" SDL_PRIs64 " gestureid=%" SDL_PRIs64 " numfingers=%u error=%f x=%f y=%f)", \
|
||||
(uint)event->dgesture.timestamp, (long long)event->dgesture.touchId, \
|
||||
(long long)event->dgesture.gestureId, (uint)event->dgesture.numFingers, \
|
||||
(uint)event->dgesture.timestamp, event->dgesture.touchId, \
|
||||
event->dgesture.gestureId, (uint)event->dgesture.numFingers, \
|
||||
event->dgesture.error, event->dgesture.x, event->dgesture.y)
|
||||
SDL_EVENT_CASE(SDL_DOLLARGESTURE)
|
||||
PRINT_DOLLAR_EVENT(event);
|
||||
@@ -483,7 +476,7 @@ static void SDL_LogEvent(const SDL_Event *event)
|
||||
|
||||
SDL_EVENT_CASE(SDL_MULTIGESTURE)
|
||||
(void)SDL_snprintf(details, sizeof(details), " (timestamp=%u touchid=%" SDL_PRIs64 " dtheta=%f ddist=%f x=%f y=%f numfingers=%u)",
|
||||
(uint)event->mgesture.timestamp, (long long)event->mgesture.touchId,
|
||||
(uint)event->mgesture.timestamp, event->mgesture.touchId,
|
||||
event->mgesture.dTheta, event->mgesture.dDist,
|
||||
event->mgesture.x, event->mgesture.y, (uint)event->mgesture.numFingers);
|
||||
break;
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
#include <stdio.h>
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIMITS_H
|
||||
#include <limits.h>
|
||||
#endif
|
||||
@@ -525,16 +524,17 @@ static int SDLCALL mem_close(SDL_RWops *context)
|
||||
/* Functions to create SDL_RWops structures from various data sources */
|
||||
|
||||
#if defined(HAVE_STDIO_H) && !(defined(__WIN32__) || defined(__GDK__))
|
||||
static SDL_bool SDL_IsRegularFile(FILE *f)
|
||||
static SDL_bool IsRegularFileOrPipe(FILE *f)
|
||||
{
|
||||
#ifdef __WINRT__
|
||||
struct __stat64 st;
|
||||
if (_fstat64(_fileno(f), &st) < 0 || (st.st_mode & _S_IFMT) != _S_IFREG) {
|
||||
if (_fstat64(_fileno(f), &st) < 0 ||
|
||||
!((st.st_mode & _S_IFMT) == _S_IFREG || (st.st_mode & _S_IFMT) == _S_IFIFO)) {
|
||||
return SDL_FALSE;
|
||||
}
|
||||
#else
|
||||
struct stat st;
|
||||
if (fstat(fileno(f), &st) < 0 || !S_ISREG(st.st_mode)) {
|
||||
if (fstat(fileno(f), &st) < 0 || !(S_ISREG(st.st_mode) || S_ISFIFO(st.st_mode))) {
|
||||
return SDL_FALSE;
|
||||
}
|
||||
#endif
|
||||
@@ -555,9 +555,9 @@ SDL_RWops *SDL_RWFromFile(const char *file, const char *mode)
|
||||
if (*file == '/') {
|
||||
FILE *fp = fopen(file, mode);
|
||||
if (fp) {
|
||||
if (!SDL_IsRegularFile(fp)) {
|
||||
if (!IsRegularFileOrPipe(fp)) {
|
||||
fclose(fp);
|
||||
SDL_SetError("%s is not a regular file", file);
|
||||
SDL_SetError("%s is not a regular file or pipe", file);
|
||||
return NULL;
|
||||
}
|
||||
return SDL_RWFromFP(fp, 1);
|
||||
@@ -575,9 +575,9 @@ SDL_RWops *SDL_RWFromFile(const char *file, const char *mode)
|
||||
fp = fopen(path, mode);
|
||||
SDL_stack_free(path);
|
||||
if (fp) {
|
||||
if (!SDL_IsRegularFile(fp)) {
|
||||
if (!IsRegularFileOrPipe(fp)) {
|
||||
fclose(fp);
|
||||
SDL_SetError("%s is not a regular file", path);
|
||||
SDL_SetError("%s is not a regular file or pipe", path);
|
||||
return NULL;
|
||||
}
|
||||
return SDL_RWFromFP(fp, 1);
|
||||
@@ -633,10 +633,10 @@ SDL_RWops *SDL_RWFromFile(const char *file, const char *mode)
|
||||
#endif
|
||||
if (!fp) {
|
||||
SDL_SetError("Couldn't open %s", file);
|
||||
} else if (!SDL_IsRegularFile(fp)) {
|
||||
} else if (!IsRegularFileOrPipe(fp)) {
|
||||
fclose(fp);
|
||||
fp = NULL;
|
||||
SDL_SetError("%s is not a regular file", file);
|
||||
SDL_SetError("%s is not a regular file or pipe", file);
|
||||
} else {
|
||||
rwops = SDL_RWFromFP(fp, SDL_TRUE);
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
*/
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#ifdef SDL_FILESYSTEM_XBOX
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
/* System dependent filesystem routines */
|
||||
@@ -135,6 +134,5 @@ SDL_GetPrefPath(const char *org, const char *app)
|
||||
return folderPath;
|
||||
}
|
||||
|
||||
#endif /* SDL_FILESYSTEM_XBOX */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
||||
@@ -877,6 +877,41 @@ static int SDL_libusb_get_string_descriptor(libusb_device_handle *dev,
|
||||
#undef make_path
|
||||
#undef read_thread
|
||||
|
||||
/* If the platform has any backend other than libusb, try to avoid using
|
||||
* libusb as the main backend for devices, since it detaches drivers and
|
||||
* therefore makes devices inaccessible to the rest of the OS.
|
||||
*
|
||||
* We do this by whitelisting devices we know to be accessible _exclusively_
|
||||
* via libusb; these are typically devices that look like HIDs but have a
|
||||
* quirk that requires direct access to the hardware.
|
||||
*/
|
||||
static const struct {
|
||||
Uint16 vendor;
|
||||
Uint16 product;
|
||||
} SDL_libusb_whitelist[] = {
|
||||
{ 0x057e, 0x0337 } /* Nintendo WUP-028, Wii U/Switch GameCube Adapter */
|
||||
};
|
||||
|
||||
static SDL_bool
|
||||
IsInWhitelist(Uint16 vendor, Uint16 product)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < SDL_arraysize(SDL_libusb_whitelist); i += 1) {
|
||||
if (vendor == SDL_libusb_whitelist[i].vendor &&
|
||||
product == SDL_libusb_whitelist[i].product) {
|
||||
return SDL_TRUE;
|
||||
}
|
||||
}
|
||||
return SDL_FALSE;
|
||||
}
|
||||
|
||||
#if defined(HAVE_PLATFORM_BACKEND) || HAVE_DRIVER_BACKEND
|
||||
static const SDL_bool use_libusb_whitelist_default = SDL_TRUE;
|
||||
#else
|
||||
static const SDL_bool use_libusb_whitelist_default = SDL_FALSE;
|
||||
#endif /* HAVE_PLATFORM_BACKEND || HAVE_DRIVER_BACKEND */
|
||||
static SDL_bool use_libusb_whitelist = use_libusb_whitelist_default;
|
||||
|
||||
#endif /* HAVE_LIBUSB */
|
||||
|
||||
#endif /* !SDL_HIDAPI_DISABLED */
|
||||
@@ -1062,6 +1097,8 @@ int SDL_hid_init(void)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBUSB
|
||||
use_libusb_whitelist = SDL_GetHintBoolean("SDL_HIDAPI_LIBUSB_WHITELIST",
|
||||
use_libusb_whitelist_default);
|
||||
if (SDL_getenv("SDL_HIDAPI_DISABLE_LIBUSB") != NULL) {
|
||||
SDL_LogDebug(SDL_LOG_CATEGORY_INPUT,
|
||||
"libusb disabled by SDL_HIDAPI_DISABLE_LIBUSB");
|
||||
@@ -1238,6 +1275,16 @@ struct SDL_hid_device_info *SDL_hid_enumerate(unsigned short vendor_id, unsigned
|
||||
SDL_Log("libusb devices found:");
|
||||
#endif
|
||||
for (usb_dev = usb_devs; usb_dev; usb_dev = usb_dev->next) {
|
||||
if (use_libusb_whitelist) {
|
||||
if (!IsInWhitelist(usb_dev->vendor_id, usb_dev->product_id)) {
|
||||
#ifdef DEBUG_HIDAPI
|
||||
SDL_Log("Device was not in libusb whitelist: %ls %ls 0x%.4hx 0x%.4hx",
|
||||
usb_dev->manufacturer_string, usb_dev->product_string,
|
||||
usb_dev->vendor_id, usb_dev->product_id);
|
||||
#endif /* DEBUG_HIDAPI */
|
||||
continue;
|
||||
}
|
||||
}
|
||||
new_dev = (struct SDL_hid_device_info *)SDL_malloc(sizeof(struct SDL_hid_device_info));
|
||||
if (new_dev == NULL) {
|
||||
LIBUSB_hid_free_enumeration(usb_devs);
|
||||
|
||||
@@ -555,7 +555,7 @@ static ControllerMapping_t *SDL_CreateMappingForHIDAPIController(SDL_JoystickGUI
|
||||
SDL_strlcat(mapping_string, "a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,righttrigger:a5,start:b6,x:b2,y:b3,misc1:b15,", sizeof(mapping_string));
|
||||
break;
|
||||
case k_eSwitchDeviceInfoControllerType_SEGA_Genesis:
|
||||
SDL_strlcat(mapping_string, "a:b0,b:b1,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,rightshoulder:b10,righttrigger:a5,start:b6,misc1:b15,", sizeof(mapping_string));
|
||||
SDL_strlcat(mapping_string, "a:b0,b:b1,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,rightshoulder:b10,righttrigger:a5,start:b6,x:b2,y:b3,misc1:b15,", sizeof(mapping_string));
|
||||
break;
|
||||
case k_eWiiExtensionControllerType_None:
|
||||
SDL_strlcat(mapping_string, "a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,start:b6,x:b2,y:b3,", sizeof(mapping_string));
|
||||
|
||||
@@ -125,6 +125,7 @@ static const char *s_ControllerMappings[] = {
|
||||
"03000000260900008888000000000000,Cyber Gadget GameCube Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:a4,rightx:a2,righty:a3~,start:b7,x:b2,y:b3,",
|
||||
"03000000a306000022f6000000000000,Cyborg V.3 Rumble Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:+a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:-a3,rightx:a2,righty:a4,start:b9,x:b0,y:b3,",
|
||||
"03000000451300000830000000000000,Defender Game Racer X7,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,",
|
||||
"03000000790000000600000000000000,Defender Joystick Cobra R4,crc:c77a,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2~,righty:a3~,start:b9,x:b3,y:b0,",
|
||||
"03000000791d00000103000000000000,Dual Box WII,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,rightx:a2,righty:a3,start:b9,x:b3,y:b0,",
|
||||
"03000000bd12000002e0000000000000,Dual USB Vibration Joystick,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b9,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b10,righttrigger:b5,rightx:a3,righty:a2,start:b11,x:b3,y:b0,",
|
||||
"030000006f0e00003001000000000000,EA SPORTS PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,",
|
||||
@@ -303,6 +304,7 @@ static const char *s_ControllerMappings[] = {
|
||||
"030000006f0e00002f01000000000000,Rock Candy PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,",
|
||||
"03000000341a00000208000000000000,SL-6555-SBK,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:-a4,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a4,rightx:a3,righty:a2,start:b7,x:b2,y:b3,",
|
||||
"03000000341a00000908000000000000,SL-6566,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,",
|
||||
"03000000790000000600000000000000,SPEEDLINK STRIKE Gamepad,crc:5811,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a4,start:b9,x:b3,y:b0,",
|
||||
"03000000790000001c18000000000000,STK-7024X,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,",
|
||||
"03000000ff1100003133000000000000,SVEN X-PAD,a:b2,b:b3,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a2,righty:a4,start:b5,x:b0,y:b1,",
|
||||
"03000000457500002211000000000000,SZMY-POWER PC Gamepad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,",
|
||||
@@ -317,7 +319,7 @@ static const char *s_ControllerMappings[] = {
|
||||
"03000000a30600002106000000000000,Saitek PS1000,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a4,start:b9,x:b0,y:b3,",
|
||||
"03000000a306000020f6000000000000,Saitek PS2700,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a4,start:b9,x:b0,y:b3,",
|
||||
"03000000300f00001101000000000000,Saitek Rumble Pad,a:b2,b:b3,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b1,",
|
||||
"03000000790000000600000000000000,Sanwa Supply JY-P76USV,crc:20f0,+leftx:+a0,+rightx:+a2,+righty:a4,-leftx:-a0,-lefty:-a1,-rightx:-a2,-righty:-a4,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,lefty:+a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,start:b9,x:b2,y:b3,",
|
||||
"03000000790000000600000000000000,Sanwa Supply JY-P76USV,crc:20f0,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a4,start:b9,x:b2,y:b3,",
|
||||
"0300000000050000289b000000000000,Saturn_Adapter_2.0,a:b1,b:b2,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,start:b9,x:b0,y:b3,",
|
||||
"030000009b2800000500000000000000,Saturn_Adapter_2.0,a:b1,b:b2,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,start:b9,x:b0,y:b3,",
|
||||
"030000008f0e00000800000000000000,SpeedLink Strike FX,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,",
|
||||
@@ -770,6 +772,8 @@ static const char *s_ControllerMappings[] = {
|
||||
"03000000300f00001211000011010000,QanBa Arcade JoyStick,a:b2,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b5,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b6,start:b9,x:b1,y:b3,",
|
||||
"03000000222c00000225000011010000,Qanba Dragon Arcade Joystick (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,",
|
||||
"03000000222c00000025000011010000,Qanba Dragon Arcade Joystick (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,",
|
||||
"03000000222c00001020000011010000,Qanba Drone 2 Arcade Joystick (PS5),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,",
|
||||
"03000000222c00001220000011010000,Qanba Drone 2 Arcade Joystick (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,",
|
||||
"03000000222c00000020000011010000,Qanba Drone Arcade Joystick (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,rightshoulder:b5,righttrigger:a4,start:b9,x:b0,y:b3,",
|
||||
"03000000222c00000223000011010000,Qanba Obsidian Arcade Joystick (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,",
|
||||
"03000000222c00000023000011010000,Qanba Obsidian Arcade Joystick (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,",
|
||||
@@ -859,7 +863,6 @@ static const char *s_ControllerMappings[] = {
|
||||
"03000000120c0000100e000011010000,ZEROPLUS P4 Gamepad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,",
|
||||
"03000000120c0000101e000011010000,ZEROPLUS P4 Wired Gamepad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,",
|
||||
"03000000666600006706000000010000,boom PSX to PC Converter,a:b2,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,leftshoulder:b6,leftstick:b9,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b10,righttrigger:b5,rightx:a2,righty:a3,start:b11,x:b3,y:b0,",
|
||||
"030000000d0f00000d00000000010000,hori,a:b0,b:b6,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b3,leftx:b4,lefty:b5,rightshoulder:b7,start:b9,x:b1,y:b2,",
|
||||
"03000000830500006020000010010000,iBuffalo SNES Controller,a:b0,b:b1,back:b6,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b7,x:b2,y:b3,hint:SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,",
|
||||
"03000000830500006020000010010000,iBuffalo SNES Controller,a:b1,b:b0,back:b6,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b7,x:b3,y:b2,hint:!SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,",
|
||||
"050000006964726f69643a636f6e0000,idroid:con,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,",
|
||||
|
||||
@@ -293,6 +293,7 @@ static Uint32 initial_flightstick_devices[] = {
|
||||
MAKE_VIDPID(0x046d, 0xc215), /* Logitech Extreme 3D */
|
||||
MAKE_VIDPID(0x231d, 0x0126), /* Gunfighter Mk.III ‘Space Combat Edition’ (right) */
|
||||
MAKE_VIDPID(0x231d, 0x0127), /* Gunfighter Mk.III ‘Space Combat Edition’ (left) */
|
||||
MAKE_VIDPID(0x362c, 0x0001), /* Yawman Arrow */
|
||||
};
|
||||
static SDL_vidpid_list flightstick_devices = {
|
||||
SDL_HINT_JOYSTICK_FLIGHTSTICK_DEVICES, 0, 0, NULL,
|
||||
@@ -369,7 +370,10 @@ static Uint32 initial_wheel_devices[] = {
|
||||
MAKE_VIDPID(0x044f, 0xb65e), /* Thrustmaster T500RS */
|
||||
MAKE_VIDPID(0x044f, 0xb664), /* Thrustmaster TX (initial mode) */
|
||||
MAKE_VIDPID(0x044f, 0xb669), /* Thrustmaster TX (active mode) */
|
||||
MAKE_VIDPID(0x044f, 0xb691), /* Thrustmaster TS-XW (initial mode) */
|
||||
MAKE_VIDPID(0x044f, 0xb692), /* Thrustmaster TS-XW (active mode) */
|
||||
MAKE_VIDPID(0x0483, 0x0522), /* Simagic Wheelbase (including M10, Alpha Mini, Alpha, Alpha U) */
|
||||
MAKE_VIDPID(0x0483, 0xa355), /* VRS DirectForce Pro Wheel Base */
|
||||
MAKE_VIDPID(0x0eb7, 0x0001), /* Fanatec ClubSport Wheel Base V2 */
|
||||
MAKE_VIDPID(0x0eb7, 0x0004), /* Fanatec ClubSport Wheel Base V2.5 */
|
||||
MAKE_VIDPID(0x0eb7, 0x0005), /* Fanatec CSL Elite Wheel Base+ (PS4) */
|
||||
@@ -382,10 +386,20 @@ static Uint32 initial_wheel_devices[] = {
|
||||
MAKE_VIDPID(0x0eb7, 0x0e03), /* Fanatec CSL Elite Wheel Base */
|
||||
MAKE_VIDPID(0x11ff, 0x0511), /* DragonRise Inc. Wired Wheel (initial mode) (also known as PXN V900 (PS3), Superdrive SV-750, or a Genesis Seaborg 400) */
|
||||
MAKE_VIDPID(0x1209, 0xffb0), /* Generic FFBoard OpenFFBoard universal forcefeedback wheel */
|
||||
MAKE_VIDPID(0x16d0, 0x0d5a), /* Simucube 1 Wheelbase */
|
||||
MAKE_VIDPID(0x16d0, 0x0d5f), /* Simucube 2 Ultimate Wheelbase */
|
||||
MAKE_VIDPID(0x16d0, 0x0d60), /* Simucube 2 Pro Wheelbase */
|
||||
MAKE_VIDPID(0x16d0, 0x0d61), /* Simucube 2 Sport Wheelbase */
|
||||
MAKE_VIDPID(0x2433, 0xf300), /* Asetek SimSports Invicta Wheelbase */
|
||||
MAKE_VIDPID(0x2433, 0xf301), /* Asetek SimSports Forte Wheelbase */
|
||||
MAKE_VIDPID(0x2433, 0xf303), /* Asetek SimSports La Prima Wheelbase */
|
||||
MAKE_VIDPID(0x2433, 0xf306), /* Asetek SimSports Tony Kannan Wheelbase */
|
||||
MAKE_VIDPID(0x3416, 0x0301), /* Cammus C5 Wheelbase */
|
||||
MAKE_VIDPID(0x346e, 0x0000), /* Moza R16/R21 Wheelbase */
|
||||
MAKE_VIDPID(0x346e, 0x0002), /* Moza R9 Wheelbase */
|
||||
MAKE_VIDPID(0x346e, 0x0004), /* Moza R5 Wheelbase */
|
||||
MAKE_VIDPID(0x346e, 0x0005), /* Moza R3 Wheelbase */
|
||||
MAKE_VIDPID(0x346e, 0x0006), /* Moza R12 Wheelbase */
|
||||
};
|
||||
static SDL_vidpid_list wheel_devices = {
|
||||
SDL_HINT_JOYSTICK_WHEEL_DEVICES, 0, 0, NULL,
|
||||
@@ -1313,13 +1327,15 @@ const char *SDL_JoystickName(SDL_Joystick *joystick)
|
||||
const SDL_SteamVirtualGamepadInfo *info;
|
||||
|
||||
SDL_LockJoysticks();
|
||||
info = SDL_GetJoystickInstanceVirtualGamepadInfo(joystick->instance_id);
|
||||
if (info) {
|
||||
retval = info->name;
|
||||
} else {
|
||||
{
|
||||
CHECK_JOYSTICK_MAGIC(joystick, NULL);
|
||||
|
||||
retval = joystick->name;
|
||||
info = SDL_GetJoystickInstanceVirtualGamepadInfo(joystick->instance_id);
|
||||
if (info) {
|
||||
retval = info->name;
|
||||
} else {
|
||||
retval = joystick->name;
|
||||
}
|
||||
}
|
||||
SDL_UnlockJoysticks();
|
||||
|
||||
@@ -3102,13 +3118,17 @@ Uint16 SDL_JoystickGetVendor(SDL_Joystick *joystick)
|
||||
const SDL_SteamVirtualGamepadInfo *info;
|
||||
|
||||
SDL_LockJoysticks();
|
||||
info = SDL_GetJoystickInstanceVirtualGamepadInfo(joystick->instance_id);
|
||||
if (info) {
|
||||
vendor = info->vendor_id;
|
||||
} else {
|
||||
SDL_JoystickGUID guid = SDL_JoystickGetGUID(joystick);
|
||||
{
|
||||
CHECK_JOYSTICK_MAGIC(joystick, 0);
|
||||
|
||||
SDL_GetJoystickGUIDInfo(guid, &vendor, NULL, NULL, NULL);
|
||||
info = SDL_GetJoystickInstanceVirtualGamepadInfo(joystick->instance_id);
|
||||
if (info) {
|
||||
vendor = info->vendor_id;
|
||||
} else {
|
||||
SDL_JoystickGUID guid = SDL_JoystickGetGUID(joystick);
|
||||
|
||||
SDL_GetJoystickGUIDInfo(guid, &vendor, NULL, NULL, NULL);
|
||||
}
|
||||
}
|
||||
SDL_UnlockJoysticks();
|
||||
|
||||
@@ -3121,13 +3141,17 @@ Uint16 SDL_JoystickGetProduct(SDL_Joystick *joystick)
|
||||
const SDL_SteamVirtualGamepadInfo *info;
|
||||
|
||||
SDL_LockJoysticks();
|
||||
info = SDL_GetJoystickInstanceVirtualGamepadInfo(joystick->instance_id);
|
||||
if (info) {
|
||||
product = info->product_id;
|
||||
} else {
|
||||
SDL_JoystickGUID guid = SDL_JoystickGetGUID(joystick);
|
||||
{
|
||||
CHECK_JOYSTICK_MAGIC(joystick, 0);
|
||||
|
||||
SDL_GetJoystickGUIDInfo(guid, NULL, &product, NULL, NULL);
|
||||
info = SDL_GetJoystickInstanceVirtualGamepadInfo(joystick->instance_id);
|
||||
if (info) {
|
||||
product = info->product_id;
|
||||
} else {
|
||||
SDL_JoystickGUID guid = SDL_JoystickGetGUID(joystick);
|
||||
|
||||
SDL_GetJoystickGUIDInfo(guid, NULL, &product, NULL, NULL);
|
||||
}
|
||||
}
|
||||
SDL_UnlockJoysticks();
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ static const ControllerDescription_t arrControllers[] = {
|
||||
{ MAKE_CONTROLLER_ID( 0x0079, 0x1844 ), k_eControllerType_PS3Controller, NULL }, // From SDL
|
||||
{ MAKE_CONTROLLER_ID( 0x044f, 0xb315 ), k_eControllerType_PS3Controller, NULL }, // Firestorm Dual Analog 3
|
||||
{ MAKE_CONTROLLER_ID( 0x044f, 0xd007 ), k_eControllerType_PS3Controller, NULL }, // Thrustmaster wireless 3-1
|
||||
{ MAKE_CONTROLLER_ID( 0x046d, 0xcad1 ), k_eControllerType_PS3Controller, NULL }, // Logitech Chillstream
|
||||
//{ MAKE_CONTROLLER_ID( 0x046d, 0xc24f ), k_eControllerType_PS3Controller, NULL }, // Logitech G29 (PS3)
|
||||
{ MAKE_CONTROLLER_ID( 0x054c, 0x0268 ), k_eControllerType_PS3Controller, NULL }, // Sony PS3 Controller
|
||||
{ MAKE_CONTROLLER_ID( 0x056e, 0x200f ), k_eControllerType_PS3Controller, NULL }, // From SDL
|
||||
@@ -157,6 +158,7 @@ static const ControllerDescription_t arrControllers[] = {
|
||||
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x0184 ), k_eControllerType_PS5Controller, NULL }, // Hori Fighting Stick α
|
||||
{ MAKE_CONTROLLER_ID( 0x1532, 0x100b ), k_eControllerType_PS5Controller, NULL }, // Razer Wolverine V2 Pro (Wired)
|
||||
{ MAKE_CONTROLLER_ID( 0x1532, 0x100c ), k_eControllerType_PS5Controller, NULL }, // Razer Wolverine V2 Pro (Wireless)
|
||||
{ MAKE_CONTROLLER_ID( 0x1532, 0x1012 ), k_eControllerType_PS5Controller, NULL }, // Razer Kitsune
|
||||
{ MAKE_CONTROLLER_ID( 0x3285, 0x0d18 ), k_eControllerType_PS5Controller, NULL }, // NACON Revolution 5 Pro (PS5 mode with dongle)
|
||||
{ MAKE_CONTROLLER_ID( 0x3285, 0x0d19 ), k_eControllerType_PS5Controller, NULL }, // NACON Revolution 5 Pro (PS5 mode wired)
|
||||
{ MAKE_CONTROLLER_ID( 0x358a, 0x0104 ), k_eControllerType_PS5Controller, NULL }, // Backbone One PlayStation Edition for iOS
|
||||
@@ -593,7 +595,7 @@ static const ControllerDescription_t arrControllers[] = {
|
||||
{ MAKE_CONTROLLER_ID( 0x28de, 0x1102 ), k_eControllerType_SteamController, NULL }, // Valve wired Steam Controller (D0G)
|
||||
{ MAKE_CONTROLLER_ID( 0x28de, 0x1105 ), k_eControllerType_SteamController, NULL }, // Valve Bluetooth Steam Controller (D0G)
|
||||
{ MAKE_CONTROLLER_ID( 0x28de, 0x1106 ), k_eControllerType_SteamController, NULL }, // Valve Bluetooth Steam Controller (D0G)
|
||||
{ MAKE_CONTROLLER_ID( 0x28de, 0x11ff ), k_eControllerType_UnknownNonSteamController, "Steam Virtual Gamepad" }, // Steam virtual gamepad
|
||||
{ MAKE_CONTROLLER_ID( 0x28de, 0x11ff ), k_eControllerType_UnknownNonSteamController, NULL }, // Steam Virtual Gamepad
|
||||
{ MAKE_CONTROLLER_ID( 0x28de, 0x1142 ), k_eControllerType_SteamController, NULL }, // Valve wireless Steam Controller
|
||||
{ MAKE_CONTROLLER_ID( 0x28de, 0x1201 ), k_eControllerType_SteamControllerV2, NULL }, // Valve wired Steam Controller (HEADCRAB)
|
||||
{ MAKE_CONTROLLER_ID( 0x28de, 0x1202 ), k_eControllerType_SteamControllerV2, NULL }, // Valve Bluetooth Steam Controller (HEADCRAB)
|
||||
|
||||
@@ -584,7 +584,13 @@ static SDL_bool HIDAPI_DriverPS3ThirdParty_IsSupportedDevice(SDL_HIDAPI_Device *
|
||||
Uint8 data[USB_PACKET_LENGTH];
|
||||
int size;
|
||||
|
||||
if (HIDAPI_SupportsPlaystationDetection(vendor_id, product_id)) {
|
||||
if (vendor_id == USB_VENDOR_LOGITECH &&
|
||||
product_id == USB_PRODUCT_LOGITECH_CHILLSTREAM) {
|
||||
return SDL_TRUE;
|
||||
}
|
||||
|
||||
if ((type == SDL_CONTROLLER_TYPE_PS3 && vendor_id != USB_VENDOR_SONY) ||
|
||||
HIDAPI_SupportsPlaystationDetection(vendor_id, product_id)) {
|
||||
if (device && device->dev) {
|
||||
size = ReadFeatureReport(device->dev, 0x03, data, sizeof(data));
|
||||
if (size == 8 && data[2] == 0x26) {
|
||||
@@ -768,7 +774,7 @@ static void HIDAPI_DriverPS3ThirdParty_HandleStatePacket18(SDL_Joystick *joystic
|
||||
0, /* SDL_GAMEPAD_BUTTON_LEFT_STICK */
|
||||
0, /* SDL_GAMEPAD_BUTTON_RIGHT_STICK */
|
||||
14, /* SDL_GAMEPAD_BUTTON_LEFT_SHOULDER */
|
||||
16, /* SDL_GAMEPAD_BUTTON_RIGHT_SHOULDER */
|
||||
15, /* SDL_GAMEPAD_BUTTON_RIGHT_SHOULDER */
|
||||
8, /* SDL_GAMEPAD_BUTTON_DPAD_UP */
|
||||
9, /* SDL_GAMEPAD_BUTTON_DPAD_DOWN */
|
||||
7, /* SDL_GAMEPAD_BUTTON_DPAD_LEFT */
|
||||
@@ -813,48 +819,56 @@ static void HIDAPI_DriverPS3ThirdParty_HandleStatePacket19(SDL_Joystick *joystic
|
||||
SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_GUIDE, (data[1] & 0x10) ? SDL_PRESSED : SDL_RELEASED);
|
||||
}
|
||||
|
||||
if (ctx->last_state[2] != data[2]) {
|
||||
SDL_bool dpad_up = SDL_FALSE;
|
||||
SDL_bool dpad_down = SDL_FALSE;
|
||||
SDL_bool dpad_left = SDL_FALSE;
|
||||
SDL_bool dpad_right = SDL_FALSE;
|
||||
if (ctx->device->vendor_id == USB_VENDOR_SAITEK && ctx->device->product_id == USB_PRODUCT_SAITEK_CYBORG_V3) {
|
||||
/* Cyborg V.3 Rumble Pad doesn't set the dpad bits as expected, so use the axes instead */
|
||||
SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_DPAD_DOWN, data[10] ? SDL_PRESSED : SDL_RELEASED);
|
||||
SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_DPAD_UP, data[9] ? SDL_PRESSED : SDL_RELEASED);
|
||||
SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_DPAD_RIGHT, data[7] ? SDL_PRESSED : SDL_RELEASED);
|
||||
SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_DPAD_LEFT, data[8] ? SDL_PRESSED : SDL_RELEASED);
|
||||
} else {
|
||||
if (ctx->last_state[2] != data[2]) {
|
||||
SDL_bool dpad_up = SDL_FALSE;
|
||||
SDL_bool dpad_down = SDL_FALSE;
|
||||
SDL_bool dpad_left = SDL_FALSE;
|
||||
SDL_bool dpad_right = SDL_FALSE;
|
||||
|
||||
switch (data[2] & 0x0f) {
|
||||
case 0:
|
||||
dpad_up = SDL_TRUE;
|
||||
break;
|
||||
case 1:
|
||||
dpad_up = SDL_TRUE;
|
||||
dpad_right = SDL_TRUE;
|
||||
break;
|
||||
case 2:
|
||||
dpad_right = SDL_TRUE;
|
||||
break;
|
||||
case 3:
|
||||
dpad_right = SDL_TRUE;
|
||||
dpad_down = SDL_TRUE;
|
||||
break;
|
||||
case 4:
|
||||
dpad_down = SDL_TRUE;
|
||||
break;
|
||||
case 5:
|
||||
dpad_left = SDL_TRUE;
|
||||
dpad_down = SDL_TRUE;
|
||||
break;
|
||||
case 6:
|
||||
dpad_left = SDL_TRUE;
|
||||
break;
|
||||
case 7:
|
||||
dpad_up = SDL_TRUE;
|
||||
dpad_left = SDL_TRUE;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
switch (data[2] & 0x0f) {
|
||||
case 0:
|
||||
dpad_up = SDL_TRUE;
|
||||
break;
|
||||
case 1:
|
||||
dpad_up = SDL_TRUE;
|
||||
dpad_right = SDL_TRUE;
|
||||
break;
|
||||
case 2:
|
||||
dpad_right = SDL_TRUE;
|
||||
break;
|
||||
case 3:
|
||||
dpad_right = SDL_TRUE;
|
||||
dpad_down = SDL_TRUE;
|
||||
break;
|
||||
case 4:
|
||||
dpad_down = SDL_TRUE;
|
||||
break;
|
||||
case 5:
|
||||
dpad_left = SDL_TRUE;
|
||||
dpad_down = SDL_TRUE;
|
||||
break;
|
||||
case 6:
|
||||
dpad_left = SDL_TRUE;
|
||||
break;
|
||||
case 7:
|
||||
dpad_up = SDL_TRUE;
|
||||
dpad_left = SDL_TRUE;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_DPAD_DOWN, dpad_down);
|
||||
SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_DPAD_UP, dpad_up);
|
||||
SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_DPAD_RIGHT, dpad_right);
|
||||
SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_DPAD_LEFT, dpad_left);
|
||||
}
|
||||
SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_DPAD_DOWN, dpad_down);
|
||||
SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_DPAD_UP, dpad_up);
|
||||
SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_DPAD_RIGHT, dpad_right);
|
||||
SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_DPAD_LEFT, dpad_left);
|
||||
}
|
||||
|
||||
axis = ((int)data[17] * 257) - 32768;
|
||||
|
||||
@@ -499,6 +499,12 @@ static SDL_bool HIDAPI_DriverPS5_InitDevice(SDL_HIDAPI_Device *device)
|
||||
ctx->sensors_supported = SDL_TRUE;
|
||||
ctx->touchpad_supported = SDL_TRUE;
|
||||
ctx->use_alternate_report = SDL_TRUE;
|
||||
} else if (device->vendor_id == USB_VENDOR_RAZER &&
|
||||
device->product_id == USB_PRODUCT_RAZER_KITSUNE) {
|
||||
/* The Razer Kitsune doesn't respond to the detection protocol, but has a touchpad */
|
||||
joystick_type = SDL_JOYSTICK_TYPE_ARCADE_STICK;
|
||||
ctx->touchpad_supported = SDL_TRUE;
|
||||
ctx->use_alternate_report = SDL_TRUE;
|
||||
}
|
||||
}
|
||||
ctx->effects_supported = (ctx->lightbar_supported || ctx->vibration_supported || ctx->playerled_supported);
|
||||
|
||||
@@ -758,7 +758,18 @@ static Uint8 GetDefaultInputMode(SDL_DriverSwitch_Context *ctx)
|
||||
* battery level over Bluetooth anyway.
|
||||
*/
|
||||
if (ctx->device->vendor_id == USB_VENDOR_NINTENDO) {
|
||||
/* However, switching to full controller state breaks DirectInput, so let's not do that */
|
||||
#if 0
|
||||
input_mode = k_eSwitchInputReportIDs_FullControllerState;
|
||||
#endif
|
||||
|
||||
/* However, Joy-Con controllers switch their thumbsticks into D-pad mode in simple mode,
|
||||
* so let's enable full controller state for them.
|
||||
*/
|
||||
if (ctx->device->product_id == USB_PRODUCT_NINTENDO_SWITCH_JOYCON_LEFT ||
|
||||
ctx->device->product_id == USB_PRODUCT_NINTENDO_SWITCH_JOYCON_RIGHT) {
|
||||
input_mode = k_eSwitchInputReportIDs_FullControllerState;
|
||||
}
|
||||
}
|
||||
return input_mode;
|
||||
}
|
||||
@@ -1292,6 +1303,27 @@ static void UpdateDeviceIdentity(SDL_HIDAPI_Device *device)
|
||||
break;
|
||||
case k_eSwitchDeviceInfoControllerType_Unknown:
|
||||
/* We couldn't read the device info for this controller, might not be fully compliant */
|
||||
if (device->vendor_id == USB_VENDOR_NINTENDO) {
|
||||
switch (device->product_id) {
|
||||
case USB_PRODUCT_NINTENDO_SWITCH_JOYCON_LEFT:
|
||||
ctx->m_eControllerType = k_eSwitchDeviceInfoControllerType_JoyConLeft;
|
||||
HIDAPI_SetDeviceName(device, "Nintendo Switch Joy-Con (L)");
|
||||
device->type = SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_JOYCON_LEFT;
|
||||
break;
|
||||
case USB_PRODUCT_NINTENDO_SWITCH_JOYCON_RIGHT:
|
||||
ctx->m_eControllerType = k_eSwitchDeviceInfoControllerType_JoyConRight;
|
||||
HIDAPI_SetDeviceName(device, "Nintendo Switch Joy-Con (R)");
|
||||
device->type = SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_JOYCON_RIGHT;
|
||||
break;
|
||||
case USB_PRODUCT_NINTENDO_SWITCH_PRO:
|
||||
ctx->m_eControllerType = k_eSwitchDeviceInfoControllerType_ProController;
|
||||
HIDAPI_SetDeviceName(device, "Nintendo Switch Pro Controller");
|
||||
device->type = SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return;
|
||||
default:
|
||||
device->type = SDL_CONTROLLER_TYPE_UNKNOWN;
|
||||
@@ -2211,6 +2243,10 @@ static SDL_bool HIDAPI_DriverSwitch_UpdateDevice(SDL_HIDAPI_Device *device)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ctx->m_rgucReadBuffer[0] == k_eSwitchInputReportIDs_SubcommandReply) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ctx->m_bInputOnly) {
|
||||
HandleInputOnlyControllerState(joystick, ctx, (SwitchInputOnlyControllerStatePacket_t *)&ctx->m_rgucReadBuffer[0]);
|
||||
} else {
|
||||
|
||||
@@ -157,17 +157,17 @@ SDL_bool HIDAPI_SupportsPlaystationDetection(Uint16 vendor, Uint16 product)
|
||||
case USB_VENDOR_HORI:
|
||||
return SDL_TRUE;
|
||||
case USB_VENDOR_LOGITECH:
|
||||
/* Most Logitech devices are fine with this, but there are a few exceptions */
|
||||
if (product == USB_PRODUCT_LOGITECH_F310) {
|
||||
/* The Logitech F310 gamepad will lock up */
|
||||
return SDL_FALSE;
|
||||
}
|
||||
if (product == 0xc33f) {
|
||||
/* The Logitech G815 keyboard will reset the LEDs */
|
||||
return SDL_FALSE;
|
||||
}
|
||||
return SDL_TRUE;
|
||||
/* Most Logitech devices are not PlayStation controllers, and some of them
|
||||
* lock up or reset when we send them the Sony third-party query feature
|
||||
* report, so don't include that vendor here. Instead add devices as
|
||||
* appropriate to controller_list.h
|
||||
*/
|
||||
return SDL_FALSE;
|
||||
case USB_VENDOR_MADCATZ:
|
||||
if (product == USB_PRODUCT_MADCATZ_SAITEK_SIDE_PANEL_CONTROL_DECK) {
|
||||
/* This is not a Playstation compatible device */
|
||||
return SDL_FALSE;
|
||||
}
|
||||
return SDL_TRUE;
|
||||
case USB_VENDOR_MAYFLASH:
|
||||
return SDL_TRUE;
|
||||
@@ -183,10 +183,10 @@ SDL_bool HIDAPI_SupportsPlaystationDetection(Uint16 vendor, Uint16 product)
|
||||
case USB_VENDOR_QANBA:
|
||||
return SDL_TRUE;
|
||||
case USB_VENDOR_RAZER:
|
||||
/* Most Razer devices are not game controllers, and some of them lock up
|
||||
* or reset when we send them the Sony third-party query feature report,
|
||||
* so don't include that vendor here. Instead add devices as appropriate
|
||||
* to controller_type.c
|
||||
/* Most Razer devices are not PlayStation controllers, and some of them
|
||||
* lock up or reset when we send them the Sony third-party query feature
|
||||
* report, so don't include that vendor here. Instead add devices as
|
||||
* appropriate to controller_list.h
|
||||
*
|
||||
* Reference: https://github.com/libsdl-org/SDL/issues/6733
|
||||
* https://github.com/libsdl-org/SDL/issues/6799
|
||||
|
||||
@@ -273,7 +273,7 @@ static int GuessIsSensor(int fd)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int IsJoystick(const char *path, int fd, char **name_return, Uint16 *vendor_return, Uint16 *product_return, SDL_JoystickGUID *guid)
|
||||
static int IsJoystick(const char *path, int *fd, char **name_return, Uint16 *vendor_return, Uint16 *product_return, SDL_JoystickGUID *guid)
|
||||
{
|
||||
struct input_id inpid;
|
||||
char *name;
|
||||
@@ -282,21 +282,32 @@ static int IsJoystick(const char *path, int fd, char **name_return, Uint16 *vend
|
||||
|
||||
SDL_zero(inpid);
|
||||
#ifdef SDL_USE_LIBUDEV
|
||||
SDL_UDEV_GetProductInfo(path, &inpid.vendor, &inpid.product, &inpid.version, &class);
|
||||
/* Opening input devices can generate synchronous device I/O, so avoid it if we can */
|
||||
if (SDL_UDEV_GetProductInfo(path, &inpid.vendor, &inpid.product, &inpid.version, &class) &&
|
||||
!(class & SDL_UDEV_DEVICE_JOYSTICK)) {
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
if (ioctl(fd, JSIOCGNAME(sizeof(product_string)), product_string) <= 0) {
|
||||
/* When udev is enabled we only get joystick devices here, so there's no need to test them */
|
||||
if (enumeration_method != ENUMERATION_LIBUDEV &&
|
||||
!(class & SDL_UDEV_DEVICE_JOYSTICK) && ( class || !GuessIsJoystick(fd))) {
|
||||
|
||||
if (fd && *fd < 0) {
|
||||
*fd = open(path, O_RDONLY | O_CLOEXEC, 0);
|
||||
}
|
||||
if (!fd || *fd < 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ioctl(*fd, JSIOCGNAME(sizeof(product_string)), product_string) <= 0) {
|
||||
/* When udev enumeration or classification, we only got joysticks here, so no need to test */
|
||||
if (enumeration_method != ENUMERATION_LIBUDEV && !class && !GuessIsJoystick(*fd)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Could have vendor and product already from udev, but should agree with evdev */
|
||||
if (ioctl(fd, EVIOCGID, &inpid) < 0) {
|
||||
if (ioctl(*fd, EVIOCGID, &inpid) < 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ioctl(fd, EVIOCGNAME(sizeof(product_string)), product_string) < 0) {
|
||||
if (ioctl(*fd, EVIOCGNAME(sizeof(product_string)), product_string) < 0) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -315,7 +326,7 @@ static int IsJoystick(const char *path, int fd, char **name_return, Uint16 *vend
|
||||
}
|
||||
#endif
|
||||
|
||||
FixupDeviceInfoForMapping(fd, &inpid);
|
||||
FixupDeviceInfoForMapping(*fd, &inpid);
|
||||
|
||||
#ifdef DEBUG_JOYSTICK
|
||||
SDL_Log("Joystick: %s, bustype = %d, vendor = 0x%.4x, product = 0x%.4x, version = %d\n", name, inpid.bustype, inpid.vendor, inpid.product, inpid.version);
|
||||
@@ -333,11 +344,32 @@ static int IsJoystick(const char *path, int fd, char **name_return, Uint16 *vend
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int IsSensor(const char *path, int fd)
|
||||
static int IsSensor(const char *path, int *fd)
|
||||
{
|
||||
struct input_id inpid;
|
||||
int class = 0;
|
||||
|
||||
if (ioctl(fd, EVIOCGID, &inpid) < 0) {
|
||||
SDL_zero(inpid);
|
||||
#ifdef SDL_USE_LIBUDEV
|
||||
/* Opening input devices can generate synchronous device I/O, so avoid it if we can */
|
||||
if (SDL_UDEV_GetProductInfo(path, &inpid.vendor, &inpid.product, &inpid.version, &class) &&
|
||||
!(class & SDL_UDEV_DEVICE_ACCELEROMETER)) {
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (fd && *fd < 0) {
|
||||
*fd = open(path, O_RDONLY | O_CLOEXEC, 0);
|
||||
}
|
||||
if (!fd || *fd < 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!class && !GuessIsSensor(*fd)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ioctl(*fd, EVIOCGID, &inpid) < 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -347,7 +379,7 @@ static int IsSensor(const char *path, int fd)
|
||||
return 0;
|
||||
}
|
||||
|
||||
return GuessIsSensor(fd);
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef SDL_USE_LIBUDEV
|
||||
@@ -434,16 +466,11 @@ static void MaybeAddDevice(const char *path)
|
||||
}
|
||||
}
|
||||
|
||||
fd = open(path, O_RDONLY | O_CLOEXEC, 0);
|
||||
if (fd < 0) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_INPUT_EVENTS
|
||||
SDL_Log("Checking %s\n", path);
|
||||
#endif
|
||||
|
||||
if (IsJoystick(path, fd, &name, &vendor, &product, &guid)) {
|
||||
if (IsJoystick(path, &fd, &name, &vendor, &product, &guid)) {
|
||||
#ifdef DEBUG_INPUT_EVENTS
|
||||
SDL_Log("found joystick: %s\n", path);
|
||||
#endif
|
||||
@@ -484,7 +511,7 @@ static void MaybeAddDevice(const char *path)
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (IsSensor(path, fd)) {
|
||||
if (IsSensor(path, &fd)) {
|
||||
#ifdef DEBUG_INPUT_EVENTS
|
||||
SDL_Log("found sensor: %s\n", path);
|
||||
#endif
|
||||
@@ -880,11 +907,24 @@ static void LINUX_ScanSteamVirtualGamepads(void)
|
||||
int num_virtual_gamepads = 0;
|
||||
int virtual_gamepad_slot;
|
||||
VirtualGamepadEntry *virtual_gamepads = NULL;
|
||||
#ifdef SDL_USE_LIBUDEV
|
||||
int class;
|
||||
#endif
|
||||
|
||||
count = scandir("/dev/input", &entries, filter_entries, NULL);
|
||||
for (i = 0; i < count; ++i) {
|
||||
(void)SDL_snprintf(path, SDL_arraysize(path), "/dev/input/%s", entries[i]->d_name);
|
||||
|
||||
#ifdef SDL_USE_LIBUDEV
|
||||
/* Opening input devices can generate synchronous device I/O, so avoid it if we can */
|
||||
class = 0;
|
||||
SDL_zero(inpid);
|
||||
if (SDL_UDEV_GetProductInfo(path, &inpid.vendor, &inpid.product, &inpid.version, &class) &&
|
||||
(inpid.vendor != USB_VENDOR_VALVE || inpid.product != USB_PRODUCT_STEAM_VIRTUAL_GAMEPAD)) {
|
||||
free(entries[i]); /* This should NOT be SDL_free() */
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
fd = open(path, O_RDONLY | O_CLOEXEC, 0);
|
||||
if (fd >= 0) {
|
||||
if (ioctl(fd, EVIOCGID, &inpid) == 0 &&
|
||||
@@ -986,6 +1026,9 @@ static void LINUX_JoystickDetect(void)
|
||||
static int LINUX_JoystickInit(void)
|
||||
{
|
||||
const char *devices = SDL_GetHint(SDL_HINT_JOYSTICK_DEVICE);
|
||||
#ifdef SDL_USE_LIBUDEV
|
||||
int udev_status = SDL_UDEV_Init();
|
||||
#endif
|
||||
|
||||
SDL_classic_joysticks = SDL_GetHintBoolean(SDL_HINT_LINUX_JOYSTICK_CLASSIC, SDL_FALSE);
|
||||
|
||||
@@ -1036,21 +1079,24 @@ static int LINUX_JoystickInit(void)
|
||||
}
|
||||
|
||||
if (enumeration_method == ENUMERATION_LIBUDEV) {
|
||||
if (SDL_UDEV_Init() < 0) {
|
||||
return SDL_SetError("Could not initialize UDEV");
|
||||
}
|
||||
if (udev_status == 0) {
|
||||
/* Set up the udev callback */
|
||||
if (SDL_UDEV_AddCallback(joystick_udev_callback) < 0) {
|
||||
SDL_UDEV_Quit();
|
||||
return SDL_SetError("Could not set up joystick <-> udev callback");
|
||||
}
|
||||
|
||||
/* Set up the udev callback */
|
||||
if (SDL_UDEV_AddCallback(joystick_udev_callback) < 0) {
|
||||
SDL_UDEV_Quit();
|
||||
return SDL_SetError("Could not set up joystick <-> udev callback");
|
||||
/* Force a scan to build the initial device list */
|
||||
SDL_UDEV_Scan();
|
||||
} else {
|
||||
SDL_LogDebug(SDL_LOG_CATEGORY_INPUT,
|
||||
"udev init failed, disabling udev integration");
|
||||
enumeration_method = ENUMERATION_FALLBACK;
|
||||
}
|
||||
|
||||
/* Force a scan to build the initial device list */
|
||||
SDL_UDEV_Scan();
|
||||
} else
|
||||
}
|
||||
#endif
|
||||
{
|
||||
|
||||
if (enumeration_method != ENUMERATION_LIBUDEV) {
|
||||
#if defined(HAVE_INOTIFY)
|
||||
inotify_fd = SDL_inotify_init1();
|
||||
|
||||
|
||||
@@ -210,7 +210,9 @@ static void PSP_JoystickUpdate(SDL_Joystick *joystick)
|
||||
static enum PspCtrlButtons old_buttons = 0;
|
||||
static unsigned char old_x = 0, old_y = 0;
|
||||
|
||||
sceCtrlReadBufferPositive(&pad, 1);
|
||||
if (sceCtrlPeekBufferPositive(&pad, 1) <= 0) {
|
||||
return;
|
||||
}
|
||||
buttons = pad.Buttons;
|
||||
x = pad.Lx;
|
||||
y = pad.Ly;
|
||||
|
||||
@@ -35,6 +35,15 @@ def find_element(prefix, bindings):
|
||||
|
||||
return -1
|
||||
|
||||
def get_crc_from_entry(entry):
|
||||
crc = ""
|
||||
line = "".join(entry)
|
||||
bindings = line.split(",")
|
||||
pos = find_element("crc:", bindings)
|
||||
if pos >= 0:
|
||||
crc = bindings[pos][4:]
|
||||
return crc
|
||||
|
||||
def save_controller(line):
|
||||
global controllers
|
||||
match = split_pattern.match(line)
|
||||
@@ -85,7 +94,7 @@ def save_controller(line):
|
||||
entry.append(match.group(5))
|
||||
controllers.append(entry)
|
||||
|
||||
entry_id = entry[1] + entry[3]
|
||||
entry_id = entry[1] + get_crc_from_entry(entry)
|
||||
if ',sdk' in line or ',hint:' in line:
|
||||
conditionals.append(entry_id)
|
||||
|
||||
@@ -94,7 +103,7 @@ def write_controllers():
|
||||
global controller_guids
|
||||
# Check for duplicates
|
||||
for entry in controllers:
|
||||
entry_id = entry[1] + entry[3]
|
||||
entry_id = entry[1] + get_crc_from_entry(entry)
|
||||
if (entry_id in controller_guids and entry_id not in conditionals):
|
||||
current_name = entry[2]
|
||||
existing_name = controller_guids[entry_id][2]
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
#define USB_VENDOR_POWERA_ALT 0x20d6
|
||||
#define USB_VENDOR_QANBA 0x2c22
|
||||
#define USB_VENDOR_RAZER 0x1532
|
||||
#define USB_VENDOR_SAITEK 0x06a3
|
||||
#define USB_VENDOR_SHANWAN 0x2563
|
||||
#define USB_VENDOR_SHANWAN_ALT 0x20bc
|
||||
#define USB_VENDOR_SONY 0x054c
|
||||
@@ -71,6 +72,7 @@
|
||||
#define USB_PRODUCT_HORI_FIGHTING_STICK_ALPHA_PS5 0x0184
|
||||
#define USB_PRODUCT_LOGITECH_F310 0xc216
|
||||
#define USB_PRODUCT_LOGITECH_CHILLSTREAM 0xcad1
|
||||
#define USB_PRODUCT_MADCATZ_SAITEK_SIDE_PANEL_CONTROL_DECK 0x2218
|
||||
#define USB_PRODUCT_NACON_REVOLUTION_5_PRO_PS4_WIRELESS 0x0d16
|
||||
#define USB_PRODUCT_NACON_REVOLUTION_5_PRO_PS4_WIRED 0x0d17
|
||||
#define USB_PRODUCT_NACON_REVOLUTION_5_PRO_PS5_WIRELESS 0x0d18
|
||||
@@ -89,6 +91,7 @@
|
||||
#define USB_PRODUCT_NVIDIA_SHIELD_CONTROLLER_V103 0x7210
|
||||
#define USB_PRODUCT_NVIDIA_SHIELD_CONTROLLER_V104 0x7214
|
||||
#define USB_PRODUCT_RAZER_ATROX 0x0a00
|
||||
#define USB_PRODUCT_RAZER_KITSUNE 0x1012
|
||||
#define USB_PRODUCT_RAZER_PANTHERA 0x0401
|
||||
#define USB_PRODUCT_RAZER_PANTHERA_EVO 0x1008
|
||||
#define USB_PRODUCT_RAZER_RAIJU 0x1000
|
||||
@@ -102,6 +105,7 @@
|
||||
#define USB_PRODUCT_RAZER_WOLVERINE_V2_PRO_PS5_WIRELESS 0x100c
|
||||
#define USB_PRODUCT_RAZER_WOLVERINE_V2_PRO_XBOX_WIRED 0x1010
|
||||
#define USB_PRODUCT_RAZER_WOLVERINE_V2_PRO_XBOX_WIRELESS 0x1011
|
||||
#define USB_PRODUCT_SAITEK_CYBORG_V3 0xf622
|
||||
#define USB_PRODUCT_SHANWAN_DS3 0x0523
|
||||
#define USB_PRODUCT_SONY_DS3 0x0268
|
||||
#define USB_PRODUCT_SONY_DS4 0x05c4
|
||||
|
||||
@@ -855,6 +855,7 @@ int SDL_DINPUT_JoystickOpen(SDL_Joystick *joystick, JoyStick_DeviceData *joystic
|
||||
} else if (FAILED(result)) {
|
||||
return SetDIerror("IDirectInputDevice8::SetProperty", result);
|
||||
}
|
||||
joystick->hwdata->first_update = SDL_TRUE;
|
||||
|
||||
/* Poll and wait for initial device state to be populated */
|
||||
result = IDirectInputDevice8_Poll(joystick->hwdata->InputDevice);
|
||||
@@ -1130,7 +1131,14 @@ void SDL_DINPUT_JoystickUpdate(SDL_Joystick *joystick)
|
||||
IDirectInputDevice8_Poll(joystick->hwdata->InputDevice);
|
||||
}
|
||||
|
||||
if (joystick->hwdata->buffered) {
|
||||
if (joystick->hwdata->first_update) {
|
||||
/* Poll to get the initial state of the joystick */
|
||||
UpdateDINPUTJoystickState_Polled(joystick);
|
||||
joystick->hwdata->first_update = SDL_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
if (joystick->hwdata->buffered ) {
|
||||
UpdateDINPUTJoystickState_Buffered(joystick);
|
||||
} else {
|
||||
UpdateDINPUTJoystickState_Polled(joystick);
|
||||
|
||||
@@ -77,6 +77,7 @@ struct joystick_hwdata
|
||||
LPDIRECTINPUTDEVICE8 InputDevice;
|
||||
DIDEVCAPS Capabilities;
|
||||
SDL_bool buffered;
|
||||
SDL_bool first_update;
|
||||
input_t Inputs[MAX_INPUTS];
|
||||
int NumInputs;
|
||||
int NumSliders;
|
||||
|
||||
@@ -33,7 +33,7 @@ void SDL_SYS_GetPreferredLocales(char *buf, size_t buflen)
|
||||
{
|
||||
/* The 3DS only supports these 12 languages, only one can be active at a time */
|
||||
static const char AVAILABLE_LOCALES[][6] = { "ja_JP", "en_US", "fr_FR", "de_DE",
|
||||
"it_IT", "es_ES", "zn_CN", "ko_KR",
|
||||
"it_IT", "es_ES", "zh_CN", "ko_KR",
|
||||
"nl_NL", "pt_PT", "ru_RU", "zh_TW" };
|
||||
u8 current_locale = GetLocaleIndex();
|
||||
if (current_locale != BAD_LOCALE) {
|
||||
@@ -45,14 +45,13 @@ SDL_FORCE_INLINE u8
|
||||
GetLocaleIndex(void)
|
||||
{
|
||||
u8 current_locale;
|
||||
Result result;
|
||||
if (R_FAILED(cfguInit())) {
|
||||
return BAD_LOCALE;
|
||||
}
|
||||
if (R_FAILED(CFGU_GetSystemLanguage(¤t_locale))) {
|
||||
return BAD_LOCALE;
|
||||
}
|
||||
result = CFGU_GetSystemLanguage(¤t_locale);
|
||||
cfguExit();
|
||||
return current_locale;
|
||||
return R_SUCCEEDED(result) ? current_locale : BAD_LOCALE;
|
||||
}
|
||||
|
||||
/* vi: set sts=4 ts=4 sw=4 expandtab: */
|
||||
|
||||
@@ -9,8 +9,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 2,30,1,0
|
||||
PRODUCTVERSION 2,30,1,0
|
||||
FILEVERSION 2,30,4,0
|
||||
PRODUCTVERSION 2,30,4,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
FILEFLAGS 0x0L
|
||||
FILEOS 0x40004L
|
||||
@@ -23,12 +23,12 @@ BEGIN
|
||||
BEGIN
|
||||
VALUE "CompanyName", "\0"
|
||||
VALUE "FileDescription", "SDL\0"
|
||||
VALUE "FileVersion", "2, 30, 1, 0\0"
|
||||
VALUE "FileVersion", "2, 30, 4, 0\0"
|
||||
VALUE "InternalName", "SDL\0"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2024 Sam Lantinga\0"
|
||||
VALUE "OriginalFilename", "SDL2.dll\0"
|
||||
VALUE "ProductName", "Simple DirectMedia Layer\0"
|
||||
VALUE "ProductVersion", "2, 30, 1, 0\0"
|
||||
VALUE "ProductVersion", "2, 30, 4, 0\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
#include <dxgi1_6.h>
|
||||
#include <dxgidebug.h>
|
||||
#include <d3d12sdklayers.h>
|
||||
#include <sdkddkver.h>
|
||||
#endif
|
||||
|
||||
#include "SDL_shaders_d3d12.h"
|
||||
@@ -58,6 +59,11 @@
|
||||
#define SDL_COMPOSE_ERROR(str) SDL_STRINGIFY_ARG(__FUNCTION__) ", " str
|
||||
#endif
|
||||
|
||||
/* DXGI_PRESENT flags are removed on Xbox */
|
||||
#if defined(__XBOXONE__) || defined(__XBOXSERIES__)
|
||||
#define DXGI_PRESENT_ALLOW_TEARING 0
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define SAFE_RELEASE(X) \
|
||||
if (X) { \
|
||||
@@ -78,6 +84,54 @@
|
||||
#define D3D_GUID(X) &(X)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Older MS Windows SDK headers declare some d3d12 functions with the wrong function prototype.
|
||||
* - ID3D12Heap::GetDesc
|
||||
* - ID3D12Resource::GetDesc
|
||||
* - ID3D12DescriptorHeap::GetDesc
|
||||
* (and 9 more)+
|
||||
* This is fixed in SDKs since WDK_NTDDI_VERSION >= NTDDI_WIN10_FE (0x0A00000A)
|
||||
*/
|
||||
|
||||
#if !(defined(__MINGW32__) || defined(__XBOXONE__) || defined(__XBOXSERIES__)) \
|
||||
&& (WDK_NTDDI_VERSION < 0x0A00000A)
|
||||
|
||||
#define D3D_CALL_RET_ID3D12DescriptorHeap_GetCPUDescriptorHandleForHeapStart(THIS, ...) do { \
|
||||
void (STDMETHODCALLTYPE * func)(ID3D12DescriptorHeap * This, D3D12_CPU_DESCRIPTOR_HANDLE * Handle) = \
|
||||
(void*)(THIS)->lpVtbl->GetCPUDescriptorHandleForHeapStart; \
|
||||
func((THIS), ##__VA_ARGS__); \
|
||||
} while (0)
|
||||
|
||||
#define D3D_CALL_RET_ID3D12DescriptorHeap_GetGPUDescriptorHandleForHeapStart(THIS, ...) do { \
|
||||
void (STDMETHODCALLTYPE * func)(ID3D12DescriptorHeap * This, D3D12_GPU_DESCRIPTOR_HANDLE * Handle) = \
|
||||
(void*)(THIS)->lpVtbl->GetGPUDescriptorHandleForHeapStart; \
|
||||
func((THIS), ##__VA_ARGS__); \
|
||||
} while (0)
|
||||
|
||||
#define D3D_CALL_RET_ID3D12Resource_GetDesc(THIS, ...) do { \
|
||||
void (STDMETHODCALLTYPE * func)(ID3D12Resource * This, D3D12_RESOURCE_DESC * Desc) = \
|
||||
(void*)(THIS)->lpVtbl->GetDesc; \
|
||||
func((THIS), ##__VA_ARGS__); \
|
||||
} while (0)
|
||||
|
||||
#else
|
||||
|
||||
/*
|
||||
* MinGW has correct function prototypes in the vtables, but defines wrong functions
|
||||
* Xbox just needs these macros defined as used below (because CINTERFACE doesn't exist)
|
||||
*/
|
||||
|
||||
#define D3D_CALL_RET_ID3D12DescriptorHeap_GetCPUDescriptorHandleForHeapStart(THIS, ...) \
|
||||
D3D_CALL_RET(THIS, GetCPUDescriptorHandleForHeapStart, ##__VA_ARGS__);
|
||||
|
||||
#define D3D_CALL_RET_ID3D12DescriptorHeap_GetGPUDescriptorHandleForHeapStart(THIS, ...) \
|
||||
D3D_CALL_RET(THIS, GetGPUDescriptorHandleForHeapStart, ##__VA_ARGS__);
|
||||
|
||||
#define D3D_CALL_RET_ID3D12Resource_GetDesc(THIS, ...) \
|
||||
D3D_CALL_RET(THIS, GetDesc, ##__VA_ARGS__);
|
||||
|
||||
#endif
|
||||
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -393,10 +447,10 @@ static D3D12_GPU_DESCRIPTOR_HANDLE D3D12_CPUtoGPUHandle(ID3D12DescriptorHeap *he
|
||||
SIZE_T offset;
|
||||
|
||||
/* Calculate the correct offset into the heap */
|
||||
D3D_CALL_RET(heap, GetCPUDescriptorHandleForHeapStart, &CPUHeapStart);
|
||||
D3D_CALL_RET_ID3D12DescriptorHeap_GetCPUDescriptorHandleForHeapStart(heap, &CPUHeapStart);
|
||||
offset = CPUHandle.ptr - CPUHeapStart.ptr;
|
||||
|
||||
D3D_CALL_RET(heap, GetGPUDescriptorHandleForHeapStart, &GPUHandle);
|
||||
D3D_CALL_RET_ID3D12DescriptorHeap_GetGPUDescriptorHandleForHeapStart(heap, &GPUHandle);
|
||||
GPUHandle.ptr += offset;
|
||||
|
||||
return GPUHandle;
|
||||
@@ -427,7 +481,7 @@ static D3D12_CPU_DESCRIPTOR_HANDLE D3D12_GetCurrentRenderTargetView(SDL_Renderer
|
||||
}
|
||||
|
||||
SDL_zero(rtvDescriptor);
|
||||
D3D_CALL_RET(data->rtvDescriptorHeap, GetCPUDescriptorHandleForHeapStart, &rtvDescriptor);
|
||||
D3D_CALL_RET_ID3D12DescriptorHeap_GetCPUDescriptorHandleForHeapStart(data->rtvDescriptorHeap, &rtvDescriptor);
|
||||
rtvDescriptor.ptr += data->currentBackBufferIndex * data->rtvDescriptorSize;
|
||||
return rtvDescriptor;
|
||||
}
|
||||
@@ -1047,7 +1101,7 @@ static HRESULT D3D12_CreateDeviceResources(SDL_Renderer *renderer)
|
||||
samplerDesc.ComparisonFunc = D3D12_COMPARISON_FUNC_ALWAYS;
|
||||
samplerDesc.MinLOD = 0.0f;
|
||||
samplerDesc.MaxLOD = D3D12_FLOAT32_MAX;
|
||||
D3D_CALL_RET(data->samplerDescriptorHeap, GetCPUDescriptorHandleForHeapStart, &data->nearestPixelSampler);
|
||||
D3D_CALL_RET_ID3D12DescriptorHeap_GetCPUDescriptorHandleForHeapStart(data->samplerDescriptorHeap, &data->nearestPixelSampler);
|
||||
D3D_CALL(data->d3dDevice, CreateSampler, &samplerDesc, data->nearestPixelSampler);
|
||||
|
||||
samplerDesc.Filter = D3D12_FILTER_MIN_MAG_MIP_LINEAR;
|
||||
@@ -1336,7 +1390,7 @@ static HRESULT D3D12_CreateWindowSizeDependentResources(SDL_Renderer *renderer)
|
||||
rtvDesc.ViewDimension = D3D12_RTV_DIMENSION_TEXTURE2D;
|
||||
|
||||
SDL_zero(rtvDescriptor);
|
||||
D3D_CALL_RET(data->rtvDescriptorHeap, GetCPUDescriptorHandleForHeapStart, &rtvDescriptor);
|
||||
D3D_CALL_RET_ID3D12DescriptorHeap_GetCPUDescriptorHandleForHeapStart(data->rtvDescriptorHeap, &rtvDescriptor);
|
||||
rtvDescriptor.ptr += i * data->rtvDescriptorSize;
|
||||
D3D_CALL(data->d3dDevice, CreateRenderTargetView, data->renderTargets[i], &rtvDesc, rtvDescriptor);
|
||||
}
|
||||
@@ -1550,7 +1604,7 @@ static int D3D12_CreateTexture(SDL_Renderer *renderer, SDL_Texture *texture)
|
||||
resourceViewDesc.Texture2D.MipLevels = textureDesc.MipLevels;
|
||||
|
||||
textureData->mainSRVIndex = D3D12_GetAvailableSRVIndex(renderer);
|
||||
D3D_CALL_RET(rendererData->srvDescriptorHeap, GetCPUDescriptorHandleForHeapStart, &textureData->mainTextureResourceView);
|
||||
D3D_CALL_RET_ID3D12DescriptorHeap_GetCPUDescriptorHandleForHeapStart(rendererData->srvDescriptorHeap, &textureData->mainTextureResourceView);
|
||||
textureData->mainTextureResourceView.ptr += textureData->mainSRVIndex * rendererData->srvDescriptorSize;
|
||||
|
||||
D3D_CALL(rendererData->d3dDevice, CreateShaderResourceView,
|
||||
@@ -1559,7 +1613,7 @@ static int D3D12_CreateTexture(SDL_Renderer *renderer, SDL_Texture *texture)
|
||||
textureData->mainTextureResourceView);
|
||||
#if SDL_HAVE_YUV
|
||||
if (textureData->yuv) {
|
||||
D3D_CALL_RET(rendererData->srvDescriptorHeap, GetCPUDescriptorHandleForHeapStart, &textureData->mainTextureResourceViewU);
|
||||
D3D_CALL_RET_ID3D12DescriptorHeap_GetCPUDescriptorHandleForHeapStart(rendererData->srvDescriptorHeap, &textureData->mainTextureResourceViewU);
|
||||
textureData->mainSRVIndexU = D3D12_GetAvailableSRVIndex(renderer);
|
||||
textureData->mainTextureResourceViewU.ptr += textureData->mainSRVIndexU * rendererData->srvDescriptorSize;
|
||||
D3D_CALL(rendererData->d3dDevice, CreateShaderResourceView,
|
||||
@@ -1567,7 +1621,7 @@ static int D3D12_CreateTexture(SDL_Renderer *renderer, SDL_Texture *texture)
|
||||
&resourceViewDesc,
|
||||
textureData->mainTextureResourceViewU);
|
||||
|
||||
D3D_CALL_RET(rendererData->srvDescriptorHeap, GetCPUDescriptorHandleForHeapStart, &textureData->mainTextureResourceViewV);
|
||||
D3D_CALL_RET_ID3D12DescriptorHeap_GetCPUDescriptorHandleForHeapStart(rendererData->srvDescriptorHeap, &textureData->mainTextureResourceViewV);
|
||||
textureData->mainSRVIndexV = D3D12_GetAvailableSRVIndex(renderer);
|
||||
textureData->mainTextureResourceViewV.ptr += textureData->mainSRVIndexV * rendererData->srvDescriptorSize;
|
||||
D3D_CALL(rendererData->d3dDevice, CreateShaderResourceView,
|
||||
@@ -1581,7 +1635,7 @@ static int D3D12_CreateTexture(SDL_Renderer *renderer, SDL_Texture *texture)
|
||||
|
||||
nvResourceViewDesc.Format = DXGI_FORMAT_R8G8_UNORM;
|
||||
|
||||
D3D_CALL_RET(rendererData->srvDescriptorHeap, GetCPUDescriptorHandleForHeapStart, &textureData->mainTextureResourceViewNV);
|
||||
D3D_CALL_RET_ID3D12DescriptorHeap_GetCPUDescriptorHandleForHeapStart(rendererData->srvDescriptorHeap, &textureData->mainTextureResourceViewNV);
|
||||
textureData->mainSRVIndexNV = D3D12_GetAvailableSRVIndex(renderer);
|
||||
textureData->mainTextureResourceViewNV.ptr += textureData->mainSRVIndexNV * rendererData->srvDescriptorSize;
|
||||
D3D_CALL(rendererData->d3dDevice, CreateShaderResourceView,
|
||||
@@ -1598,7 +1652,7 @@ static int D3D12_CreateTexture(SDL_Renderer *renderer, SDL_Texture *texture)
|
||||
renderTargetViewDesc.ViewDimension = D3D12_RTV_DIMENSION_TEXTURE2D;
|
||||
renderTargetViewDesc.Texture2D.MipSlice = 0;
|
||||
|
||||
D3D_CALL_RET(rendererData->textureRTVDescriptorHeap, GetCPUDescriptorHandleForHeapStart, &textureData->mainTextureRenderTargetView);
|
||||
D3D_CALL_RET_ID3D12DescriptorHeap_GetCPUDescriptorHandleForHeapStart(rendererData->textureRTVDescriptorHeap, &textureData->mainTextureRenderTargetView);
|
||||
textureData->mainTextureRenderTargetView.ptr += textureData->mainSRVIndex * rendererData->rtvDescriptorSize;
|
||||
|
||||
D3D_CALL(rendererData->d3dDevice, CreateRenderTargetView,
|
||||
@@ -1663,7 +1717,7 @@ static int D3D12_UpdateTextureInternal(D3D12_RenderData *rendererData, ID3D12Res
|
||||
|
||||
/* Create an upload buffer, which will be used to write to the main texture. */
|
||||
SDL_zero(textureDesc);
|
||||
D3D_CALL_RET(texture, GetDesc, &textureDesc);
|
||||
D3D_CALL_RET_ID3D12Resource_GetDesc(texture, &textureDesc);
|
||||
textureDesc.Width = w;
|
||||
textureDesc.Height = h;
|
||||
|
||||
@@ -1919,7 +1973,7 @@ static int D3D12_LockTexture(SDL_Renderer *renderer, SDL_Texture *texture,
|
||||
|
||||
/* Create an upload buffer, which will be used to write to the main texture. */
|
||||
SDL_zero(textureDesc);
|
||||
D3D_CALL_RET(textureData->mainTexture, GetDesc, &textureDesc);
|
||||
D3D_CALL_RET_ID3D12Resource_GetDesc(textureData->mainTexture, &textureDesc);
|
||||
textureDesc.Width = rect->w;
|
||||
textureDesc.Height = rect->h;
|
||||
|
||||
@@ -2028,7 +2082,7 @@ static void D3D12_UnlockTexture(SDL_Renderer *renderer, SDL_Texture *texture)
|
||||
D3D_CALL(textureData->stagingBuffer, Unmap, 0, NULL);
|
||||
|
||||
SDL_zero(textureDesc);
|
||||
D3D_CALL_RET(textureData->mainTexture, GetDesc, &textureDesc);
|
||||
D3D_CALL_RET_ID3D12Resource_GetDesc(textureData->mainTexture, &textureDesc);
|
||||
textureDesc.Width = textureData->lockedRect.w;
|
||||
textureDesc.Height = textureData->lockedRect.h;
|
||||
|
||||
@@ -2739,7 +2793,7 @@ static int D3D12_RenderReadPixels(SDL_Renderer *renderer, const SDL_Rect *rect,
|
||||
|
||||
/* Create a staging texture to copy the screen's data to: */
|
||||
SDL_zero(textureDesc);
|
||||
D3D_CALL_RET(backBuffer, GetDesc, &textureDesc);
|
||||
D3D_CALL_RET_ID3D12Resource_GetDesc(backBuffer, &textureDesc);
|
||||
textureDesc.Width = rect->w;
|
||||
textureDesc.Height = rect->h;
|
||||
|
||||
|
||||
@@ -822,6 +822,7 @@ char *SDL_iconv_string(const char *tocode, const char *fromcode, const char *inb
|
||||
switch (retCode) {
|
||||
case SDL_ICONV_E2BIG:
|
||||
{
|
||||
const ptrdiff_t diff = (ptrdiff_t) (outbuf - string);
|
||||
char *oldstring = string;
|
||||
stringsize *= 2;
|
||||
string = (char *)SDL_realloc(string, stringsize + sizeof(Uint32));
|
||||
@@ -830,8 +831,8 @@ char *SDL_iconv_string(const char *tocode, const char *fromcode, const char *inb
|
||||
SDL_iconv_close(cd);
|
||||
return NULL;
|
||||
}
|
||||
outbuf = string + (outbuf - oldstring);
|
||||
outbytesleft = stringsize - (outbuf - string);
|
||||
outbuf = string + diff;
|
||||
outbytesleft = stringsize - diff;
|
||||
SDL_memset(outbuf, 0, sizeof(Uint32));
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
#if defined(HAVE_QSORT)
|
||||
void SDL_qsort(void *base, size_t nmemb, size_t size, int (*compare) (const void *, const void *))
|
||||
void SDL_qsort(void *base, size_t nmemb, size_t size, int (SDLCALL *compare) (const void *, const void *))
|
||||
{
|
||||
if (!base) {
|
||||
return;
|
||||
@@ -368,7 +368,7 @@ typedef struct { char * first; char * last; } stack_entry;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
static char * pivot_big(char *first, char *mid, char *last, size_t size,
|
||||
int compare(const void *, const void *)) {
|
||||
int (SDLCALL * compare)(const void *, const void *)) {
|
||||
size_t d=(((last-first)/size)>>3)*size;
|
||||
#ifdef DEBUG_QSORT
|
||||
fprintf(stderr, "pivot_big: first=%p last=%p size=%lu n=%lu\n", first, (unsigned long)last, size, (unsigned long)((last-first+1)/size));
|
||||
@@ -409,7 +409,7 @@ fprintf(stderr,"-> %d %d %d @ %p %p %p\n",*(int*)m1,*(int*)m2,*(int*)m3, m1,m2,m
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
static void qsort_nonaligned(void *base, size_t nmemb, size_t size,
|
||||
int (*compare)(const void *, const void *)) {
|
||||
int (SDLCALL * compare)(const void *, const void *)) {
|
||||
|
||||
stack_entry stack[STACK_SIZE];
|
||||
int stacktop=0;
|
||||
@@ -440,7 +440,7 @@ static void qsort_nonaligned(void *base, size_t nmemb, size_t size,
|
||||
}
|
||||
|
||||
static void qsort_aligned(void *base, size_t nmemb, size_t size,
|
||||
int (*compare)(const void *, const void *)) {
|
||||
int (SDLCALL * compare)(const void *, const void *)) {
|
||||
|
||||
stack_entry stack[STACK_SIZE];
|
||||
int stacktop=0;
|
||||
@@ -471,7 +471,7 @@ static void qsort_aligned(void *base, size_t nmemb, size_t size,
|
||||
}
|
||||
|
||||
static void qsort_words(void *base, size_t nmemb,
|
||||
int (*compare)(const void *, const void *)) {
|
||||
int (SDLCALL * compare)(const void *, const void *)) {
|
||||
|
||||
stack_entry stack[STACK_SIZE];
|
||||
int stacktop=0;
|
||||
@@ -523,7 +523,7 @@ fprintf(stderr, "after partitioning first=#%lu last=#%lu\n", (first-(char*)base)
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
extern void qsortG(void *base, size_t nmemb, size_t size,
|
||||
int (*compare)(const void *, const void *)) {
|
||||
int (SDLCALL * compare)(const void *, const void *)) {
|
||||
|
||||
if (nmemb<=1) return;
|
||||
if (((size_t)base|size)&(WORD_BYTES-1))
|
||||
@@ -536,7 +536,7 @@ extern void qsortG(void *base, size_t nmemb, size_t size,
|
||||
|
||||
#endif /* HAVE_QSORT */
|
||||
|
||||
void *SDL_bsearch(const void *key, const void *base, size_t nmemb, size_t size, int (*compare)(const void *, const void *))
|
||||
void *SDL_bsearch(const void *key, const void *base, size_t nmemb, size_t size, int (SDLCALL * compare)(const void *, const void *))
|
||||
{
|
||||
#if defined(HAVE_BSEARCH)
|
||||
return bsearch(key, base, nmemb, size, compare);
|
||||
@@ -569,4 +569,3 @@ void *SDL_bsearch(const void *key, const void *base, size_t nmemb, size_t size,
|
||||
}
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
||||
|
||||
@@ -460,6 +460,17 @@ static void Cocoa_UpdateClipCursor(SDL_Window * window)
|
||||
}
|
||||
}
|
||||
|
||||
static NSCursor *Cocoa_GetDesiredCursor(void)
|
||||
{
|
||||
SDL_Mouse *mouse = SDL_GetMouse();
|
||||
|
||||
if (mouse->cursor_shown && mouse->cur_cursor && !mouse->relative_mode) {
|
||||
return (__bridge NSCursor *)mouse->cur_cursor->driverdata;
|
||||
}
|
||||
|
||||
return [NSCursor invisibleCursor];
|
||||
}
|
||||
|
||||
|
||||
@implementation Cocoa_WindowListener
|
||||
|
||||
@@ -1323,6 +1334,7 @@ static int Cocoa_SendMouseButtonClicks(SDL_Mouse * mouse, NSEvent *theEvent, SDL
|
||||
NSPoint point;
|
||||
int x, y;
|
||||
SDL_Window *window;
|
||||
NSView *contentView;
|
||||
|
||||
if (!mouse) {
|
||||
return;
|
||||
@@ -1330,6 +1342,17 @@ static int Cocoa_SendMouseButtonClicks(SDL_Mouse * mouse, NSEvent *theEvent, SDL
|
||||
|
||||
mouseID = mouse->mouseID;
|
||||
window = _data.window;
|
||||
contentView = _data.sdlContentView;
|
||||
point = [theEvent locationInWindow];
|
||||
|
||||
if ([contentView mouse:[contentView convertPoint:point fromView:nil] inRect:[contentView bounds]] &&
|
||||
[NSCursor currentCursor] != Cocoa_GetDesiredCursor()) {
|
||||
// The wrong cursor is on screen, fix it. This fixes an macOS bug that is only known to
|
||||
// occur in fullscreen windows on the built-in displays of newer MacBooks with camera
|
||||
// notches. When the mouse is moved near the top of such a window (within about 44 units)
|
||||
// and then moved back down, the cursor rects aren't respected.
|
||||
[_data.nswindow invalidateCursorRectsForView:contentView];
|
||||
}
|
||||
|
||||
if ([self processHitTest:theEvent]) {
|
||||
SDL_SendWindowEvent(window, SDL_WINDOWEVENT_HIT_TEST, 0, 0);
|
||||
@@ -1340,7 +1363,6 @@ static int Cocoa_SendMouseButtonClicks(SDL_Mouse * mouse, NSEvent *theEvent, SDL
|
||||
return;
|
||||
}
|
||||
|
||||
point = [theEvent locationInWindow];
|
||||
x = (int)point.x;
|
||||
y = (int)(window->h - point.y);
|
||||
|
||||
@@ -1590,17 +1612,9 @@ static int Cocoa_SendMouseButtonClicks(SDL_Mouse * mouse, NSEvent *theEvent, SDL
|
||||
|
||||
- (void)resetCursorRects
|
||||
{
|
||||
SDL_Mouse *mouse;
|
||||
[super resetCursorRects];
|
||||
mouse = SDL_GetMouse();
|
||||
|
||||
if (mouse->cursor_shown && mouse->cur_cursor && !mouse->relative_mode) {
|
||||
[self addCursorRect:[self bounds]
|
||||
cursor:(__bridge NSCursor *)mouse->cur_cursor->driverdata];
|
||||
} else {
|
||||
[self addCursorRect:[self bounds]
|
||||
cursor:[NSCursor invisibleCursor]];
|
||||
}
|
||||
[self addCursorRect:[self bounds]
|
||||
cursor:Cocoa_GetDesiredCursor()];
|
||||
}
|
||||
|
||||
- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent
|
||||
|
||||
@@ -77,6 +77,7 @@ static int get_driindex(void)
|
||||
int devindex = -1;
|
||||
DIR *folder;
|
||||
const char *hint;
|
||||
struct dirent *res;
|
||||
|
||||
hint = SDL_GetHint(SDL_HINT_KMSDRM_DEVICE_INDEX);
|
||||
if (hint && *hint) {
|
||||
@@ -96,7 +97,7 @@ static int get_driindex(void)
|
||||
|
||||
SDL_strlcpy(device + kmsdrm_dri_pathsize, kmsdrm_dri_devname,
|
||||
sizeof(device) - kmsdrm_dri_devnamesize);
|
||||
for (struct dirent *res; (res = readdir(folder));) {
|
||||
while((res = readdir(folder)) != NULL) {
|
||||
if (SDL_memcmp(res->d_name, kmsdrm_dri_devname,
|
||||
kmsdrm_dri_devnamesize) == 0) {
|
||||
SDL_strlcpy(device + kmsdrm_dri_pathsize + kmsdrm_dri_devnamesize,
|
||||
|
||||
@@ -1166,7 +1166,8 @@ static void keyboard_handle_enter(void *data, struct wl_keyboard *keyboard,
|
||||
const SDL_Scancode scancode = Wayland_get_scancode_from_key(input, *key + 8);
|
||||
|
||||
if (scancode != SDL_SCANCODE_UNKNOWN) {
|
||||
for (uint32_t i = 0; i < SDL_arraysize(mod_scancodes); ++i) {
|
||||
uint32_t i;
|
||||
for (i = 0; i < SDL_arraysize(mod_scancodes); ++i) {
|
||||
if (mod_scancodes[i] == scancode) {
|
||||
SDL_SendKeyboardKey(SDL_PRESSED, scancode);
|
||||
break;
|
||||
@@ -1814,7 +1815,8 @@ static void data_device_handle_drop(void *data, struct wl_data_device *wl_data_d
|
||||
char **paths = SDL_DBus_DocumentsPortalRetrieveFiles(buffer, &path_count);
|
||||
/* If dropped files contain a directory the list is empty */
|
||||
if (paths && path_count > 0) {
|
||||
for (int i = 0; i < path_count; i++) {
|
||||
int i;
|
||||
for (i = 0; i < path_count; i++) {
|
||||
SDL_SendDropFile(data_device->dnd_window, paths[i]);
|
||||
}
|
||||
dbus->free_string_array(paths);
|
||||
|
||||
@@ -23,11 +23,12 @@
|
||||
|
||||
#ifdef SDL_VIDEO_DRIVER_WAYLAND
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/mman.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <limits.h>
|
||||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "../SDL_sysvideo.h"
|
||||
|
||||
@@ -58,6 +59,7 @@ typedef struct
|
||||
*/
|
||||
SDL_SystemCursor system_cursor;
|
||||
void *shm_data;
|
||||
size_t shm_data_size;
|
||||
} Wayland_CursorData;
|
||||
|
||||
#ifdef SDL_USE_LIBDBUS
|
||||
@@ -289,27 +291,72 @@ static SDL_bool wayland_get_system_cursor(SDL_VideoData *vdata, Wayland_CursorDa
|
||||
return SDL_TRUE;
|
||||
}
|
||||
|
||||
static int wayland_create_tmp_file(off_t size)
|
||||
static int set_tmp_file_size(int fd, off_t size)
|
||||
{
|
||||
static const char template[] = "/sdl-shared-XXXXXX";
|
||||
char *xdg_path;
|
||||
char tmp_path[PATH_MAX];
|
||||
int fd;
|
||||
#ifdef HAVE_POSIX_FALLOCATE
|
||||
sigset_t set, old_set;
|
||||
int ret;
|
||||
|
||||
xdg_path = SDL_getenv("XDG_RUNTIME_DIR");
|
||||
if (!xdg_path) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
SDL_strlcpy(tmp_path, xdg_path, PATH_MAX);
|
||||
SDL_strlcat(tmp_path, template, PATH_MAX);
|
||||
|
||||
fd = mkostemp(tmp_path, O_CLOEXEC);
|
||||
if (fd < 0) {
|
||||
/* SIGALRM can potentially block a large posix_fallocate() operation
|
||||
* from succeeding, so block it.
|
||||
*/
|
||||
sigemptyset(&set);
|
||||
sigaddset(&set, SIGALRM);
|
||||
sigprocmask(SIG_BLOCK, &set, &old_set);
|
||||
|
||||
do {
|
||||
ret = posix_fallocate(fd, 0, size);
|
||||
} while (ret == EINTR);
|
||||
|
||||
sigprocmask(SIG_SETMASK, &old_set, NULL);
|
||||
|
||||
if (ret == 0) {
|
||||
return 0;
|
||||
}
|
||||
else if (ret != EINVAL && errno != EOPNOTSUPP) {
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (ftruncate(fd, size) < 0) {
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int wayland_create_tmp_file(off_t size)
|
||||
{
|
||||
int fd;
|
||||
|
||||
#ifdef HAVE_MEMFD_CREATE
|
||||
fd = memfd_create("SDL", MFD_CLOEXEC | MFD_ALLOW_SEALING);
|
||||
if (fd >= 0) {
|
||||
fcntl(fd, F_ADD_SEALS, F_SEAL_SHRINK | F_SEAL_SEAL);
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
static const char template[] = "/sdl-shared-XXXXXX";
|
||||
char *xdg_path;
|
||||
char tmp_path[PATH_MAX];
|
||||
|
||||
xdg_path = SDL_getenv("XDG_RUNTIME_DIR");
|
||||
if (!xdg_path) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
SDL_strlcpy(tmp_path, xdg_path, PATH_MAX);
|
||||
SDL_strlcat(tmp_path, template, PATH_MAX);
|
||||
|
||||
fd = mkostemp(tmp_path, O_CLOEXEC);
|
||||
if (fd < 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Need to manually unlink the temp files, or they can persist after close and fill up the temp storage. */
|
||||
unlink(tmp_path);
|
||||
}
|
||||
|
||||
if (set_tmp_file_size(fd, size) < 0) {
|
||||
close(fd);
|
||||
return -1;
|
||||
}
|
||||
@@ -333,19 +380,18 @@ static int create_buffer_from_shm(Wayland_CursorData *d,
|
||||
SDL_VideoDevice *vd = SDL_GetVideoDevice();
|
||||
SDL_VideoData *data = (SDL_VideoData *)vd->driverdata;
|
||||
struct wl_shm_pool *shm_pool;
|
||||
|
||||
int stride = width * 4;
|
||||
int size = stride * height;
|
||||
|
||||
int shm_fd;
|
||||
|
||||
shm_fd = wayland_create_tmp_file(size);
|
||||
int stride = width * 4;
|
||||
d->shm_data_size = stride * height;
|
||||
|
||||
shm_fd = wayland_create_tmp_file(d->shm_data_size);
|
||||
if (shm_fd < 0) {
|
||||
return SDL_SetError("Creating mouse cursor buffer failed.");
|
||||
}
|
||||
|
||||
d->shm_data = mmap(NULL,
|
||||
size,
|
||||
d->shm_data_size,
|
||||
PROT_READ | PROT_WRITE,
|
||||
MAP_SHARED,
|
||||
shm_fd,
|
||||
@@ -358,7 +404,7 @@ static int create_buffer_from_shm(Wayland_CursorData *d,
|
||||
|
||||
SDL_assert(d->shm_data != NULL);
|
||||
|
||||
shm_pool = wl_shm_create_pool(data->shm, shm_fd, size);
|
||||
shm_pool = wl_shm_create_pool(data->shm, shm_fd, d->shm_data_size);
|
||||
d->buffer = wl_shm_pool_create_buffer(shm_pool,
|
||||
0,
|
||||
width,
|
||||
@@ -459,6 +505,7 @@ static void Wayland_FreeCursorData(Wayland_CursorData *d)
|
||||
if (d->buffer) {
|
||||
if (d->shm_data) {
|
||||
wl_buffer_destroy(d->buffer);
|
||||
munmap(d->shm_data, d->shm_data_size);
|
||||
}
|
||||
d->buffer = NULL;
|
||||
}
|
||||
@@ -482,7 +529,6 @@ static void Wayland_FreeCursor(SDL_Cursor *cursor)
|
||||
|
||||
Wayland_FreeCursorData((Wayland_CursorData *)cursor->driverdata);
|
||||
|
||||
/* Not sure what's meant to happen to shm_data */
|
||||
SDL_free(cursor->driverdata);
|
||||
SDL_free(cursor);
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ int Wayland_GLES_SwapWindow(_THIS, SDL_Window *window)
|
||||
struct wl_display *display = videodata->display;
|
||||
SDL_VideoDisplay *sdldisplay = SDL_GetDisplayForWindow(window);
|
||||
/* 1/3 speed (or 20hz), so we'll progress even if throttled to zero. */
|
||||
const Uint32 max_wait = SDL_GetTicks() + (sdldisplay->current_mode.refresh_rate ? (3000 / sdldisplay->current_mode.refresh_rate) : 50);
|
||||
const Uint32 max_wait = SDL_GetTicks() + (sdldisplay && sdldisplay->current_mode.refresh_rate ? (3000 / sdldisplay->current_mode.refresh_rate) : 50);
|
||||
while (SDL_AtomicGet(&data->swap_interval_ready) == 0) {
|
||||
Uint32 now;
|
||||
|
||||
|
||||
@@ -202,7 +202,7 @@ static void SetDrawSurfaceViewport(SDL_Window *window, int src_width, int src_he
|
||||
wind->draw_viewport = wp_viewporter_get_viewport(video->viewporter, wind->surface);
|
||||
}
|
||||
|
||||
wp_viewport_set_source(wind->draw_viewport, wl_fixed_from_int(0), wl_fixed_from_int(0), wl_fixed_from_int(src_width), wl_fixed_from_int(src_height));
|
||||
wp_viewport_set_source(wind->draw_viewport, wl_fixed_from_int(-1), wl_fixed_from_int(-1), wl_fixed_from_int(-1), wl_fixed_from_int(-1));
|
||||
wp_viewport_set_destination(wind->draw_viewport, dst_width, dst_height);
|
||||
}
|
||||
}
|
||||
@@ -1373,6 +1373,8 @@ void Wayland_ShowWindow(_THIS, SDL_Window *window)
|
||||
data->shell_surface.xdg.roleobj.toplevel = xdg_surface_get_toplevel(data->shell_surface.xdg.surface);
|
||||
xdg_toplevel_set_app_id(data->shell_surface.xdg.roleobj.toplevel, c->classname);
|
||||
xdg_toplevel_add_listener(data->shell_surface.xdg.roleobj.toplevel, &toplevel_listener_xdg, data);
|
||||
|
||||
SetMinMaxDimensions(window, SDL_FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -128,6 +128,10 @@ static SDL_Scancode VKeytoScancodeFallback(WPARAM vkey)
|
||||
return SDL_SCANCODE_RIGHT;
|
||||
case VK_DOWN:
|
||||
return SDL_SCANCODE_DOWN;
|
||||
case VK_CONTROL:
|
||||
return SDL_SCANCODE_LCTRL;
|
||||
case VK_V:
|
||||
return SDL_SCANCODE_V;
|
||||
|
||||
default:
|
||||
return SDL_SCANCODE_UNKNOWN;
|
||||
@@ -137,6 +141,11 @@ static SDL_Scancode VKeytoScancodeFallback(WPARAM vkey)
|
||||
static SDL_Scancode VKeytoScancode(WPARAM vkey)
|
||||
{
|
||||
switch (vkey) {
|
||||
case VK_BACK:
|
||||
return SDL_SCANCODE_BACKSPACE;
|
||||
case VK_CAPITAL:
|
||||
return SDL_SCANCODE_CAPSLOCK;
|
||||
|
||||
case VK_MODECHANGE:
|
||||
return SDL_SCANCODE_MODE;
|
||||
case VK_SELECT:
|
||||
@@ -629,6 +638,10 @@ WIN_KeyboardHookProc(int nCode, WPARAM wParam, LPARAM lParam)
|
||||
if (nCode < 0 || nCode != HC_ACTION) {
|
||||
return CallNextHookEx(NULL, nCode, wParam, lParam);
|
||||
}
|
||||
if (hookData->scanCode == 0x21d) {
|
||||
// Skip fake LCtrl when RAlt is pressed
|
||||
return 1;
|
||||
}
|
||||
|
||||
switch (hookData->vkCode) {
|
||||
case VK_LWIN:
|
||||
@@ -683,6 +696,39 @@ WIN_KeyboardHookProc(int nCode, WPARAM wParam, LPARAM lParam)
|
||||
|
||||
#endif /*!defined(__XBOXONE__) && !defined(__XBOXSERIES__)*/
|
||||
|
||||
|
||||
// Return 1 if spruious LCtrl is pressed
|
||||
// LCtrl is sent when RAltGR is pressed
|
||||
int skip_bad_lcrtl(WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
MSG next_msg;
|
||||
DWORD msg_time;
|
||||
if (wParam != VK_CONTROL) {
|
||||
return 0;
|
||||
}
|
||||
// Is this an extended key (i.e. right key)?
|
||||
if (lParam & 0x01000000)
|
||||
return 0;
|
||||
|
||||
// Here is a trick: "Alt Gr" sends LCTRL, then RALT. We only
|
||||
// want the RALT message, so we try to see if the next message
|
||||
// is a RALT message. In that case, this is a false LCTRL!
|
||||
msg_time = GetMessageTime();
|
||||
if (PeekMessage(&next_msg, NULL, 0, 0, PM_NOREMOVE)) {
|
||||
if (next_msg.message == WM_KEYDOWN ||
|
||||
next_msg.message == WM_SYSKEYDOWN) {
|
||||
if (next_msg.wParam == VK_MENU &&
|
||||
(next_msg.lParam & 0x01000000) &&
|
||||
next_msg.time == msg_time) {
|
||||
// Next message is a RALT down message, which
|
||||
// means that this is NOT a proper LCTRL message!
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
LRESULT CALLBACK
|
||||
WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
@@ -1000,6 +1046,11 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
SDL_Scancode code = WindowsScanCodeToSDLScanCode(lParam, wParam);
|
||||
const Uint8 *keyboardState = SDL_GetKeyboardState(NULL);
|
||||
|
||||
if (skip_bad_lcrtl(wParam, lParam)) {
|
||||
returnCode = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Detect relevant keyboard shortcuts */
|
||||
if (keyboardState[SDL_SCANCODE_LALT] == SDL_PRESSED || keyboardState[SDL_SCANCODE_RALT] == SDL_PRESSED) {
|
||||
/* ALT+F4: Close window */
|
||||
@@ -1022,6 +1073,11 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
SDL_Scancode code = WindowsScanCodeToSDLScanCode(lParam, wParam);
|
||||
const Uint8 *keyboardState = SDL_GetKeyboardState(NULL);
|
||||
|
||||
if (skip_bad_lcrtl(wParam, lParam)) {
|
||||
returnCode = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
if (code != SDL_SCANCODE_UNKNOWN) {
|
||||
if (code == SDL_SCANCODE_PRINTSCREEN &&
|
||||
keyboardState[code] == SDL_RELEASED) {
|
||||
@@ -1803,6 +1859,7 @@ void SDL_SetWindowsMessageHook(SDL_WindowsMessageHook callback, void *userdata)
|
||||
int WIN_WaitEventTimeout(_THIS, int timeout)
|
||||
{
|
||||
if (g_WindowsEnableMessageLoop) {
|
||||
#if !defined(__XBOXONE__) && !defined(__XBOXSERIES__)
|
||||
DWORD dwMilliseconds, ret;
|
||||
dwMilliseconds = timeout < 0 ? INFINITE : (DWORD)timeout;
|
||||
ret = MsgWaitForMultipleObjects(0, NULL, FALSE, dwMilliseconds, QS_ALLINPUT);
|
||||
@@ -1811,6 +1868,35 @@ int WIN_WaitEventTimeout(_THIS, int timeout)
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
/* MsgWaitForMultipleObjects is desktop-only. */
|
||||
MSG msg;
|
||||
BOOL message_result;
|
||||
UINT_PTR timer_id = 0;
|
||||
if (timeout > 0) {
|
||||
timer_id = SetTimer(NULL, 0, timeout, NULL);
|
||||
message_result = GetMessage(&msg, 0, 0, 0);
|
||||
KillTimer(NULL, timer_id);
|
||||
} else if (timeout == 0) {
|
||||
message_result = PeekMessage(&msg, NULL, 0, 0, PM_REMOVE);
|
||||
} else {
|
||||
message_result = GetMessage(&msg, 0, 0, 0);
|
||||
}
|
||||
if (message_result) {
|
||||
if (msg.message == WM_TIMER && !msg.hwnd && msg.wParam == timer_id) {
|
||||
return 0;
|
||||
}
|
||||
if (g_WindowsMessageHook) {
|
||||
g_WindowsMessageHook(g_WindowsMessageHookData, msg.hwnd, msg.message, msg.wParam, msg.lParam);
|
||||
}
|
||||
/* Always translate the message in case it's a non-SDL window (e.g. with Qt integration) */
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
#endif /*!defined(__XBOXONE__) && !defined(__XBOXSERIES__)*/
|
||||
} else {
|
||||
/* Fail the wait so the caller falls back to polling */
|
||||
return -1;
|
||||
@@ -1927,13 +2013,26 @@ static void WIN_CleanRegisterApp(WNDCLASSEX wcex)
|
||||
SDL_Appname = NULL;
|
||||
}
|
||||
|
||||
static BOOL CALLBACK WIN_ResourceNameCallback(HMODULE hModule, LPCTSTR lpType, LPTSTR lpName, LONG_PTR lParam)
|
||||
{
|
||||
WNDCLASSEX *wcex = (WNDCLASSEX *)lParam;
|
||||
|
||||
(void)lpType; /* We already know that the resource type is RT_GROUP_ICON. */
|
||||
|
||||
/* We leave hIconSm as NULL as it will allow Windows to automatically
|
||||
choose the appropriate small icon size to suit the current DPI. */
|
||||
wcex->hIcon = LoadIcon(hModule, lpName);
|
||||
|
||||
/* Do not bother enumerating any more. */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Register the class for this application */
|
||||
int SDL_RegisterApp(const char *name, Uint32 style, void *hInst)
|
||||
{
|
||||
WNDCLASSEX wcex;
|
||||
#if !defined(__XBOXONE__) && !defined(__XBOXSERIES__)
|
||||
const char *hint;
|
||||
TCHAR path[MAX_PATH];
|
||||
#endif
|
||||
|
||||
/* Only do this once... */
|
||||
@@ -1976,9 +2075,8 @@ int SDL_RegisterApp(const char *name, Uint32 style, void *hInst)
|
||||
wcex.hIconSm = LoadIcon(SDL_Instance, MAKEINTRESOURCE(SDL_atoi(hint)));
|
||||
}
|
||||
} else {
|
||||
/* Use the first icon as a default icon, like in the Explorer */
|
||||
GetModuleFileName(SDL_Instance, path, MAX_PATH);
|
||||
ExtractIconEx(path, 0, &wcex.hIcon, &wcex.hIconSm, 1);
|
||||
/* Use the first icon as a default icon, like in the Explorer. */
|
||||
EnumResourceNames(SDL_Instance, RT_GROUP_ICON, WIN_ResourceNameCallback, (LONG_PTR)&wcex);
|
||||
}
|
||||
#endif /*!defined(__XBOXONE__) && !defined(__XBOXSERIES__)*/
|
||||
|
||||
|
||||
@@ -317,8 +317,19 @@ static void WarpMouseInternal(Window xwindow, const int x, const int y)
|
||||
{
|
||||
SDL_VideoData *videodata = (SDL_VideoData *)SDL_GetVideoDevice()->driverdata;
|
||||
Display *display = videodata->display;
|
||||
#ifdef SDL_VIDEO_DRIVER_X11_XINPUT2
|
||||
SDL_Mouse *mouse = SDL_GetMouse();
|
||||
int deviceid = 0;
|
||||
SDL_bool warp_hack = SDL_FALSE;
|
||||
|
||||
/* XWayland will only warp the cursor if it is hidden, so this workaround is required. */
|
||||
if (videodata->is_xwayland && mouse && mouse->cursor_shown) {
|
||||
warp_hack = SDL_TRUE;
|
||||
}
|
||||
|
||||
if (warp_hack) {
|
||||
X11_ShowCursor(NULL);
|
||||
}
|
||||
#ifdef SDL_VIDEO_DRIVER_X11_XINPUT2
|
||||
if (X11_Xinput2IsInitialized()) {
|
||||
/* It seems XIWarpPointer() doesn't work correctly on multi-head setups:
|
||||
* https://developer.blender.org/rB165caafb99c6846e53d11c4e966990aaffc06cea
|
||||
@@ -335,6 +346,10 @@ static void WarpMouseInternal(Window xwindow, const int x, const int y)
|
||||
{
|
||||
X11_XWarpPointer(display, None, xwindow, 0, 0, 0, 0, x, y);
|
||||
}
|
||||
|
||||
if (warp_hack) {
|
||||
X11_ShowCursor(SDL_GetCursor());
|
||||
}
|
||||
X11_XSync(display, False);
|
||||
videodata->global_mouse_changed = SDL_TRUE;
|
||||
}
|
||||
|
||||
@@ -145,6 +145,12 @@ static int X11_SafetyNetErrHandler(Display *d, XErrorEvent *e)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static SDL_bool X11_IsXWayland(Display *d)
|
||||
{
|
||||
int opcode, event, error;
|
||||
return X11_XQueryExtension(d, "XWAYLAND", &opcode, &event, &error) == True;
|
||||
}
|
||||
|
||||
static SDL_VideoDevice *X11_CreateDevice(void)
|
||||
{
|
||||
SDL_VideoDevice *device;
|
||||
@@ -322,6 +328,8 @@ static SDL_VideoDevice *X11_CreateDevice(void)
|
||||
device->Vulkan_CreateSurface = X11_Vulkan_CreateSurface;
|
||||
#endif
|
||||
|
||||
data->is_xwayland = X11_IsXWayland(x11_display);
|
||||
|
||||
return device;
|
||||
}
|
||||
|
||||
|
||||
@@ -156,6 +156,8 @@ typedef struct SDL_VideoData
|
||||
SDL_bool is_steam_deck;
|
||||
SDL_bool steam_keyboard_open;
|
||||
|
||||
SDL_bool is_xwayland;
|
||||
|
||||
} SDL_VideoData;
|
||||
|
||||
extern SDL_bool X11_UseDirectColorVisuals(void);
|
||||
|
||||
@@ -108,14 +108,14 @@ testutils.lib: testutils.obj
|
||||
check: .SYMBOLIC $(TESTS)
|
||||
@set SDL_AUDIODRIVER=dummy
|
||||
@set SDL_VIDEODRIVER=dummy
|
||||
@copy "../SDL2.dll" .
|
||||
@copy ..\SDL2.dll .
|
||||
@for %exe in ($(TESTS)) do %exe
|
||||
|
||||
check-quick: .SYMBOLIC $(TESTS)
|
||||
@set SDL_TESTS_QUICK=1
|
||||
@set SDL_AUDIODRIVER=dummy
|
||||
@set SDL_VIDEODRIVER=dummy
|
||||
@copy "../SDL2.dll" .
|
||||
@copy ..\SDL2.dll .
|
||||
@for %exe in ($(TESTS)) do %exe
|
||||
|
||||
clean: .SYMBOLIC
|
||||
|
||||
Reference in New Issue
Block a user