Compare commits

...

4 Commits

Author SHA1 Message Date
3490704d64
fix sdl new string policies
Some checks failed
ContinuousDelivery / windows (push) Waiting to run
ContinuousDelivery / windows-asan (push) Waiting to run
ContinuousDelivery / release (push) Blocked by required conditions
ContinuousIntegration / macos (push) Waiting to run
ContinuousIntegration / windows (push) Waiting to run
ContinuousDelivery / linux-ubuntu (push) Failing after 4m29s
ContinuousDelivery / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Failing after 5m31s
ContinuousDelivery / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android]) (push) Failing after 5m38s
ContinuousIntegration / linux (push) Successful in 3m52s
ContinuousIntegration / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Failing after 5m18s
ContinuousIntegration / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android]) (push) Failing after 5m4s
2024-07-18 14:23:22 +02:00
468eac8e6b
update imgui again (still wip but newer sdl) Merge commit '43e233c2333d4fd5cd4ac19b135ccf85c4740384' 2024-07-18 14:19:20 +02:00
43e233c233 Squashed 'external/imgui/imgui/' changes from 070c046cd1f..c2d21ab04f2
c2d21ab04f2 Backends: SDL3: Update for API changes: SDL_GetClipboardText() string ownership change. (#7801)

git-subtree-dir: external/imgui/imgui
git-subtree-split: c2d21ab04f26a9846fc303dae710a57446bbe4d3
2024-07-18 14:19:20 +02:00
d838933e0e
update sdl again (imgui was fixed) 2024-07-18 14:18:15 +02:00
4 changed files with 8 additions and 5 deletions

View File

@ -21,6 +21,8 @@
// CHANGELOG // CHANGELOG
// (minor and older changes stripped away, please see git history for details) // (minor and older changes stripped away, please see git history for details)
// 2024-07-18: Update for SDL3 api changes: SDL_GetClipboardText() string ownership change. (#7801)
// 2024-07-15: Update for SDL3 api changes: SDL_GetProperty() change to SDL_GetPointerProperty(). (#7794)
// 2024-07-02: Update for SDL3 api changes: SDLK_x renames and SDLK_KP_x removals (#7761, #7762). // 2024-07-02: Update for SDL3 api changes: SDLK_x renames and SDLK_KP_x removals (#7761, #7762).
// 2024-07-01: Update for SDL3 api changes: SDL_SetTextInputRect() changed to SDL_SetTextInputArea(). // 2024-07-01: Update for SDL3 api changes: SDL_SetTextInputRect() changed to SDL_SetTextInputArea().
// 2024-06-26: Update for SDL3 api changes: SDL_StartTextInput()/SDL_StopTextInput()/SDL_SetTextInputRect() functions signatures. // 2024-06-26: Update for SDL3 api changes: SDL_StartTextInput()/SDL_StopTextInput()/SDL_SetTextInputRect() functions signatures.
@ -115,7 +117,8 @@ static const char* ImGui_ImplSDL3_GetClipboardText(void*)
ImGui_ImplSDL3_Data* bd = ImGui_ImplSDL3_GetBackendData(); ImGui_ImplSDL3_Data* bd = ImGui_ImplSDL3_GetBackendData();
if (bd->ClipboardTextData) if (bd->ClipboardTextData)
SDL_free(bd->ClipboardTextData); SDL_free(bd->ClipboardTextData);
bd->ClipboardTextData = SDL_GetClipboardText(); const char* sdl_clipboard_text = SDL_GetClipboardText();
bd->ClipboardTextData = sdl_clipboard_text ? SDL_strdup(sdl_clipboard_text) : NULL;
return bd->ClipboardTextData; return bd->ClipboardTextData;
} }

View File

@ -90,6 +90,7 @@ Other changes:
struct description data that a real application would want to use. struct description data that a real application would want to use.
- Backends: Win32: Fixed ImGuiMod_Super being mapped to VK_APPS instead of VK_LWIN||VK_RWIN. - Backends: Win32: Fixed ImGuiMod_Super being mapped to VK_APPS instead of VK_LWIN||VK_RWIN.
(#7768, #4858, #2622) [@Aemony] (#7768, #4858, #2622) [@Aemony]
- Backends: SDL3: Update for API changes: SDL_GetClipboardText() string ownership change. (#7801)
- Backends: SDL3: Update for API changes: SDLK_x renames and SDLK_KP_x removals (#7761, #7762) - Backends: SDL3: Update for API changes: SDLK_x renames and SDLK_KP_x removals (#7761, #7762)
- Backends: SDL3: Update for API changes: SDL_GetProperty() change to SDL_GetPointerProperty(). (#7794) [@wermipls] - Backends: SDL3: Update for API changes: SDL_GetProperty() change to SDL_GetPointerProperty(). (#7794) [@wermipls]
- Backends: SDL2,SDL3,OSX: Update for io.SetPlatformImeDataFn() -> io.PlatformSetImeDataFn() rename. - Backends: SDL2,SDL3,OSX: Update for io.SetPlatformImeDataFn() -> io.PlatformSetImeDataFn() rename.

View File

@ -19,8 +19,8 @@ if (NOT TARGET SDL3::SDL3)
#GIT_TAG 5fa9432b7d1c1722de93e1ab46e7a9569a47071e # tip 27-05-2024 - before changes made breaking sdl_image #GIT_TAG 5fa9432b7d1c1722de93e1ab46e7a9569a47071e # tip 27-05-2024 - before changes made breaking sdl_image
#GIT_TAG 9651ca59187c16079846918483c40d6b5c2f454c # tip 09-06-2024 #GIT_TAG 9651ca59187c16079846918483c40d6b5c2f454c # tip 09-06-2024
#GIT_TAG 657c0135b1ff1685afa1bad63b0417d92f4bcb46 # tip 09-06-2024 #GIT_TAG 657c0135b1ff1685afa1bad63b0417d92f4bcb46 # tip 09-06-2024
#GIT_TAG e949f12f63cdfcef4bdf456936ee676e0a3f9de6 # tip 18-07-2024 #GIT_TAG d65a8146b950abe31b4fbf779f3e2fea731af9bd # tip 16-07-2024 - before string policy changes breaking imgui
GIT_TAG d65a8146b950abe31b4fbf779f3e2fea731af9bd # tip 16-07-2024 - before string policy changes breaking imgui GIT_TAG e949f12f63cdfcef4bdf456936ee676e0a3f9de6 # tip 18-07-2024
FIND_PACKAGE_ARGS # for the future FIND_PACKAGE_ARGS # for the future
) )

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);
} }
} }
} }