fix sdl new string policies

This commit is contained in:
Green Sky 2024-07-18 14:23:22 +02:00
parent 468eac8e6b
commit 3490704d64
No known key found for this signature in database

View File

@ -753,10 +753,9 @@ float ChatGui4::render(float time_delta) {
if (!ImGui::IsItemFocused()) { if (!ImGui::IsItemFocused()) {
ImGui::SetKeyboardFocusHere(-1); ImGui::SetKeyboardFocusHere(-1);
} }
char* primary_text = SDL_GetPrimarySelectionText(); const char* primary_text = SDL_GetPrimarySelectionText();
if (primary_text != nullptr) { if (primary_text != nullptr) {
ImGui::GetIO().AddInputCharactersUTF8(primary_text); ImGui::GetIO().AddInputCharactersUTF8(primary_text);
SDL_free(primary_text);
} }
} }
} }