From 8344dee77004ab243aa9a18dd610d90f46f0ed6d Mon Sep 17 00:00:00 2001 From: Barinade Date: Tue, 15 Jun 2021 19:09:42 -0500 Subject: [PATCH] properly support using any column for inputmapper setinputmap did not use head. used head now --- src/Etterna/Singletons/InputMapper.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Etterna/Singletons/InputMapper.cpp b/src/Etterna/Singletons/InputMapper.cpp index d18adc8b65..342d4b7668 100644 --- a/src/Etterna/Singletons/InputMapper.cpp +++ b/src/Etterna/Singletons/InputMapper.cpp @@ -1469,9 +1469,14 @@ class LunaInputMapper : public Luna public: static int SetInputMap(T* p, lua_State* L) { + // ex: "Key_z" std::string deviceInputString = SArg(1); + // ex: "Left" std::string buttonBeingMapped = SArg(2); - int playerSlot = IArg(3); + // 0-4. 2 is the "default" column and we have 2 extras somehow + int inputSlot = IArg(3); + // 0 is the left main controller, 1 is the other for doubles + int playerSlot = IArg(4); GameController gc = static_cast(playerSlot); GameButton gb = @@ -1480,7 +1485,7 @@ class LunaInputMapper : public Luna DeviceInput deviceI; deviceI.FromString(deviceInputString); - p->SetInputMap(deviceI, gameI, playerSlot); + p->SetInputMap(deviceI, gameI, inputSlot); return 0; } static int GetGameButtonsToMap(T* p, lua_State* L)