mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-14 10:05:44 -04:00
Fix trying to paste unicode characters in web client showing messed up characters. Match the behaviour of other platforms and just ignore unicode characters that are not in code page 437.
This commit is contained in:
parent
a18de8d585
commit
0962e33a55
@ -2736,9 +2736,12 @@ static RequestClipboardCallback clipboard_func;
|
|||||||
static void* clipboard_obj;
|
static void* clipboard_obj;
|
||||||
|
|
||||||
EMSCRIPTEN_KEEPALIVE void Window_GotClipboardText(char* src) {
|
EMSCRIPTEN_KEEPALIVE void Window_GotClipboardText(char* src) {
|
||||||
String str = String_FromReadonly(src);
|
String str; char strBuffer[512];
|
||||||
if (!clipboard_func) return;
|
if (!clipboard_func) return;
|
||||||
|
|
||||||
|
String_InitArray(str, strBuffer);
|
||||||
|
String_AppendUtf8(&str, src, String_CalcLen(src, 2048));
|
||||||
|
|
||||||
clipboard_func(&str, clipboard_obj);
|
clipboard_func(&str, clipboard_obj);
|
||||||
clipboard_func = NULL;
|
clipboard_func = NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user