summaryrefslogtreecommitdiffstatshomepage
path: root/scripts/src
diff options
context:
space:
mode:
author Julian Sikorski <belegdol+github@gmail.com>2023-09-28 17:24:59 +0200
committer GitHub <noreply@github.com>2023-09-29 01:24:59 +1000
commit117c384d4ac65c06481f7a0631051c8ba273c0b5 (patch)
tree9aa97bb580be3bc24c50ceaa7a1463f2fbae4db7 /scripts/src
parent80155dfa8c8fd3ebcdb304ab97e967d276014f74 (diff)
render/drawbgfx.cpp: Added initial support for Wayland on Linux. (#11451)
Diffstat (limited to 'scripts/src')
-rwxr-xr-xscripts/src/3rdparty.lua5
-rw-r--r--scripts/src/osd/sdl.lua15
-rw-r--r--scripts/src/osd/sdl_cfg.lua6
3 files changed, 26 insertions, 0 deletions
diff --git a/scripts/src/3rdparty.lua b/scripts/src/3rdparty.lua
index 7b80101e973..dacb3a298ac 100755
--- a/scripts/src/3rdparty.lua
+++ b/scripts/src/3rdparty.lua
@@ -1469,6 +1469,11 @@ end
"BGFX_CONFIG_RENDERER_OPENGL=0",
}
end
+ if _OPTIONS["USE_WAYLAND"]=="1" then
+ defines {
+ "WL_EGL_PLATFORM=1",
+ }
+ end
end
if _OPTIONS["targetos"]=="macosx" and _OPTIONS["gcc"]~=nil then
diff --git a/scripts/src/osd/sdl.lua b/scripts/src/osd/sdl.lua
index abf4a90fd97..3e749d04017 100644
--- a/scripts/src/osd/sdl.lua
+++ b/scripts/src/osd/sdl.lua
@@ -37,6 +37,12 @@ function maintargetosdoptions(_target,_subtarget)
end
end
+ if _OPTIONS["USE_WAYLAND"]=="1" then
+ links {
+ "wayland-egl"
+ }
+ end
+
if _OPTIONS["NO_USE_XINPUT"]~="1" then
links {
"Xext",
@@ -142,6 +148,15 @@ if not _OPTIONS["NO_X11"] then
end
newoption {
+ trigger = "USE_WAYLAND",
+ description = "Use Wayland",
+ allowed = {
+ { "0", "Do not use Wayland (use XWayland or X11)" },
+ { "1", "Use Wayland" },
+ },
+}
+
+newoption {
trigger = "NO_USE_XINPUT",
description = "Disable use of Xinput",
allowed = {
diff --git a/scripts/src/osd/sdl_cfg.lua b/scripts/src/osd/sdl_cfg.lua
index 6b93c9a831e..17132ad814a 100644
--- a/scripts/src/osd/sdl_cfg.lua
+++ b/scripts/src/osd/sdl_cfg.lua
@@ -50,6 +50,12 @@ else
}
end
+if _OPTIONS["USE_WAYLAND"]=="1" then
+ defines {
+ "SDLMAME_USE_WAYLAND",
+ }
+end
+
if _OPTIONS["NO_USE_XINPUT"]=="1" then
defines {
"USE_XINPUT=0",