mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-10-02 16:23:57 +08:00
Support ZUIKI MasconPro (#13770)
* Add ZUIKI controller Support version: MasconPro Enable rumble Disable sensors
This commit is contained in:
@@ -734,6 +734,7 @@
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xbox360w.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xboxone.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_lg4ff.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_zuiki.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_gamepad.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_joystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_steam_virtual_gamepad.c" />
|
||||
|
||||
@@ -86,6 +86,7 @@
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xbox360w.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xboxone.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_lg4ff.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_zuiki.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_gamepad.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_joystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_steam_virtual_gamepad.c" />
|
||||
|
||||
@@ -624,6 +624,7 @@
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xbox360w.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xboxone.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_lg4ff.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_zuiki.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_gamepad.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_joystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_steam_virtual_gamepad.c" />
|
||||
|
||||
@@ -1254,6 +1254,9 @@
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_lg4ff.c">
|
||||
<Filter>joystick\hidapi</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_zuiki.c">
|
||||
<Filter>joystick\hidapi</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapijoystick.c">
|
||||
<Filter>joystick\hidapi</Filter>
|
||||
</ClCompile>
|
||||
|
||||
@@ -66,6 +66,7 @@
|
||||
566E26D8246274CC00718109 /* SDL_locale.c in Sources */ = {isa = PBXBuildFile; fileRef = 566E26CD246274CB00718109 /* SDL_locale.c */; };
|
||||
566E26E1246274CC00718109 /* SDL_syslocale.h in Headers */ = {isa = PBXBuildFile; fileRef = 566E26CE246274CC00718109 /* SDL_syslocale.h */; };
|
||||
56A2373329F9C113003CCA5F /* SDL_sysrwlock.c in Sources */ = {isa = PBXBuildFile; fileRef = 56A2373229F9C113003CCA5F /* SDL_sysrwlock.c */; };
|
||||
63124A422E5C357500A53610 /* SDL_hidapi_zuiki.c in Sources */ = {isa = PBXBuildFile; fileRef = 63124A412E5C357500A53610 /* SDL_hidapi_zuiki.c */; };
|
||||
6312C66D2B42341400A7BB00 /* SDL_murmur3.c in Sources */ = {isa = PBXBuildFile; fileRef = 6312C66C2B42341400A7BB00 /* SDL_murmur3.c */; };
|
||||
63134A252A7902FD0021E9A6 /* SDL_pen_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 63134A232A7902FD0021E9A6 /* SDL_pen_c.h */; };
|
||||
63134A262A7902FD0021E9A6 /* SDL_pen.c in Sources */ = {isa = PBXBuildFile; fileRef = 63134A242A7902FD0021E9A6 /* SDL_pen.c */; };
|
||||
@@ -614,6 +615,7 @@
|
||||
566E26CD246274CB00718109 /* SDL_locale.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_locale.c; path = locale/SDL_locale.c; sourceTree = "<group>"; };
|
||||
566E26CE246274CC00718109 /* SDL_syslocale.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_syslocale.h; path = locale/SDL_syslocale.h; sourceTree = "<group>"; };
|
||||
56A2373229F9C113003CCA5F /* SDL_sysrwlock.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_sysrwlock.c; sourceTree = "<group>"; };
|
||||
63124A412E5C357500A53610 /* SDL_hidapi_zuiki.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_zuiki.c; sourceTree = "<group>"; };
|
||||
6312C66C2B42341400A7BB00 /* SDL_murmur3.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_murmur3.c; sourceTree = "<group>"; };
|
||||
63134A232A7902FD0021E9A6 /* SDL_pen_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_pen_c.h; sourceTree = "<group>"; };
|
||||
63134A242A7902FD0021E9A6 /* SDL_pen.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_pen.c; sourceTree = "<group>"; };
|
||||
@@ -1964,6 +1966,7 @@
|
||||
A7D8A7C223E2513E00DCD162 /* SDL_hidapi_xbox360.c */,
|
||||
A7D8A7C823E2513E00DCD162 /* SDL_hidapi_xbox360w.c */,
|
||||
A7D8A7C523E2513E00DCD162 /* SDL_hidapi_xboxone.c */,
|
||||
63124A412E5C357500A53610 /* SDL_hidapi_zuiki.c */,
|
||||
A7D8A7C423E2513E00DCD162 /* SDL_hidapijoystick.c */,
|
||||
A7D8A7C723E2513E00DCD162 /* SDL_hidapijoystick_c.h */,
|
||||
);
|
||||
@@ -3116,6 +3119,7 @@
|
||||
00004D0B73767647AD550000 /* SDL_asyncio_generic.c in Sources */,
|
||||
0000A03C0F32C43816F40000 /* SDL_asyncio_windows_ioring.c in Sources */,
|
||||
0000A877C7DB9FA935FC0000 /* SDL_uikitpen.m in Sources */,
|
||||
63124A422E5C357500A53610 /* SDL_hidapi_zuiki.c in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
||||
@@ -1776,6 +1776,18 @@ extern "C" {
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_SINPUT "SDL_JOYSTICK_HIDAPI_SINPUT"
|
||||
|
||||
/**
|
||||
* A variable controlling whether the HIDAPI driver for ZUIKI controllers
|
||||
* should be used.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
*
|
||||
* "0" - HIDAPI driver is not used. "1" - HIDAPI driver is used.
|
||||
*
|
||||
* The default is the value of SDL_HINT_JOYSTICK_HIDAPI
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_ZUIKI "SDL_JOYSTICK_HIDAPI_ZUIKI"
|
||||
|
||||
/**
|
||||
* A variable controlling whether the HIDAPI driver for Flydigi controllers
|
||||
* should be used.
|
||||
@@ -4264,7 +4276,7 @@ extern "C" {
|
||||
*
|
||||
* \since This hint is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_HINT_WINDOWS_GAMEINPUT "SDL_WINDOWS_GAMEINPUT"
|
||||
#define SDL_HINT_WINDOWS_GAMEINPUT "SDL_WINDOWS_GAMEINPUT"
|
||||
|
||||
/**
|
||||
* A variable controlling whether raw keyboard events are used on Windows.
|
||||
@@ -4309,7 +4321,7 @@ extern "C" {
|
||||
*
|
||||
* \since This hint is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_HINT_WINDOWS_INTRESOURCE_ICON "SDL_WINDOWS_INTRESOURCE_ICON"
|
||||
#define SDL_HINT_WINDOWS_INTRESOURCE_ICON "SDL_WINDOWS_INTRESOURCE_ICON"
|
||||
|
||||
/**
|
||||
* A variable to specify custom icon resource id from RC file on Windows
|
||||
@@ -4612,7 +4624,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_ResetHints(void);
|
||||
* \sa SDL_SetHint
|
||||
* \sa SDL_SetHintWithPriority
|
||||
*/
|
||||
extern SDL_DECLSPEC const char * SDLCALL SDL_GetHint(const char *name);
|
||||
extern SDL_DECLSPEC const char *SDLCALL SDL_GetHint(const char *name);
|
||||
|
||||
/**
|
||||
* Get the boolean value of a hint variable.
|
||||
@@ -4688,8 +4700,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_AddHintCallback(const char *name, SDL_HintC
|
||||
* \sa SDL_AddHintCallback
|
||||
*/
|
||||
extern SDL_DECLSPEC void SDLCALL SDL_RemoveHintCallback(const char *name,
|
||||
SDL_HintCallback callback,
|
||||
void *userdata);
|
||||
SDL_HintCallback callback,
|
||||
void *userdata);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -103,6 +103,9 @@ static SDL_HIDAPI_DeviceDriver *SDL_HIDAPI_drivers[] = {
|
||||
#ifdef SDL_JOYSTICK_HIDAPI_SINPUT
|
||||
&SDL_HIDAPI_DriverSInput,
|
||||
#endif
|
||||
#ifdef SDL_JOYSTICK_HIDAPI_ZUIKI
|
||||
&SDL_HIDAPI_DriverZUIKI,
|
||||
#endif
|
||||
};
|
||||
static int SDL_HIDAPI_numdrivers = 0;
|
||||
static SDL_AtomicInt SDL_HIDAPI_updating_devices;
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
#define SDL_JOYSTICK_HIDAPI_FLYDIGI
|
||||
#define SDL_JOYSTICK_HIDAPI_GIP
|
||||
#define SDL_JOYSTICK_HIDAPI_SINPUT
|
||||
#define SDL_JOYSTICK_HIDAPI_ZUIKI
|
||||
|
||||
// Joystick capability definitions
|
||||
#define SDL_JOYSTICK_CAP_MONO_LED 0x00000001
|
||||
@@ -171,6 +172,7 @@ extern SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverLg4ff;
|
||||
extern SDL_HIDAPI_DeviceDriver SDL_HIDAPI_Driver8BitDo;
|
||||
extern SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverFlydigi;
|
||||
extern SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverSInput;
|
||||
extern SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverZUIKI;
|
||||
|
||||
// Return true if a HID device is present and supported as a joystick of the given type
|
||||
extern bool HIDAPI_IsDeviceTypePresent(SDL_GamepadType type);
|
||||
|
||||
@@ -60,6 +60,7 @@
|
||||
#define USB_VENDOR_VALVE 0x28de
|
||||
#define USB_VENDOR_ZEROPLUS 0x0c12
|
||||
#define USB_VENDOR_RASPBERRYPI 0x2e8a // Commercial hardware from various companies are registered under this VID
|
||||
#define USB_VENDOR_ZUIKI 0x33dd
|
||||
|
||||
#define USB_PRODUCT_8BITDO_SF30_PRO 0x6000 // B + START
|
||||
#define USB_PRODUCT_8BITDO_SF30_PRO_BT 0x6100 // B + START
|
||||
@@ -170,7 +171,8 @@
|
||||
#define USB_PRODUCT_HANDHELDLEGEND_SINPUT_GENERIC 0x10c6
|
||||
#define USB_PRODUCT_HANDHELDLEGEND_PROGCC 0x10df
|
||||
#define USB_PRODUCT_HANDHELDLEGEND_GCULTIMATE 0x10dd
|
||||
#define USB_PRODUCT_BONZIRICHANNEL_FIREBIRD 0x10e0
|
||||
#define USB_PRODUCT_BONZIRICHANNEL_FIREBIRD 0x10e0
|
||||
#define USB_PRODUCT_ZUIKI_MASCON_PRO 0x0006
|
||||
#define USB_PRODUCT_VOIDGAMING_PS4FIREBIRD 0x10e5
|
||||
|
||||
// USB usage pages
|
||||
|
||||
Reference in New Issue
Block a user