mirror of
https://github.com/izzy2lost/ppsspp.git
synced 2026-03-10 12:43:04 -07:00
Rename KeyDef to InputMapping and give it responsibility for Axis encoding
This commit is contained in:
@@ -13,8 +13,8 @@ namespace KeyMap {
|
||||
|
||||
struct DefMappingStruct {
|
||||
int pspKey;
|
||||
int key;
|
||||
int direction;
|
||||
int keyOrAxis;
|
||||
int direction; // if 0, it's a key, otherwise an axis.
|
||||
};
|
||||
|
||||
static const DefMappingStruct defaultQwertyKeyboardKeyMap[] = {
|
||||
@@ -341,9 +341,9 @@ static const DefMappingStruct defaultVRRightController[] = {
|
||||
static void SetDefaultKeyMap(int deviceId, const DefMappingStruct *array, size_t count, bool replace) {
|
||||
for (size_t i = 0; i < count; i++) {
|
||||
if (array[i].direction == 0)
|
||||
SetKeyMapping(array[i].pspKey, KeyDef(deviceId, array[i].key), replace);
|
||||
SetInputMapping(array[i].pspKey, InputMapping(deviceId, array[i].keyOrAxis), replace);
|
||||
else
|
||||
SetAxisMapping(array[i].pspKey, deviceId, array[i].key, array[i].direction, replace);
|
||||
SetInputMapping(array[i].pspKey, InputMapping(deviceId, array[i].keyOrAxis, array[i].direction), replace);
|
||||
}
|
||||
g_seenDeviceIds.insert(deviceId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user