mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-23 08:33:50 +00:00
fix SDL text events from generating a ~ key when opening the console
This commit is contained in:
parent
630949514a
commit
f6b8ef126d
3 changed files with 66 additions and 3 deletions
|
|
@ -607,8 +607,10 @@ const UTF16 *PlatformWindowSDL::getCurtainWindowClassName()
|
|||
void PlatformWindowSDL::setKeyboardTranslation(const bool enabled)
|
||||
{
|
||||
mEnableKeyboardTranslation = enabled;
|
||||
if (mEnableKeyboardTranslation)
|
||||
SDL_StartTextInput();
|
||||
|
||||
// Flag for update. Let SDL know what kind of input state we are changing to.
|
||||
if (enabled)
|
||||
mOwningManager->updateSDLTextInputState(PlatformWindowManagerSDL::KeyboardInputState::TEXT_INPUT);
|
||||
else
|
||||
SDL_StopTextInput();
|
||||
mOwningManager->updateSDLTextInputState(PlatformWindowManagerSDL::KeyboardInputState::RAW_INPUT);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue