mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-29 09:35:39 +00:00
Fixed an issue where SDL_StartTextInput() was sometimes set when not actually inputting any text
This commit is contained in:
parent
bd591a74cb
commit
be2b761356
|
@ -59,6 +59,7 @@ void InputManager::init()
|
|||
|
||||
SDL_InitSubSystem(SDL_INIT_GAMECONTROLLER);
|
||||
SDL_GameControllerEventState(SDL_ENABLE);
|
||||
SDL_StopTextInput();
|
||||
|
||||
if (!Utils::FileSystem::exists(getConfigPath())) {
|
||||
LOG(LogInfo) << "No input configuration file found, default mappings will be applied";
|
||||
|
|
|
@ -37,6 +37,12 @@ TextEditComponent::TextEditComponent()
|
|||
setSize(4096, mFont->getHeight() + (TEXT_PADDING_VERT * mRenderer->getScreenHeightModifier()));
|
||||
}
|
||||
|
||||
TextEditComponent::~TextEditComponent()
|
||||
{
|
||||
// Always disable text input when destroying this component.
|
||||
SDL_StopTextInput();
|
||||
}
|
||||
|
||||
void TextEditComponent::onFocusGained()
|
||||
{
|
||||
mFocused = true;
|
||||
|
|
|
@ -21,6 +21,7 @@ class TextEditComponent : public GuiComponent
|
|||
{
|
||||
public:
|
||||
TextEditComponent();
|
||||
~TextEditComponent();
|
||||
|
||||
void textInput(const std::string& text, const bool pasting = false) override;
|
||||
bool input(InputConfig* config, Input input) override;
|
||||
|
|
Loading…
Reference in a new issue