Skip to content

Commit

Permalink
properly support using any column for inputmapper setinputmap
Browse files Browse the repository at this point in the history
did not use head. used head now
  • Loading branch information
poco0317 committed Jun 16, 2021
1 parent 2cb16c6 commit 8344dee
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Etterna/Singletons/InputMapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1469,9 +1469,14 @@ class LunaInputMapper : public Luna<InputMapper>
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<GameController>(playerSlot);
GameButton gb =
Expand All @@ -1480,7 +1485,7 @@ class LunaInputMapper : public Luna<InputMapper>
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)
Expand Down

0 comments on commit 8344dee

Please sign in to comment.