Merge branch 'russian_console' into 'master'

Don't assume unmapped keycodes outside the extended ASCII range are unprintable

Closes #5871

See merge request OpenMW/openmw!622
pull/593/head
psi29a 4 years ago
commit 28be5a259b

@ -103,6 +103,7 @@
Bug #5838: Local map and other menus become blank in some locations while playing Wizards' Islands mod.
Bug #5840: GetSoundPlaying "Health Damage" doesn't play when NPC hits target with shield effect ( vanilla engine behavior )
Bug #5841: Can't Cast Zero Cost Spells When Magicka is < 0
Bug #5871: The console appears if you type the Russian letter "Ё" in the name of the enchantment
Feature #390: 3rd person look "over the shoulder"
Feature #1536: Show more information about level on menu
Feature #2386: Distant Statics in the form of Object Paging

@ -39,12 +39,14 @@ namespace MWInput
&& MWBase::Environment::get().getWindowManager()->isConsoleMode())
SDL_StopTextInput();
bool consumed = false;
bool consumed = SDL_IsTextInputActive() && // Little trick to check if key is printable
(!(SDLK_SCANCODE_MASK & arg.keysym.sym) &&
(std::isprint(arg.keysym.sym) ||
// Don't trust isprint for symbols outside the extended ASCII range
(kc == MyGUI::KeyCode::None && arg.keysym.sym > 0xff)));
if (kc != MyGUI::KeyCode::None && !mBindingsManager->isDetectingBindingState())
{
consumed = MWBase::Environment::get().getWindowManager()->injectKeyPress(kc, 0, arg.repeat);
if (SDL_IsTextInputActive() && // Little trick to check if key is printable
(!(SDLK_SCANCODE_MASK & arg.keysym.sym) && std::isprint(arg.keysym.sym)))
if (MWBase::Environment::get().getWindowManager()->injectKeyPress(kc, 0, arg.repeat))
consumed = true;
mBindingsManager->setPlayerControlsEnabled(!consumed);
}

Loading…
Cancel
Save