Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

console.lua,wayland_common: also detect Wayland if WAYLAND_SOCKET set #15331

Merged
merged 1 commit into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion player/lua/console.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion video/out/wayland_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -3024,7 +3024,7 @@ bool vo_wayland_valid_format(struct vo_wayland_state *wl, uint32_t drm_format, u

bool vo_wayland_init(struct vo *vo)
{
if (!getenv("WAYLAND_DISPLAY"))
if (!getenv("WAYLAND_DISPLAY") && !getenv("WAYLAND_SOCKET"))
goto err;

vo->wl = talloc_zero(NULL, struct vo_wayland_state);
Expand Down
Loading