Skip to content
This repository has been archived by the owner on Dec 2, 2019. It is now read-only.

fix not open clipboard when paste in nk_gdip_clipboard_paste() #940

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion demo/gdip/nuklear_gdip.h
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,9 @@ nk_gdip_clipboard_paste(nk_handle usr, struct nk_text_edit *edit)
char* utf8;
(void)usr;

if (!IsClipboardFormatAvailable(CF_UNICODETEXT) && OpenClipboard(NULL))
if (!IsClipboardFormatAvailable(CF_UNICODETEXT))
return;
if (!OpenClipboard(NULL))
return;

mem = (HGLOBAL)GetClipboardData(CF_UNICODETEXT);
Expand Down