mirror of
https://github.com/libretro/ppsspp.git
synced 2025-02-25 03:10:31 +00:00
Add ability to set the clipboard. Update native with corresponding textedit change.
Fixes #6601.
This commit is contained in:
parent
f81b2c5785
commit
4dfe7b86fb
@ -191,6 +191,17 @@ int System_GetPropertyInt(SystemProperty prop) {
|
||||
void System_SendMessage(const char *command, const char *parameter) {
|
||||
if (!strcmp(command, "finish")) {
|
||||
PostMessage(MainWindow::GetHWND(), WM_CLOSE, 0, 0);
|
||||
} else if (!strcmp(command, "setclipboardtext")) {
|
||||
if (OpenClipboard(MainWindow::GetDisplayHWND())) {
|
||||
std::wstring data = ConvertUTF8ToWString(parameter);
|
||||
HANDLE handle = GlobalAlloc(GMEM_MOVEABLE, (data.size() + 1) * sizeof(wchar_t));
|
||||
wchar_t *wstr = (wchar_t *)GlobalLock(handle);
|
||||
memcpy(wstr, data.c_str(), (data.size() + 1) * sizeof(wchar_t));
|
||||
GlobalUnlock(wstr);
|
||||
SetClipboardData(CF_UNICODETEXT, handle);
|
||||
GlobalFree(handle);
|
||||
CloseClipboard();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
2
native
2
native
@ -1 +1 @@
|
||||
Subproject commit 6f6f6eb1fbe82b0b16dc54628cce231cda26255b
|
||||
Subproject commit 9d8d64b321f6d8964066dd6ed83064a32969ec04
|
Loading…
x
Reference in New Issue
Block a user