Showing the changes to player/lua/stats.lua (1 of 1 file). Show all
Unified · Split
| @@ -1525,7 +1525,7 @@ local function print_page(page, after_scroll) · 1524 unmodified lines | ||
| 1525 | 1525 | end |
| 1526 | 1526 | end |
| 1527 | 1527 | |
| 1528 | −local function update_scale(value) | |
| 1528 | +local function update_scale(osd_height) | |
| 1529 | 1529 | local scale_with_video |
| 1530 | 1530 | if o.vidscale == "auto" then |
| 1531 | 1531 | scale_with_video = mp.get_property_native("osd-scale-by-window") |
| @@ -1535,8 +1535,8 @@ local function update_scale(value) · 3 unmodified lines | ||
| 1535 | 1535 | |
| 1536 | 1536 | -- Calculate scaled metrics. |
| 1537 | 1537 | local scale = 1 |
| 1538 | − if not scale_with_video and value > 0 then | |
| 1539 | − scale = 720 / value | |
| 1538 | + if not scale_with_video and osd_height > 0 then | |
| 1539 | + scale = 720 / osd_height | |
| 1540 | 1540 | end |
| 1541 | 1541 | font_size = o.font_size * scale |
| 1542 | 1542 | border_size = o.border_size * scale |
| @@ -1548,13 +1548,12 @@ local function update_scale(value) · 5 unmodified lines | ||
| 1548 | 1548 | end |
| 1549 | 1549 | end |
| 1550 | 1550 | |
| 1551 | −local function handle_osd_height_update(_, value) | |
| 1552 | − update_scale(value) | |
| 1551 | +local function handle_osd_height_update(_, osd_height) | |
| 1552 | + update_scale(osd_height) | |
| 1553 | 1553 | end |
| 1554 | 1554 | |
| 1555 | 1555 | local function handle_osd_scale_by_window_update() |
| 1556 | − local value = mp.get_property_native("osd-height") | |
| 1557 | − update_scale(value) | |
| 1556 | + update_scale(mp.get_property_native("osd-height")) | |
| 1558 | 1557 | end |
| 1559 | 1558 | |
| 1560 | 1559 | local function clear_screen() |