fix clipboard monitor

This commit is contained in:
Akash Mozumdar 2019-02-13 18:20:50 -05:00
parent a5bbf0bb62
commit 4eefafeae9

View File

@ -267,6 +267,7 @@ namespace Util
std::optional<std::wstring> GetClipboardText()
{
Sleep(10); // for some reason this function sometimes fails if I don't wait a little
if (!IsClipboardFormatAvailable(CF_UNICODETEXT)) return {};
if (!OpenClipboard(NULL)) return {};