diff options
author | ChrisK2 <spam@kalania.de> | 2013-10-06 23:44:46 +0200 |
---|---|---|
committer | ChrisK2 <spam@kalania.de> | 2013-10-06 23:44:46 +0200 |
commit | 99adbe1e7ca136f98ba542a86bfbd5907ac0fc09 (patch) | |
tree | a540770582c81df8798be8cd0247656322b93914 /mpvcore | |
parent | 55883943c5da2cc224753daeeca0124ebbbd30d9 (diff) | |
download | mpv-99adbe1e7ca136f98ba542a86bfbd5907ac0fc09.tar.bz2 mpv-99adbe1e7ca136f98ba542a86bfbd5907ac0fc09.tar.xz |
osc: Add another scale option for forced windows.
If the OSC is rendered on a forced window (by --force-window), the scale can be configured with scaleForcedWindow.
Diffstat (limited to 'mpvcore')
-rw-r--r-- | mpvcore/lua/osc.lua | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/mpvcore/lua/osc.lua b/mpvcore/lua/osc.lua index 7b4069b87c..aa3bb44ea5 100644 --- a/mpvcore/lua/osc.lua +++ b/mpvcore/lua/osc.lua @@ -14,6 +14,7 @@ local user_opts = { showFullscreen = true, -- show OSC when fullscreen? scaleWindowed = 1, -- scaling of the controller when windowed scaleFullscreen = 1, -- scaling of the controller when fullscreen + scaleForcedWindow = 2, -- scaling of the controller when rendered on a forced (dummy) window vidscale = true, -- scale the controller with the video? valign = 0.8, -- vertical alignment, -1 (top) to 1 (bottom) halign = 0, -- horizontal alignment, -1 (left) to 1 (right) @@ -86,14 +87,14 @@ function typeconv(desttypeval, val) elseif val == "no" then val = false else - msg.error("Error: Can't convert " .. val .." to boolean!") + msg.error("Error: Can't convert " .. val .. " to boolean!") val = nil end elseif type(desttypeval) == "number" then if not (tonumber(val) == nil) then val = tonumber(val) else - msg.error("Error: Can't convert " .. val .." to number!") + msg.error("Error: Can't convert " .. val .. " to number!") val = nil end end @@ -645,7 +646,9 @@ function osc_init() local display_w, display_h, display_aspect = mp.get_screen_size() local scale = 1 - if (mp.property_get("fullscreen") == "yes") then + if (mp.property_get("video") == "no") then -- dummy/forced window + scale = user_opts.scaleForcedWindow + elseif (mp.property_get("fullscreen") == "yes") then scale = user_opts.scaleFullscreen else scale = user_opts.scaleWindowed |