diff --git a/examples/sdl_opengl_example/imgui_impl_sdl.cpp b/examples/sdl_opengl_example/imgui_impl_sdl.cpp index 10260d2d..980b11dc 100644 --- a/examples/sdl_opengl_example/imgui_impl_sdl.cpp +++ b/examples/sdl_opengl_example/imgui_impl_sdl.cpp @@ -118,9 +118,7 @@ bool ImGui_ImplSdl_ProcessEvent(SDL_Event* event) case SDL_TEXTINPUT: { ImGuiIO& io = ImGui::GetIO(); - unsigned int c = event->text.text[0]; - if (c > 0 && c < 0x10000) - io.AddInputCharacter((unsigned short)c); + io.AddInputCharactersUTF8(event->text.text); return true; } case SDL_KEYDOWN: