Fix controls window regression

pull/303/head
scrawl 7 years ago
parent 0ee57effcc
commit 0240a6c38b

@ -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,7 +726,8 @@ namespace MWInput
mJoystickLastUsed = false; mJoystickLastUsed = false;
OIS::KeyCode kc = mInputManager->sdl2OISKeyCode(arg.keysym.sym); OIS::KeyCode kc = mInputManager->sdl2OISKeyCode(arg.keysym.sym);
setPlayerControlsEnabled(!MyGUI::InputManager::getInstance().injectKeyRelease(MyGUI::KeyCode::Enum(kc))); if (!mInputBinder->detectingBindingState())
setPlayerControlsEnabled(!MyGUI::InputManager::getInstance().injectKeyRelease(MyGUI::KeyCode::Enum(kc)));
mInputBinder->keyReleased (arg); mInputBinder->keyReleased (arg);
} }

Loading…
Cancel
Save