mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 21:32:45 +00:00
(XDK) Update xinput driver
This commit is contained in:
parent
0e6d99d2de
commit
10de1624eb
@ -43,6 +43,7 @@ typedef struct xdk_input
|
|||||||
bool bInserted[MAX_PADS];
|
bool bInserted[MAX_PADS];
|
||||||
bool bRemoved[MAX_PADS];
|
bool bRemoved[MAX_PADS];
|
||||||
#endif
|
#endif
|
||||||
|
const rarch_joypad_driver_t *joypad;
|
||||||
} xdk_input_t;
|
} xdk_input_t;
|
||||||
|
|
||||||
static void xdk_input_poll(void *data)
|
static void xdk_input_poll(void *data)
|
||||||
@ -296,14 +297,27 @@ const input_driver_t input_xinput =
|
|||||||
xdk_input_get_joypad_driver,
|
xdk_input_get_joypad_driver,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const char* const XBOX_CONTROLLER_NAMES[4] =
|
||||||
|
{
|
||||||
|
"XInput Controller (Player 1)",
|
||||||
|
"XInput Controller (Player 2)",
|
||||||
|
"XInput Controller (Player 3)",
|
||||||
|
"XInput Controller (Player 4)"
|
||||||
|
};
|
||||||
|
|
||||||
|
static const char *xdk_joypad_name(unsigned pad)
|
||||||
|
{
|
||||||
|
return XBOX_CONTROLLER_NAMES[pad];
|
||||||
|
}
|
||||||
|
|
||||||
static bool xdk_joypad_init(void)
|
static bool xdk_joypad_init(void)
|
||||||
{
|
{
|
||||||
unsigned autoconf_pad;
|
unsigned autoconf_pad;
|
||||||
|
|
||||||
for (autoconf_pad = 0; autoconf_pad < MAX_PLAYERS; autoconf_pad++)
|
for (autoconf_pad = 0; autoconf_pad < MAX_PLAYERS; autoconf_pad++)
|
||||||
{
|
{
|
||||||
strlcpy(g_settings.input.device_names[autoconf_pad], ps3_joypad_name(autoconf_pad), sizeof(g_settings.input.device_names[autoconf_pad]));
|
strlcpy(g_settings.input.device_names[autoconf_pad], xdk_joypad_name(autoconf_pad), sizeof(g_settings.input.device_names[autoconf_pad]));
|
||||||
input_config_autoconfigure_joypad(autoconf_pad, ps3_joypad_name(autoconf_pad), ps3_joypad.ident);
|
input_config_autoconfigure_joypad(autoconf_pad, xdk_joypad_name(autoconf_pad), xdk_joypad.ident);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -369,19 +383,6 @@ static bool xdk_joypad_query_pad(unsigned pad)
|
|||||||
return pad < MAX_PLAYERS && xdk->pad_state[pad];
|
return pad < MAX_PLAYERS && xdk->pad_state[pad];
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char* const XBOX_CONTROLLER_NAMES[4] =
|
|
||||||
{
|
|
||||||
"XInput Controller (Player 1)",
|
|
||||||
"XInput Controller (Player 2)",
|
|
||||||
"XInput Controller (Player 3)",
|
|
||||||
"XInput Controller (Player 4)"
|
|
||||||
};
|
|
||||||
|
|
||||||
static const char *xdk_joypad_name(unsigned pad)
|
|
||||||
{
|
|
||||||
return XBOX_CONTROLLER_NAMES(pad);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void xdk_joypad_destroy(void)
|
static void xdk_joypad_destroy(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
Optimization="3"
|
Optimization="3"
|
||||||
OptimizeForProcessor="2"
|
OptimizeForProcessor="2"
|
||||||
AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71";"$(SolutionDir)\..\deps\rzlib""
|
AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71";"$(SolutionDir)\..\deps\rzlib""
|
||||||
PreprocessorDefinitions="_DEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_MENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;__STDC_CONSTANT_MACROS;HAVE_ZLIB;HAVE_GRIFFIN;HAVE_CC_RESAMPLER;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DSOUND;HAVE_D3D8;RARCH_INTERNAL;WANT_MINIZ;SINC_LOWER_QUALITY;HAVE_OVERLAY;HAVE_THREADS;HAVE_FILTERS_BUILTIN"
|
PreprocessorDefinitions="_DEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_MENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;__STDC_CONSTANT_MACROS;HAVE_ZLIB;HAVE_GRIFFIN;HAVE_CC_RESAMPLER;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DSOUND;HAVE_D3D8;RARCH_INTERNAL;WANT_MINIZ;SINC_LOWER_QUALITY;HAVE_OVERLAY;HAVE_THREADS;HAVE_FILTERS_BUILTIN;HAVE_BUILTIN_AUTOCONFIG"
|
||||||
MinimalRebuild="TRUE"
|
MinimalRebuild="TRUE"
|
||||||
BasicRuntimeChecks="0"
|
BasicRuntimeChecks="0"
|
||||||
RuntimeLibrary="1"
|
RuntimeLibrary="1"
|
||||||
@ -72,7 +72,7 @@
|
|||||||
OmitFramePointers="TRUE"
|
OmitFramePointers="TRUE"
|
||||||
OptimizeForProcessor="2"
|
OptimizeForProcessor="2"
|
||||||
AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71";"$(SolutionDir)\..\deps\rzlib""
|
AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71";"$(SolutionDir)\..\deps\rzlib""
|
||||||
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_MENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;__STDC_CONSTANT_MACROS;HAVE_ZLIB;PROFILE;HAVE_GRIFFIN;HAVE_CC_RESAMPLER;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DSOUND;HAVE_D3D8;RARCH_INTERNAL;WANT_MINIZ;SINC_LOWER_QUALITY;HAVE_OVERLAY;HAVE_THREADS;HAVE_FILTERS_BUILTIN"
|
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_MENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;__STDC_CONSTANT_MACROS;HAVE_ZLIB;PROFILE;HAVE_GRIFFIN;HAVE_CC_RESAMPLER;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DSOUND;HAVE_D3D8;RARCH_INTERNAL;WANT_MINIZ;SINC_LOWER_QUALITY;HAVE_OVERLAY;HAVE_THREADS;HAVE_FILTERS_BUILTIN;HAVE_BUILTIN_AUTOCONFIG"
|
||||||
StringPooling="TRUE"
|
StringPooling="TRUE"
|
||||||
RuntimeLibrary="0"
|
RuntimeLibrary="0"
|
||||||
BufferSecurityCheck="TRUE"
|
BufferSecurityCheck="TRUE"
|
||||||
@ -127,7 +127,7 @@
|
|||||||
OmitFramePointers="TRUE"
|
OmitFramePointers="TRUE"
|
||||||
OptimizeForProcessor="2"
|
OptimizeForProcessor="2"
|
||||||
AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71";"$(SolutionDir)\..\deps\rzlib""
|
AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71";"$(SolutionDir)\..\deps\rzlib""
|
||||||
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_MENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;__STDC_CONSTANT_MACROS;HAVE_ZLIB;PROFILE;FASTCAP;HAVE_GRIFFIN;HAVE_CC_RESAMPLER;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DSOUND;HAVE_D3D8;RARCH_INTERNAL;WANT_MINIZ;SINC_LOWER_QUALITY;HAVE_OVERLAY;HAVE_THREADS;HAVE_FILTERS_BUILTIN"
|
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_MENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;__STDC_CONSTANT_MACROS;HAVE_ZLIB;PROFILE;FASTCAP;HAVE_GRIFFIN;HAVE_CC_RESAMPLER;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DSOUND;HAVE_D3D8;RARCH_INTERNAL;WANT_MINIZ;SINC_LOWER_QUALITY;HAVE_OVERLAY;HAVE_THREADS;HAVE_FILTERS_BUILTIN;HAVE_BUILTIN_AUTOCONFIG"
|
||||||
StringPooling="TRUE"
|
StringPooling="TRUE"
|
||||||
RuntimeLibrary="0"
|
RuntimeLibrary="0"
|
||||||
BufferSecurityCheck="TRUE"
|
BufferSecurityCheck="TRUE"
|
||||||
@ -188,7 +188,7 @@
|
|||||||
EnableFiberSafeOptimizations="TRUE"
|
EnableFiberSafeOptimizations="TRUE"
|
||||||
OptimizeForProcessor="2"
|
OptimizeForProcessor="2"
|
||||||
AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71";"$(SolutionDir)\..\deps\rzlib""
|
AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71";"$(SolutionDir)\..\deps\rzlib""
|
||||||
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_MENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;__STDC_CONSTANT_MACROS;HAVE_ZLIB;HAVE_GRIFFIN;HAVE_CC_RESAMPLER;inline=_inline;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DSOUND;HAVE_D3D8;RARCH_INTERNAL;WANT_MINIZ;SINC_LOWER_QUALITY;HAVE_OVERLAY;HAVE_THREADS;HAVE_FILTERS_BUILTIN"
|
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_MENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;__STDC_CONSTANT_MACROS;HAVE_ZLIB;HAVE_GRIFFIN;HAVE_CC_RESAMPLER;inline=_inline;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DSOUND;HAVE_D3D8;RARCH_INTERNAL;WANT_MINIZ;SINC_LOWER_QUALITY;HAVE_OVERLAY;HAVE_THREADS;HAVE_FILTERS_BUILTIN;HAVE_BUILTIN_AUTOCONFIG"
|
||||||
StringPooling="TRUE"
|
StringPooling="TRUE"
|
||||||
RuntimeLibrary="0"
|
RuntimeLibrary="0"
|
||||||
BufferSecurityCheck="TRUE"
|
BufferSecurityCheck="TRUE"
|
||||||
@ -241,7 +241,7 @@
|
|||||||
OmitFramePointers="TRUE"
|
OmitFramePointers="TRUE"
|
||||||
OptimizeForProcessor="2"
|
OptimizeForProcessor="2"
|
||||||
AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71";"$(SolutionDir)\..\deps\rzlib""
|
AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71";"$(SolutionDir)\..\deps\rzlib""
|
||||||
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_MENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;__STDC_CONSTANT_MACROS;HAVE_ZLIB;LTCG;HAVE_GRIFFIN;HAVE_CC_RESAMPLER;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DSOUND;HAVE_D3D8;RARCH_INTERNAL;WANT_MINIZ;SINC_LOWER_QUALITY;HAVE_OVERLAY;HAVE_THREADS;HAVE_FILTERS_BUILTIN"
|
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_MENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;__STDC_CONSTANT_MACROS;HAVE_ZLIB;LTCG;HAVE_GRIFFIN;HAVE_CC_RESAMPLER;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DSOUND;HAVE_D3D8;RARCH_INTERNAL;WANT_MINIZ;SINC_LOWER_QUALITY;HAVE_OVERLAY;HAVE_THREADS;HAVE_FILTERS_BUILTIN;HAVE_BUILTIN_AUTOCONFIG"
|
||||||
StringPooling="TRUE"
|
StringPooling="TRUE"
|
||||||
RuntimeLibrary="0"
|
RuntimeLibrary="0"
|
||||||
BufferSecurityCheck="TRUE"
|
BufferSecurityCheck="TRUE"
|
||||||
@ -300,7 +300,7 @@
|
|||||||
EnableFiberSafeOptimizations="TRUE"
|
EnableFiberSafeOptimizations="TRUE"
|
||||||
OptimizeForProcessor="2"
|
OptimizeForProcessor="2"
|
||||||
AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71";"$(SolutionDir)\..\deps\rzlib""
|
AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71";"$(SolutionDir)\..\deps\rzlib""
|
||||||
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_MENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;__STDC_CONSTANT_MACROS;HAVE_ZLIB;HAVE_GRIFFIN;HAVE_CC_RESAMPLER;inline=_inline;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DSOUND;HAVE_D3D8;RARCH_INTERNAL;WANT_MINIZ;SINC_LOWER_QUALITY;HAVE_OVERLAY;HAVE_THREADS;HAVE_FILTERS_BUILTIN"
|
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_MENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;__STDC_CONSTANT_MACROS;HAVE_ZLIB;HAVE_GRIFFIN;HAVE_CC_RESAMPLER;inline=_inline;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DSOUND;HAVE_D3D8;RARCH_INTERNAL;WANT_MINIZ;SINC_LOWER_QUALITY;HAVE_OVERLAY;HAVE_THREADS;HAVE_FILTERS_BUILTIN;HAVE_BUILTIN_AUTOCONFIG"
|
||||||
StringPooling="TRUE"
|
StringPooling="TRUE"
|
||||||
RuntimeLibrary="0"
|
RuntimeLibrary="0"
|
||||||
BufferSecurityCheck="TRUE"
|
BufferSecurityCheck="TRUE"
|
||||||
@ -353,7 +353,7 @@
|
|||||||
OmitFramePointers="TRUE"
|
OmitFramePointers="TRUE"
|
||||||
OptimizeForProcessor="2"
|
OptimizeForProcessor="2"
|
||||||
AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71";"$(SolutionDir)\..\deps\rzlib""
|
AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71";"$(SolutionDir)\..\deps\rzlib""
|
||||||
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_MENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;__STDC_CONSTANT_MACROS;HAVE_ZLIB;LTCG;HAVE_GRIFFIN;HAVE_CC_RESAMPLER;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DSOUND;HAVE_D3D8;RARCH_INTERNAL;WANT_MINIZ;SINC_LOWER_QUALITY;HAVE_OVERLAY;HAVE_THREADS;HAVE_FILTERS_BUILTIN"
|
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_MENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;__STDC_CONSTANT_MACROS;HAVE_ZLIB;LTCG;HAVE_GRIFFIN;HAVE_CC_RESAMPLER;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DSOUND;HAVE_D3D8;RARCH_INTERNAL;WANT_MINIZ;SINC_LOWER_QUALITY;HAVE_OVERLAY;HAVE_THREADS;HAVE_FILTERS_BUILTIN;HAVE_BUILTIN_AUTOCONFIG"
|
||||||
StringPooling="TRUE"
|
StringPooling="TRUE"
|
||||||
RuntimeLibrary="0"
|
RuntimeLibrary="0"
|
||||||
BufferSecurityCheck="TRUE"
|
BufferSecurityCheck="TRUE"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user