summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
Diffstat (limited to 'platform')
-rw-r--r--platform/linuxbsd/detect.py3
-rw-r--r--platform/web/dom_keys.inc7
-rw-r--r--platform/windows/display_server_windows.cpp19
-rw-r--r--platform/windows/export/export_plugin.cpp8
-rw-r--r--platform/windows/os_windows.cpp8
5 files changed, 33 insertions, 12 deletions
diff --git a/platform/linuxbsd/detect.py b/platform/linuxbsd/detect.py
index 3f713d2db3..e203dca005 100644
--- a/platform/linuxbsd/detect.py
+++ b/platform/linuxbsd/detect.py
@@ -277,11 +277,10 @@ def configure(env: "Environment"):
env.Prepend(CPPPATH=["/usr/include/recastnavigation"])
env.Append(LIBS=["Recast"])
- if not env["builtin_embree"]:
+ if not env["builtin_embree"] and env["arch"] in ["x86_64", "arm64"]:
# No pkgconfig file so far, hardcode expected lib name.
env.Append(LIBS=["embree3"])
- ## Flags
if env["fontconfig"]:
if not env["use_sowrap"]:
if os.system("pkg-config --exists fontconfig") == 0: # 0 means found
diff --git a/platform/web/dom_keys.inc b/platform/web/dom_keys.inc
index e63bd7c69f..ae3b2fc1a5 100644
--- a/platform/web/dom_keys.inc
+++ b/platform/web/dom_keys.inc
@@ -51,6 +51,7 @@ Key dom_code2godot_scancode(EM_UTF8 const p_code[32], EM_UTF8 const p_key[32], b
DOM2GODOT("Numpad9", KP_9);
DOM2GODOT("NumpadAdd", KP_ADD);
DOM2GODOT("NumpadBackspace", BACKSPACE);
+ DOM2GODOT("Clear", CLEAR); // NumLock on macOS.
DOM2GODOT("NumpadClear", CLEAR);
DOM2GODOT("NumpadClearEntry", CLEAR);
//DOM2GODOT("NumpadComma", UNKNOWN);
@@ -125,16 +126,22 @@ Key dom_code2godot_scancode(EM_UTF8 const p_code[32], EM_UTF8 const p_key[32], b
DOM2GODOT("Slash", SLASH);
// Functional keys in the Alphanumeric section.
+ DOM2GODOT("Alt", ALT);
DOM2GODOT("AltLeft", ALT);
DOM2GODOT("AltRight", ALT);
DOM2GODOT("Backspace", BACKSPACE);
DOM2GODOT("CapsLock", CAPSLOCK);
DOM2GODOT("ContextMenu", MENU);
+ DOM2GODOT("Control", CTRL);
DOM2GODOT("ControlLeft", CTRL);
DOM2GODOT("ControlRight", CTRL);
DOM2GODOT("Enter", ENTER);
+ DOM2GODOT("Meta", META);
DOM2GODOT("MetaLeft", META);
DOM2GODOT("MetaRight", META);
+ DOM2GODOT("OSLeft", META); // Command on macOS.
+ DOM2GODOT("OSRight", META); // Command on macOS.
+ DOM2GODOT("Shift", SHIFT);
DOM2GODOT("ShiftLeft", SHIFT);
DOM2GODOT("ShiftRight", SHIFT);
DOM2GODOT("Space", SPACE);
diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp
index 92af3fef69..360e446de7 100644
--- a/platform/windows/display_server_windows.cpp
+++ b/platform/windows/display_server_windows.cpp
@@ -3404,16 +3404,8 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
} break;
case WM_SYSKEYUP:
case WM_KEYUP:
- if (windows[window_id].ime_suppress_next_keyup) {
- windows[window_id].ime_suppress_next_keyup = false;
- break;
- }
- [[fallthrough]];
case WM_SYSKEYDOWN:
case WM_KEYDOWN: {
- if (windows[window_id].ime_in_progress) {
- break;
- }
if (wParam == VK_SHIFT) {
shift_mem = (uMsg == WM_KEYDOWN || uMsg == WM_SYSKEYDOWN);
}
@@ -3426,6 +3418,17 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
gr_mem = alt_mem;
}
}
+ if (wParam == VK_LWIN || wParam == VK_RWIN) {
+ meta_mem = (uMsg == WM_KEYDOWN || uMsg == WM_SYSKEYDOWN);
+ }
+
+ if (windows[window_id].ime_suppress_next_keyup && (uMsg == WM_KEYUP || uMsg == WM_SYSKEYUP)) {
+ windows[window_id].ime_suppress_next_keyup = false;
+ break;
+ }
+ if (windows[window_id].ime_in_progress) {
+ break;
+ }
if (mouse_mode == MOUSE_MODE_CAPTURED) {
// When SetCapture is used, ALT+F4 hotkey is ignored by Windows, so handle it ourselves
diff --git a/platform/windows/export/export_plugin.cpp b/platform/windows/export/export_plugin.cpp
index 22297f4c29..941e72c8f3 100644
--- a/platform/windows/export/export_plugin.cpp
+++ b/platform/windows/export/export_plugin.cpp
@@ -879,7 +879,11 @@ Error EditorExportPlatformWindows::run(const Ref<EditorExportPreset> &p_preset,
print_line("Creating temporary directory...");
ep.step(TTR("Creating temporary directory..."), 2);
String temp_dir;
+#ifndef WINDOWS_ENABLED
err = ssh_run_on_remote(host, port, extra_args_ssh, "powershell -command \\\"\\$tmp = Join-Path \\$Env:Temp \\$(New-Guid); New-Item -Type Directory -Path \\$tmp | Out-Null; Write-Output \\$tmp\\\"", &temp_dir);
+#else
+ err = ssh_run_on_remote(host, port, extra_args_ssh, "powershell -command \"$tmp = Join-Path $Env:Temp $(New-Guid); New-Item -Type Directory -Path $tmp ^| Out-Null; Write-Output $tmp\"", &temp_dir);
+#endif
if (err != OK || temp_dir.is_empty()) {
CLEANUP_AND_RETURN(err);
}
@@ -891,6 +895,10 @@ Error EditorExportPlatformWindows::run(const Ref<EditorExportPreset> &p_preset,
CLEANUP_AND_RETURN(err);
}
+ if (cmd_args.is_empty()) {
+ cmd_args = " ";
+ }
+
{
String run_script = p_preset->get("ssh_remote_deploy/run_script");
run_script = run_script.replace("{temp_dir}", temp_dir);
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index d384049fb5..6e219fb929 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -69,6 +69,11 @@ __declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
#define WM_POINTERUPDATE 0x0245
#endif
+// Missing in MinGW headers before 8.0.
+#ifndef DWRITE_FONT_WEIGHT_SEMI_LIGHT
+#define DWRITE_FONT_WEIGHT_SEMI_LIGHT (DWRITE_FONT_WEIGHT)350
+#endif
+
#if defined(__GNUC__)
// Workaround GCC warning from -Wcast-function-type.
#define GetProcAddress (void *)GetProcAddress
@@ -673,9 +678,8 @@ Error OS_Windows::execute(const String &p_path, const List<String> &p_arguments,
}
CloseHandle(pipe[0]); // Close pipe read handle.
- } else {
- WaitForSingleObject(pi.pi.hProcess, INFINITE);
}
+ WaitForSingleObject(pi.pi.hProcess, INFINITE);
if (r_exitcode) {
DWORD ret2;