You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 12:50:35 +00:00
[Complex Test Layouts] Change String to use UTF-32 encoding on all platforms.
This commit is contained in:
@@ -296,7 +296,7 @@ Error OS_UWP::initialize(const VideoMode &p_desired, int p_video_driver, int p_a
|
||||
void OS_UWP::set_clipboard(const String &p_text) {
|
||||
DataPackage ^ clip = ref new DataPackage();
|
||||
clip->RequestedOperation = DataPackageOperation::Copy;
|
||||
clip->SetText(ref new Platform::String((const wchar_t *)p_text.c_str()));
|
||||
clip->SetText(ref new Platform::String((LPCWSTR)(p_text.utf16().get_data())));
|
||||
|
||||
Clipboard::SetContent(clip);
|
||||
};
|
||||
@@ -346,8 +346,8 @@ void OS_UWP::finalize_core() {
|
||||
}
|
||||
|
||||
void OS_UWP::alert(const String &p_alert, const String &p_title) {
|
||||
Platform::String ^ alert = ref new Platform::String(p_alert.c_str());
|
||||
Platform::String ^ title = ref new Platform::String(p_title.c_str());
|
||||
Platform::String ^ alert = ref new Platform::String((LPCWSTR)(p_alert.utf16().get_data()));
|
||||
Platform::String ^ title = ref new Platform::String((LPCWSTR)(p_title.utf16().get_data()));
|
||||
|
||||
MessageDialog ^ msg = ref new MessageDialog(alert, title);
|
||||
|
||||
@@ -738,7 +738,7 @@ static String format_error_message(DWORD id) {
|
||||
|
||||
Error OS_UWP::open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path) {
|
||||
String full_path = "game/" + p_path;
|
||||
p_library_handle = (void *)LoadPackagedLibrary(full_path.c_str(), 0);
|
||||
p_library_handle = (void *)LoadPackagedLibrary((LPCWSTR)(full_path.utf16().get_data()), 0);
|
||||
ERR_FAIL_COND_V_MSG(!p_library_handle, ERR_CANT_OPEN, "Can't open dynamic library: " + full_path + ", error: " + format_error_message(GetLastError()) + ".");
|
||||
return OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user