mirror of
https://github.com/OpenDriver2/REDRIVER2.git
synced 2024-11-25 03:42:34 +01:00
- [Psy-X] fix PsyX_Pad_InitPad disabling Analog mode
This commit is contained in:
parent
9d817f28bb
commit
8ec9a7b77d
@ -136,7 +136,6 @@ void PsyX_Pad_CloseController(int slot)
|
||||
// Called from LIBPAD
|
||||
void PsyX_Pad_InitPad(int slot, u_char* padData)
|
||||
{
|
||||
LPPADRAW pad;
|
||||
PsyXController* controller = &g_controllers[slot];
|
||||
|
||||
controller->padData = padData;
|
||||
@ -144,8 +143,14 @@ void PsyX_Pad_InitPad(int slot, u_char* padData)
|
||||
|
||||
if (padData)
|
||||
{
|
||||
pad = (LPPADRAW)padData;
|
||||
pad->id = slot == 0 ? 0x41 : 0xFF; // since keyboard is a main controller - it's always on
|
||||
LPPADRAW pad = (LPPADRAW)padData;
|
||||
|
||||
bool wasConnected = (pad->id == 0x41 || pad->id == 0x73);
|
||||
|
||||
if(!wasConnected)
|
||||
pad->id = slot == 0 ? 0x41 : 0xFF; // since keyboard is a main controller - it's always on
|
||||
|
||||
// only reset buttons
|
||||
pad->buttons[0] = 0xFF;
|
||||
pad->buttons[1] = 0xFF;
|
||||
pad->analog[0] = 128;
|
||||
|
Loading…
Reference in New Issue
Block a user