Use emscripten rich text clipboard method in native version as well to fix character encoding issues

This commit is contained in:
Yousef Khadadeh 2025-11-12 11:07:40 +03:00
parent f97029552f
commit f5d496bc45
3 changed files with 12 additions and 31 deletions

View file

@ -203,16 +203,15 @@ struct InputManager {
void set_clipboard_data(const std::unordered_map<std::string, std::string>& newClipboardData);
void process_text_paste();
static std::string get_infpnt_richtext_mimetype();
std::unordered_map<std::string, std::string> clipboardData;
#ifdef __EMSCRIPTEN__
bool clipboardPasteEventHappened = false;
std::unordered_map<std::string, std::string> clipboardPasteEventData;
std::optional<RichText::TextData> lastCopiedRichText;
#endif
std::optional<RichText::TextData> lastCopiedRichText;
std::string key_assignment_to_str(const Vector2ui32& k);
Vector2ui32 key_assignment_from_str(const std::string& s);