Showing the changes to player/lua/osc.lua (1 of 1 file). Show all
Unified · Split
| @@ -222,6 +222,15 @@ local function set_osd(res_x, res_y, text, z) · 221 unmodified lines | |||
| 222 | state.osd:update() | 222 | state.osd:update() |
| 223 | end | 223 | end |
| 224 | 224 | ||
| 225 | local function set_time_styles(timetotal_changed, timems_changed) | ||
| 226 | if timetotal_changed then | ||
| 227 | state.rightTC_trem = not user_opts.timetotal | ||
| 228 | end | ||
| 229 | if timems_changed then | ||
| 230 | state.tc_ms = user_opts.timems | ||
| 231 | end | ||
| 232 | end | ||
| 233 | |||
| 225 | -- scale factor for translating between real and virtual ASS coordinates | 234 | -- scale factor for translating between real and virtual ASS coordinates |
| 226 | local function get_virt_scale_factor() | 235 | local function get_virt_scale_factor() |
| 227 | local w, h = mp.get_osd_size() | 236 | local w, h = mp.get_osd_size() |
| @@ -2984,6 +2993,7 @@ end · 2756 unmodified lines | |||
| 2984 | opt.read_options(user_opts, "osc", function(changed) | 2993 | opt.read_options(user_opts, "osc", function(changed) |
| 2985 | validate_user_opts() | 2994 | validate_user_opts() |
| 2986 | set_osc_styles() | 2995 | set_osc_styles() |
| 2996 | set_time_styles(changed.timetotal, changed.timems) | ||
| 2987 | if changed.tick_delay or changed.tick_delay_follow_display_fps then | 2997 | if changed.tick_delay or changed.tick_delay_follow_display_fps then |
| 2988 | set_tick_delay("display_fps", mp.get_property_number("display_fps")) | 2998 | set_tick_delay("display_fps", mp.get_property_number("display_fps")) |
| 2989 | end | 2999 | end |
| @@ -2995,6 +3005,7 @@ end) · 5 unmodified lines | |||
| 2995 | 3005 | ||
| 2996 | validate_user_opts() | 3006 | validate_user_opts() |
| 2997 | set_osc_styles() | 3007 | set_osc_styles() |
| 3008 | set_time_styles(true, true) | ||
| 2998 | set_tick_delay("display_fps", mp.get_property_number("display_fps")) | 3009 | set_tick_delay("display_fps", mp.get_property_number("display_fps")) |
| 2999 | visibility_mode(user_opts.visibility, true) | 3010 | visibility_mode(user_opts.visibility, true) |
| 3000 | update_duration_watch() | 3011 | update_duration_watch() |