1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 18:19:55 +00:00

Fix controls window regression

This commit is contained in:
scrawl 2017-09-27 21:30:12 +02:00
parent 0ee57effcc
commit 0240a6c38b

View file

@ -697,7 +697,7 @@ namespace MWInput
SDL_StopTextInput(); SDL_StopTextInput();
bool consumed = false; bool consumed = false;
if (kc != OIS::KC_UNASSIGNED) if (kc != OIS::KC_UNASSIGNED && !mInputBinder->detectingBindingState())
{ {
consumed = MWBase::Environment::get().getWindowManager()->injectKeyPress(MyGUI::KeyCode::Enum(kc), 0); consumed = MWBase::Environment::get().getWindowManager()->injectKeyPress(MyGUI::KeyCode::Enum(kc), 0);
if (SDL_IsTextInputActive() && // Little trick to check if key is printable if (SDL_IsTextInputActive() && // Little trick to check if key is printable
@ -726,6 +726,7 @@ namespace MWInput
mJoystickLastUsed = false; mJoystickLastUsed = false;
OIS::KeyCode kc = mInputManager->sdl2OISKeyCode(arg.keysym.sym); OIS::KeyCode kc = mInputManager->sdl2OISKeyCode(arg.keysym.sym);
if (!mInputBinder->detectingBindingState())
setPlayerControlsEnabled(!MyGUI::InputManager::getInstance().injectKeyRelease(MyGUI::KeyCode::Enum(kc))); setPlayerControlsEnabled(!MyGUI::InputManager::getInstance().injectKeyRelease(MyGUI::KeyCode::Enum(kc)));
mInputBinder->keyReleased (arg); mInputBinder->keyReleased (arg);
} }