Skip to content

Commit

Permalink
Merge pull request #68 from Samillion/dev_onpause_fix
Browse files Browse the repository at this point in the history
fix: don't force keeponpause when it's disabled
  • Loading branch information
Samillion authored Oct 21, 2024
2 parents 26237c3 + 342b246 commit cf8f743
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions modernz.lua
Original file line number Diff line number Diff line change
@@ -1542,7 +1542,9 @@ local function osc_init()
local display_w, display_h, display_aspect = mp.get_osd_size()
local scale = 1

if state.fullscreen then
if mp.get_property("video") == "no" then -- dummy/forced window
scale = user_opts.scaleforcedwindow
elseif state.fullscreen then
scale = user_opts.scalefullscreen
else
scale = user_opts.scalewindowed
@@ -2804,15 +2806,19 @@ local function idlescreen_visibility(mode, no_osd)
end

mp.observe_property("pause", "bool", function(name, enabled)
pause_state(name, enabled)
if user_opts.showonpause then
if enabled then
visibility_mode("always", true)
show_osc()
else
visibility_mode("auto", true)
end
end
pause_state(name, enabled)
if user_opts.showonpause then
if enabled then
if user_opts.keeponpause then
visibility_mode("always", true)
else
visibility_mode("auto", true)
end
show_osc()
else
visibility_mode("auto", true)
end
end
end)

mp.register_script_message("osc-visibility", visibility_mode)

0 comments on commit cf8f743

Please sign in to comment.