diff options
Diffstat (limited to 'mpvcore/lua/osc.lua')
-rw-r--r-- | mpvcore/lua/osc.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/mpvcore/lua/osc.lua b/mpvcore/lua/osc.lua index 8166cd6896..4a3729c018 100644 --- a/mpvcore/lua/osc.lua +++ b/mpvcore/lua/osc.lua @@ -651,13 +651,19 @@ function osc_init() end - if user_opts.vidscale == true then + if user_opts.vidscale then osc_param.playresy = baseResY / scale else osc_param.playresy = display_h / scale end osc_param.playresx = osc_param.playresy * display_aspect + -- make sure the OSC actually fits into the video + if (osc_param.playresx < (osc_param.osc_w + (2 * osc_param.osc_p))) then + osc_param.playresy = (osc_param.osc_w + (2 * osc_param.osc_p)) / display_aspect + osc_param.playresx = osc_param.playresy * display_aspect + end + -- position of the controller according to video aspect and valignment osc_param.posX = math.floor(get_align(user_opts.halign, osc_param.playresx, osc_param.osc_w, 0)) osc_param.posY = math.floor(get_align(user_opts.valign, osc_param.playresy, osc_param.osc_h, 0)) |