mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-25 02:24:24 +00:00
Backends: SDL2, SDL3: changed GetClipboardText() handler to return NULL on error aka clipboard contents is not text. (#9168)
Consistent with other backends.
This commit is contained in:
parent
9a6eb0ab25
commit
d7598aa84f
5 changed files with 15 additions and 4 deletions
|
|
@ -5091,10 +5091,11 @@ void ImGui::DebugAllocHook(ImGuiDebugAllocInfo* info, int frame_count, void* ptr
|
|||
}
|
||||
}
|
||||
|
||||
// A conformant backend should return NULL on failure (e.g. clipboard data is not text).
|
||||
const char* ImGui::GetClipboardText()
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
return g.PlatformIO.Platform_GetClipboardTextFn ? g.PlatformIO.Platform_GetClipboardTextFn(&g) : "";
|
||||
return g.PlatformIO.Platform_GetClipboardTextFn ? g.PlatformIO.Platform_GetClipboardTextFn(&g) : NULL;
|
||||
}
|
||||
|
||||
void ImGui::SetClipboardText(const char* text)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue