mirror of
https://github.com/Artikash/Textractor.git
synced 2024-12-24 01:14:12 +08:00
fix clipboard monitor
This commit is contained in:
parent
a5bbf0bb62
commit
4eefafeae9
@ -267,6 +267,7 @@ namespace Util
|
|||||||
|
|
||||||
std::optional<std::wstring> GetClipboardText()
|
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 (!IsClipboardFormatAvailable(CF_UNICODETEXT)) return {};
|
||||||
if (!OpenClipboard(NULL)) return {};
|
if (!OpenClipboard(NULL)) return {};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user