diff --git a/Source/DiabloUI/diabloui.cpp b/Source/DiabloUI/diabloui.cpp index 3754049aa03..314cfdb76e2 100644 --- a/Source/DiabloUI/diabloui.cpp +++ b/Source/DiabloUI/diabloui.cpp @@ -8,6 +8,7 @@ #include "DiabloUI/dialogs.h" #include "DiabloUI/scrollbar.h" #include "controls/controller.h" +#include "controls/devices/kbcontroller.h" #include "controls/input.h" #include "controls/menu_controls.h" #include "controls/plrctrls.h" @@ -463,6 +464,7 @@ void UiHandleEvents(SDL_Event *event) return; } +#if HAS_KBCTRL == 0 if (event->type == SDL_KEYDOWN && event->key.keysym.sym == SDLK_RETURN) { const Uint8 *state = SDLC_GetKeyState(); if (state[SDLC_KEYSTATE_LALT] != 0 || state[SDLC_KEYSTATE_RALT] != 0) { @@ -473,6 +475,7 @@ void UiHandleEvents(SDL_Event *event) return; } } +#endif if (event->type == SDL_QUIT) diablo_quit(0); diff --git a/Source/diablo.cpp b/Source/diablo.cpp index cb6d331d2dd..a4dc53a3540 100644 --- a/Source/diablo.cpp +++ b/Source/diablo.cpp @@ -19,6 +19,7 @@ #include "debug.h" #endif #include "DiabloUI/diabloui.h" +#include "controls/devices/kbcontroller.h" #include "controls/plrctrls.h" #include "controls/remap_keyboard.h" #include "diablo.h" @@ -488,10 +489,13 @@ void PressKey(SDL_Keycode vkey, uint16_t modState) } sgOptions.Keymapper.KeyPressed(vkey); if (vkey == SDLK_RETURN || vkey == SDLK_KP_ENTER) { +#if HAS_KBCTRL == 0 if ((modState & KMOD_ALT) != 0) { sgOptions.Graphics.fullscreen.SetValue(!IsFullScreen()); SaveOptions(); - } else { + } else +#endif + { control_type_message(); } } @@ -523,10 +527,12 @@ void PressKey(SDL_Keycode vkey, uint16_t modState) sgOptions.Keymapper.KeyPressed(vkey); if (PauseMode == 2) { +#if HAS_KBCTRL == 0 if ((vkey == SDLK_RETURN || vkey == SDLK_KP_ENTER) && (modState & KMOD_ALT) != 0) { sgOptions.Graphics.fullscreen.SetValue(!IsFullScreen()); SaveOptions(); } +#endif return; } @@ -562,8 +568,10 @@ void PressKey(SDL_Keycode vkey, uint16_t modState) case SDLK_RETURN: case SDLK_KP_ENTER: if ((modState & KMOD_ALT) != 0) { +#if HAS_KBCTRL == 0 sgOptions.Graphics.fullscreen.SetValue(!IsFullScreen()); SaveOptions(); +#endif } else if (stextflag != TalkID::None) { StoreEnter(); } else if (QuestLogIsOpen) {