diff --git a/4J.Input/4J_Input.cpp b/4J.Input/4J_Input.cpp index e28c30b68..138313454 100644 --- a/4J.Input/4J_Input.cpp +++ b/4J.Input/4J_Input.cpp @@ -40,7 +40,7 @@ static const int s_watchedKeys[] = { SDL_SCANCODE_TAB, SDL_SCANCODE_LCTRL, SDL_SCANCODE_RCTRL, SDL_SCANCODE_1, SDL_SCANCODE_2, SDL_SCANCODE_3, SDL_SCANCODE_4, SDL_SCANCODE_5, SDL_SCANCODE_6, SDL_SCANCODE_7, SDL_SCANCODE_8, - SDL_SCANCODE_9, SDL_SCANCODE_0, + SDL_SCANCODE_9, }; static const int s_watchedKeyCount = (int)(sizeof(s_watchedKeys) / sizeof(s_watchedKeys[0])); @@ -164,7 +164,7 @@ int C_4JInput::GetHotbarSlotPressed(int iPad) { static const int sc[10] = { SDL_SCANCODE_1, SDL_SCANCODE_2, SDL_SCANCODE_3, SDL_SCANCODE_4, SDL_SCANCODE_5, SDL_SCANCODE_6, SDL_SCANCODE_7, SDL_SCANCODE_8, - SDL_SCANCODE_9, SDL_SCANCODE_0 + SDL_SCANCODE_9, }; static bool s_wasDown[10] = {}; diff --git a/Minecraft.Client/Minecraft.cpp b/Minecraft.Client/Minecraft.cpp index c87ebac86..9286cb9c0 100644 --- a/Minecraft.Client/Minecraft.cpp +++ b/Minecraft.Client/Minecraft.cpp @@ -3439,7 +3439,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) #endif { int hotbarSlot = InputManager.GetHotbarSlotPressed(iPad); - if (hotbarSlot >= 0 && gameMode->isInputAllowed(MINECRAFT_ACTION_LEFT_SCROLL)) + if (hotbarSlot >= 0 && hotbarSlot <= 9) { player->inventory->selected = hotbarSlot; selected = true;