You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-15 13:51:40 +00:00
UWP: Fix app crash when managed_object->update_clipboard() is called
This commit is contained in:
committed by
Rémi Verschelde
parent
7722461dc5
commit
f5693969f0
@@ -284,8 +284,6 @@ Error OS_UWP::initialize(const VideoMode &p_desired, int p_video_driver, int p_a
|
||||
|
||||
power_manager = memnew(PowerUWP);
|
||||
|
||||
managed_object->update_clipboard();
|
||||
|
||||
Clipboard::ContentChanged += ref new EventHandler<Platform::Object ^>(managed_object, &ManagedType::on_clipboard_changed);
|
||||
|
||||
accelerometer = Accelerometer::GetDefault();
|
||||
@@ -387,6 +385,11 @@ void OS_UWP::alert(const String &p_alert, const String &p_title) {
|
||||
msg->ShowAsync();
|
||||
}
|
||||
|
||||
void OS_UWP::update_clipboard() {
|
||||
// See https://stackoverflow.com/questions/58660743/uwp-app-crashes-when-clipboard-getcontent-is-called-from-inside-onnavigatedto
|
||||
managed_object->update_clipboard();
|
||||
}
|
||||
|
||||
void OS_UWP::ManagedType::alert_close(IUICommand ^ command) {
|
||||
alert_close_handle = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user