mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 00:32:57 -04:00
device: correction for DualShock 4 support on Windows
This commit is contained in:
parent
27fe133df5
commit
c9fb371e87
@ -71,15 +71,15 @@ static const struct DeviceMapping {
|
|||||||
},
|
},
|
||||||
// Dualshock (PS4)
|
// Dualshock (PS4)
|
||||||
{0x054c, 0x05c4, InputDevice::DeviceClass::gamepad, QB_rstick_from_z,
|
{0x054c, 0x05c4, InputDevice::DeviceClass::gamepad, QB_rstick_from_z,
|
||||||
{"face_x", "face_a", "face_b", "face_y", 0, 0, "ltrigger", "rtrigger", "back", "start", "lstick", "rstick", "guide", 0}
|
{"face_x", "face_a", "face_b", "face_y", "lshoulder", "rshoulder", 0, 0, "back", "start", "lstick", "rstick", "guide", 0}
|
||||||
},
|
},
|
||||||
// Dualshock 2nd Gen (PS4 Slim)
|
// Dualshock 2nd Gen (PS4 Slim)
|
||||||
{0x054c, 0x09cc, InputDevice::DeviceClass::gamepad, QB_rstick_from_z,
|
{0x054c, 0x09cc, InputDevice::DeviceClass::gamepad, QB_rstick_from_z,
|
||||||
{"face_x", "face_a", "face_b", "face_y", 0, 0, "ltrigger", "rtrigger", "back", "start", "lstick", "rstick", "guide", 0}
|
{"face_x", "face_a", "face_b", "face_y", "lshoulder", "rshoulder", 0, 0, "back", "start", "lstick", "rstick", "guide", 0}
|
||||||
},
|
},
|
||||||
// Dualshock 2nd Gen (PS4 wireless adapter)
|
// Dualshock 2nd Gen (PS4 wireless adapter)
|
||||||
{0x054c, 0x0ba0, InputDevice::DeviceClass::gamepad, QB_rstick_from_z,
|
{0x054c, 0x0ba0, InputDevice::DeviceClass::gamepad, QB_rstick_from_z,
|
||||||
{"face_x", "face_a", "face_b", "face_y", 0, 0, "ltrigger", "rtrigger", "back", "start", "lstick", "rstick", "guide", 0}
|
{"face_x", "face_a", "face_b", "face_y", "lshoulder", "rshoulder", 0, 0, "back", "start", "lstick", "rstick", "guide", 0}
|
||||||
},
|
},
|
||||||
{0},
|
{0},
|
||||||
};
|
};
|
||||||
@ -494,11 +494,12 @@ on_arrival(HANDLE handle, const RID_DEVICE_INFO &info, std::string name) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
axis = Axis::right_y;
|
axis = Axis::right_y;
|
||||||
|
swap(cap.LogicalMin, cap.LogicalMax);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
axis = Axis::roll;
|
axis = Axis::roll;
|
||||||
|
swap(cap.LogicalMin, cap.LogicalMax);
|
||||||
}
|
}
|
||||||
swap(cap.LogicalMin, cap.LogicalMax);
|
|
||||||
break;
|
break;
|
||||||
case HID_USAGE_GENERIC_RZ:
|
case HID_USAGE_GENERIC_RZ:
|
||||||
if (_device_class == DeviceClass::gamepad) {
|
if (_device_class == DeviceClass::gamepad) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user