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:
ocornut
2026-01-15 16:07:07 +01:00
parent 9a6eb0ab25
commit d7598aa84f
5 changed files with 15 additions and 4 deletions

View File

@@ -3956,7 +3956,7 @@ struct ImGuiPlatformIO
// Optional: Access OS clipboard
// (default to use native Win32 clipboard on Windows, otherwise uses a private clipboard. Override to access OS clipboard on other architectures)
const char* (*Platform_GetClipboardTextFn)(ImGuiContext* ctx);
const char* (*Platform_GetClipboardTextFn)(ImGuiContext* ctx); // Should return NULL on failure (e.g. clipboard data is not text).
void (*Platform_SetClipboardTextFn)(ImGuiContext* ctx, const char* text);
void* Platform_ClipboardUserData;