From fc63827b52105b22c52df1f9273df86ac4dd3cd0 Mon Sep 17 00:00:00 2001 From: Oleksandr Havrylutsa Date: Thu, 18 Jul 2024 02:47:04 +0300 Subject: [PATCH] =?UTF-8?q?Fixed=3F=20imgui=5Fimpl=5Fsdl3.cpp=20invalid=20?= =?UTF-8?q?conversion=20from=20=E2=80=98const=20char*=E2=80=99=20to=20?= =?UTF-8?q?=E2=80=98char*=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backends/imgui_impl_sdl3.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backends/imgui_impl_sdl3.cpp b/backends/imgui_impl_sdl3.cpp index 7bb9ca217181..e09d87a50d45 100644 --- a/backends/imgui_impl_sdl3.cpp +++ b/backends/imgui_impl_sdl3.cpp @@ -79,7 +79,7 @@ struct ImGui_ImplSDL3_Data SDL_Window* Window; SDL_Renderer* Renderer; Uint64 Time; - char* ClipboardTextData; + const char* ClipboardTextData; // IME handling SDL_Window* ImeWindow; @@ -114,7 +114,7 @@ static const char* ImGui_ImplSDL3_GetClipboardText(void*) { ImGui_ImplSDL3_Data* bd = ImGui_ImplSDL3_GetBackendData(); if (bd->ClipboardTextData) - SDL_free(bd->ClipboardTextData); + SDL_free((void*)bd->ClipboardTextData); bd->ClipboardTextData = SDL_GetClipboardText(); return bd->ClipboardTextData; } @@ -507,7 +507,7 @@ void ImGui_ImplSDL3_Shutdown() ImGuiIO& io = ImGui::GetIO(); if (bd->ClipboardTextData) - SDL_free(bd->ClipboardTextData); + SDL_free((void*)bd->ClipboardTextData); for (ImGuiMouseCursor cursor_n = 0; cursor_n < ImGuiMouseCursor_COUNT; cursor_n++) SDL_DestroyCursor(bd->MouseCursors[cursor_n]); ImGui_ImplSDL3_CloseGamepads();