1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-24 07:14:31 +01:00

Begin requested changes

This commit is contained in:
Ethan O'Brien
2025-01-09 14:41:25 -06:00
parent cf011a6140
commit 1808cf6be2
6 changed files with 4 additions and 37 deletions

View File

@@ -174,21 +174,7 @@ void TextComposition::HandleMessage(const SDL_Event* e)
case SDLK_c:
if ((modifier & KEYBOARD_PRIMARY_MODIFIER) && _session.Length)
{
#ifndef __EMSCRIPTEN__
SDL_SetClipboardText(_session.Buffer->c_str());
#else
MAIN_THREAD_EM_ASM(
{
try
{
navigator.clipboard.writeText(UTF8ToString($0));
}
catch (e)
{
};
},
_session.Buffer->c_str());
#endif
OpenRCT2::GetContext()->GetUiContext()->SetClipboardText(_session.Buffer->c_str());
ContextShowError(STR_COPY_INPUT_TO_CLIPBOARD, STR_NONE, {});
}
break;