From 6334e88e00e975fbae908e12098f8a2f67f9bfd0 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Sat, 20 Feb 2016 23:09:43 -0800 Subject: [PATCH] SDL: Fix axes being mapped wrong --- CHANGES | 1 + src/core/input.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 972f11763..5b839393b 100644 --- a/CHANGES +++ b/CHANGES @@ -10,6 +10,7 @@ Bugfixes: - Wii: Fix tilting direction - SDL: Fix joystick initialization on BS - SDL: Fix potential joystick crash in games with rumble + - SDL: Fix axes being mapped wrong Misc: - GBA: Slightly optimize GBAProcessEvents - Qt: Add preset for DualShock 4 diff --git a/src/core/input.c b/src/core/input.c index c6a93953b..d4238ede2 100644 --- a/src/core/input.c +++ b/src/core/input.c @@ -222,7 +222,7 @@ static void _saveAxis(uint32_t axis, void* dp, void* up) { ConfigurationSetValue(user->config, sectionName, axisKey, axisInfo); } if (description->highDirection != -1) { - const char* keyName = user->info->keyId[description->lowDirection]; + const char* keyName = user->info->keyId[description->highDirection]; char axisKey[KEY_NAME_MAX]; snprintf(axisKey, KEY_NAME_MAX, "axis%sValue", keyName);