mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
console.lua,wayland_common: also detect Wayland if WAYLAND_SOCKET set
While most Wayland compositors provide a socket path indicated by environment variable WAYLAND_DISPLAY, others may sometimes bequeath a socket file descriptor specified by WAYLAND_SOCKET.
This commit is contained in:
@@ -19,7 +19,7 @@ local function detect_platform()
|
||||
local platform = mp.get_property_native('platform')
|
||||
if platform == 'darwin' or platform == 'windows' then
|
||||
return platform
|
||||
elseif os.getenv('WAYLAND_DISPLAY') then
|
||||
elseif os.getenv('WAYLAND_DISPLAY') or os.getenv('WAYLAND_SOCKET') then
|
||||
return 'wayland'
|
||||
end
|
||||
return 'x11'
|
||||
|
||||
Reference in New Issue
Block a user