don't set timings less than 0

This commit is contained in:
Ren Tatsumoto 2023-06-17 15:59:39 +03:00
parent a2f9c367b1
commit 6cbf9ac3c5

View file

@ -384,7 +384,7 @@ main_menu.keybindings = {
}
function main_menu:set_time(property)
self.timings[property] = mp.get_property_number('time-pos')
self.timings[property] = math.max(0, mp.get_property_number('time-pos'))
self:update()
end
@ -397,7 +397,7 @@ function main_menu:set_time_sub(property)
return
end
self.timings[property] = time_pos + sub_delay
self.timings[property] = math.max(0, time_pos + sub_delay)
self:update()
end