|
|
@ -10661,7 +10661,10 @@ static void SetClipboardTextFn_DefaultImpl(void*, const char* text)
|
|
|
|
const int wbuf_length = ImTextCountCharsFromUtf8(text, NULL) + 1;
|
|
|
|
const int wbuf_length = ImTextCountCharsFromUtf8(text, NULL) + 1;
|
|
|
|
HGLOBAL wbuf_handle = GlobalAlloc(GMEM_MOVEABLE, (SIZE_T)wbuf_length * sizeof(ImWchar));
|
|
|
|
HGLOBAL wbuf_handle = GlobalAlloc(GMEM_MOVEABLE, (SIZE_T)wbuf_length * sizeof(ImWchar));
|
|
|
|
if (wbuf_handle == NULL)
|
|
|
|
if (wbuf_handle == NULL)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
CloseClipboard();
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
ImWchar* wbuf_global = (ImWchar*)GlobalLock(wbuf_handle);
|
|
|
|
ImWchar* wbuf_global = (ImWchar*)GlobalLock(wbuf_handle);
|
|
|
|
ImTextStrFromUtf8(wbuf_global, wbuf_length, text, NULL);
|
|
|
|
ImTextStrFromUtf8(wbuf_global, wbuf_length, text, NULL);
|
|
|
|
GlobalUnlock(wbuf_handle);
|
|
|
|
GlobalUnlock(wbuf_handle);
|
|
|
|