History

stats.lua: rename a variable

Guido Cella committed 2 years ago

Commit e34f6561 parent 63a81511 file · +6 −7Browse files

Unified · Split

player/lua/stats.lua+6−7
@@ -1525,7 +1525,7 @@ local function print_page(page, after_scroll) · 1524 unmodified lines
15251525 end
15261526 end
15271527
1528−local function update_scale(value)
1528+local function update_scale(osd_height)
15291529 local scale_with_video
15301530 if o.vidscale == "auto" then
15311531 scale_with_video = mp.get_property_native("osd-scale-by-window")
@@ -1535,8 +1535,8 @@ local function update_scale(value) · 3 unmodified lines
15351535
15361536 -- Calculate scaled metrics.
15371537 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
15401540 end
15411541 font_size = o.font_size * scale
15421542 border_size = o.border_size * scale
@@ -1548,13 +1548,12 @@ local function update_scale(value) · 5 unmodified lines
15481548 end
15491549 end
15501550
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)
15531553 end
15541554
15551555 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"))
15581557 end
15591558
15601559 local function clear_screen()

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t