mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-26 19:58:36 +01:00
Add "Analog trigger threshold" setting, for conversion of analog trigger inputs to digital button inputs.
This commit is contained in:
1 parent
15b5c7f6bf
commit
3895cfff74
9 files changed
+60
-11
No files matched your search
+20
-1
@@ -48,6 +48,25 @@ std::set<std::string> g_seenPads;
|
||||
std::map<InputDeviceID, std::string> g_padNames;
|
||||
std::set<InputDeviceID> g_seenDeviceIds;
|
||||
|
||||
AxisType GetAxisType(InputAxis input) {
|
||||
switch (input) {
|
||||
case JOYSTICK_AXIS_GAS:
|
||||
case JOYSTICK_AXIS_BRAKE:
|
||||
case JOYSTICK_AXIS_LTRIGGER:
|
||||
case JOYSTICK_AXIS_RTRIGGER:
|
||||
return AxisType::TRIGGER;
|
||||
case JOYSTICK_AXIS_X:
|
||||
case JOYSTICK_AXIS_Y:
|
||||
case JOYSTICK_AXIS_Z:
|
||||
case JOYSTICK_AXIS_RX:
|
||||
case JOYSTICK_AXIS_RY:
|
||||
case JOYSTICK_AXIS_RZ:
|
||||
return AxisType::STICK;
|
||||
default:
|
||||
return AxisType::OTHER;
|
||||
}
|
||||
}
|
||||
|
||||
// Utility for UI navigation
|
||||
void SingleInputMappingFromPspButton(int btn, std::vector<InputMapping> *mappings, bool ignoreMouse) {
|
||||
std::vector<MultiInputMapping> multiMappings;
|
||||
@@ -874,7 +893,7 @@ bool HasChanged(int &prevGeneration) {
|
||||
return false;
|
||||
}
|
||||
|
||||
static const char *g_vKeyNames[] = {
|
||||
static const char * const g_vKeyNames[] = {
|
||||
"AXIS_X_MIN",
|
||||
"AXIS_Y_MIN",
|
||||
"AXIS_X_MAX",
|
||||
|
||||
Reference in new issue
Block a user