summaryrefslogtreecommitdiffstats
path: root/platform/linuxbsd
diff options
context:
space:
mode:
authorSpartan322 <Megacake1234@gmail.com>2024-10-26 22:41:20 -0400
committerSpartan322 <Megacake1234@gmail.com>2024-10-26 22:41:20 -0400
commit953af98c795066a5a450a3401cc8a4fbc6c12620 (patch)
tree9e100139ffacbcae90fbb5e6b10413e50a8e76b6 /platform/linuxbsd
parenta43f7f1c02a887d19694bdebac83af4d32cf3433 (diff)
parent61accf060515416da07d913580419fd8c8490f7b (diff)
downloadredot-engine-953af98c795066a5a450a3401cc8a4fbc6c12620.tar.gz
Merge commit godotengine/godot@61accf060515416da07d913580419fd8c8490f7b
Diffstat (limited to 'platform/linuxbsd')
-rw-r--r--platform/linuxbsd/detect.py9
-rw-r--r--platform/linuxbsd/wayland/display_server_wayland.cpp12
-rw-r--r--platform/linuxbsd/x11/display_server_x11.cpp12
3 files changed, 26 insertions, 7 deletions
diff --git a/platform/linuxbsd/detect.py b/platform/linuxbsd/detect.py
index 961167c036..85e7472c02 100644
--- a/platform/linuxbsd/detect.py
+++ b/platform/linuxbsd/detect.py
@@ -4,7 +4,7 @@ import sys
from typing import TYPE_CHECKING
from methods import get_compiler_version, print_error, print_warning, using_gcc
-from platform_methods import detect_arch
+from platform_methods import detect_arch, validate_arch
if TYPE_CHECKING:
from SCons.Script.SConscript import SConsEnvironment
@@ -74,12 +74,7 @@ def get_flags():
def configure(env: "SConsEnvironment"):
# Validate arch.
supported_arches = ["x86_32", "x86_64", "arm32", "arm64", "rv64", "ppc32", "ppc64"]
- if env["arch"] not in supported_arches:
- print_error(
- 'Unsupported CPU architecture "%s" for Linux / *BSD. Supported architectures are: %s.'
- % (env["arch"], ", ".join(supported_arches))
- )
- sys.exit(255)
+ validate_arch(env["arch"], get_name(), supported_arches)
## Build type
diff --git a/platform/linuxbsd/wayland/display_server_wayland.cpp b/platform/linuxbsd/wayland/display_server_wayland.cpp
index da50a7061a..e1cc9d4ad2 100644
--- a/platform/linuxbsd/wayland/display_server_wayland.cpp
+++ b/platform/linuxbsd/wayland/display_server_wayland.cpp
@@ -629,6 +629,18 @@ int64_t DisplayServerWayland::window_get_native_handle(HandleType p_handle_type,
}
return 0;
} break;
+ case EGL_DISPLAY: {
+ if (egl_manager) {
+ return (int64_t)egl_manager->get_display(p_window);
+ }
+ return 0;
+ }
+ case EGL_CONFIG: {
+ if (egl_manager) {
+ return (int64_t)egl_manager->get_config(p_window);
+ }
+ return 0;
+ }
#endif // GLES3_ENABLED
default: {
diff --git a/platform/linuxbsd/x11/display_server_x11.cpp b/platform/linuxbsd/x11/display_server_x11.cpp
index 5745dd3347..e0e5405c6f 100644
--- a/platform/linuxbsd/x11/display_server_x11.cpp
+++ b/platform/linuxbsd/x11/display_server_x11.cpp
@@ -1863,6 +1863,18 @@ int64_t DisplayServerX11::window_get_native_handle(HandleType p_handle_type, Win
}
return 0;
}
+ case EGL_DISPLAY: {
+ if (gl_manager_egl) {
+ return (int64_t)gl_manager_egl->get_display(p_window);
+ }
+ return 0;
+ }
+ case EGL_CONFIG: {
+ if (gl_manager_egl) {
+ return (int64_t)gl_manager_egl->get_config(p_window);
+ }
+ return 0;
+ }
#endif
default: {
return 0;