Skip to content

Commit

Permalink
Remove keyboard logic
Browse files Browse the repository at this point in the history
  • Loading branch information
dcvz committed Sep 28, 2022
1 parent e172536 commit 06f4433
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions backends/imgui_impl_sdl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@

#include "imgui.h"
#include "imgui_impl_sdl.h"
#ifdef __SWITCH__
#include "imgui_internal.h"
#endif

// SDL
#include <SDL.h>
Expand All @@ -93,7 +90,6 @@ struct ImGui_ImplSDL2_Data
int PendingMouseLeaveFrame;
char* ClipboardTextData;
bool MouseCanUseGlobalState;
bool ShowingVirtualKeyboard;

ImGui_ImplSDL2_Data() { memset((void*)this, 0, sizeof(*this)); }
};
Expand Down Expand Up @@ -254,24 +250,6 @@ bool ImGui_ImplSDL2_ProcessEvent(const SDL_Event* event)
ImGuiIO& io = ImGui::GetIO();
ImGui_ImplSDL2_Data* bd = ImGui_ImplSDL2_GetBackendData();

#ifdef __SWITCH__
ImGuiInputTextState* state = ImGui::GetInputTextState(ImGui::GetActiveID());

if (io.WantTextInput) {
if (!bd->ShowingVirtualKeyboard) {
state->ClearText();

bd->ShowingVirtualKeyboard = true;
SDL_StartTextInput();
}
} else {
if (bd->ShowingVirtualKeyboard) {
bd->ShowingVirtualKeyboard = false;
SDL_StopTextInput();
}
}
#endif

switch (event->type)
{
case SDL_MOUSEMOTION:
Expand Down

0 comments on commit 06f4433

Please sign in to comment.