diff options
author | Erik Kundiman <erik@megapahit.org> | 2023-11-16 16:02:41 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2023-11-16 16:02:41 +0800 |
commit | 135d87d0c52c9e7ec838656796a8c2371fb263c5 (patch) | |
tree | d1478a8d3d6252fd744f63b5d59d4de3655691d4 | |
parent | d17cea8d53cd2bc253d30228f6d2e0abcd59701b (diff) | |
parent | 1ce818b20909942eb90fa88d54856bd9d08d2719 (diff) |
Merge branch 'main' into DRTVWR-559
-rw-r--r-- | indra/llwindow/llwindowsdl.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index 7f70c2ae5f..cb53c28265 100644 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -1419,17 +1419,24 @@ BOOL LLWindowSDL::copyTextToPrimary(const LLWString &text) BOOL LLWindowSDL::isClipboardTextAvailable() { - return FALSE; // unsupported + return SDL_HasClipboardText(); } BOOL LLWindowSDL::pasteTextFromClipboard(LLWString &dst) { - return FALSE; // unsupported + auto data = SDL_GetClipboardText(); + if (data) + { + dst = LLWString(utf8str_to_wstring(data)); + SDL_free(data); + return TRUE; + } + return FALSE; } BOOL LLWindowSDL::copyTextToClipboard(const LLWString &s) { - return FALSE; // unsupported + return !SDL_SetClipboardText(wstring_to_utf8str(s).c_str()); } BOOL LLWindowSDL::isPrimaryTextAvailable() |