diff options
Diffstat (limited to 'platform')
-rw-r--r-- | platform/android/detect.py | 2 | ||||
-rw-r--r-- | platform/windows/os_windows.cpp | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/platform/android/detect.py b/platform/android/detect.py index ada36e2814..0c6c9fdca3 100644 --- a/platform/android/detect.py +++ b/platform/android/detect.py @@ -128,7 +128,7 @@ def configure(env): env.extra_suffix = ".armv7" + env.extra_suffix elif env["android_arch"] == "arm64v8": if get_platform(env["ndk_platform"]) < 21: - print("WARNING: android_arch=arm64v8 is not supported by ndk_platform lower than andorid-21; setting ndk_platform=android-21") + print("WARNING: android_arch=arm64v8 is not supported by ndk_platform lower than android-21; setting ndk_platform=android-21") env["ndk_platform"] = "android-21" env['ARCH'] = 'arch-arm64' target_subpath = "aarch64-linux-android-4.9" diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index d6cfd039d9..d5bb85c035 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -2790,9 +2790,13 @@ bool OS_Windows::is_disable_crash_handler() const { Error OS_Windows::move_to_trash(const String &p_path) { SHFILEOPSTRUCTW sf; + WCHAR *from = new WCHAR[p_path.length() + 2]; + wcscpy(from, p_path.c_str()); + from[p_path.length() + 1] = 0; + sf.hwnd = hWnd; sf.wFunc = FO_DELETE; - sf.pFrom = p_path.c_str(); + sf.pFrom = from; sf.pTo = NULL; sf.fFlags = FOF_ALLOWUNDO | FOF_NOCONFIRMATION; sf.fAnyOperationsAborted = FALSE; @@ -2800,6 +2804,7 @@ Error OS_Windows::move_to_trash(const String &p_path) { sf.lpszProgressTitle = NULL; int ret = SHFileOperationW(&sf); + delete[] from; if (ret) { ERR_PRINTS("SHFileOperation error: " + itos(ret)); |