Skip to content

Commit 94711c8

Browse files
committed
Remove translation from pad buttons to keys in spellbook
1 parent 5cee9dd commit 94711c8

1 file changed

Lines changed: 0 additions & 24 deletions

File tree

Source/controls/game_controls.cpp

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -86,28 +86,6 @@ SDL_Keycode TranslateControllerButtonToQuestLogKey(ControllerButton controllerBu
8686
}
8787
}
8888

89-
SDL_Keycode TranslateControllerButtonToSpellbookKey(ControllerButton controllerButton)
90-
{
91-
switch (TranslateTo(GamepadType, controllerButton)) {
92-
case ControllerButton_BUTTON_B:
93-
return SDLK_SPACE;
94-
case ControllerButton_BUTTON_Y:
95-
return SDLK_RETURN;
96-
case ControllerButton_BUTTON_LEFTSTICK:
97-
return SDLK_TAB; // Map
98-
case ControllerButton_BUTTON_DPAD_LEFT:
99-
return SDLK_LEFT;
100-
case ControllerButton_BUTTON_DPAD_RIGHT:
101-
return SDLK_RIGHT;
102-
case ControllerButton_BUTTON_DPAD_UP:
103-
return SDLK_UP;
104-
case ControllerButton_BUTTON_DPAD_DOWN:
105-
return SDLK_DOWN;
106-
default:
107-
return SDLK_UNKNOWN;
108-
}
109-
}
110-
11189
bool GetGameAction(const SDL_Event &event, ControllerButtonEvent ctrlEvent, GameAction *action)
11290
{
11391
const bool inGameMenu = InGameMenu();
@@ -205,8 +183,6 @@ bool GetGameAction(const SDL_Event &event, ControllerButtonEvent ctrlEvent, Game
205183
translation = TranslateControllerButtonToMenuKey(ctrlEvent.button);
206184
else if (QuestLogIsOpen)
207185
translation = TranslateControllerButtonToQuestLogKey(ctrlEvent.button);
208-
else if (SpellbookFlag)
209-
translation = TranslateControllerButtonToSpellbookKey(ctrlEvent.button);
210186

211187
if (translation != SDLK_UNKNOWN) {
212188
*action = GameActionSendKey { static_cast<uint32_t>(translation), ctrlEvent.up };

0 commit comments

Comments
 (0)