Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Remove goto for lua 5.1 compatiblity #113

Merged

Conversation

christoph-heinrich
Copy link
Contributor

@christoph-heinrich christoph-heinrich commented Aug 16, 2022

While I prefer the version with goto, I was recently made aware in one of me PRs for mpv that goto is not supported in lua 5.1. mpv supports lua 5.1 as minimum version, so user scripts should too.

Simply replaced the goto with a big if block.

While testing this I noticed that the notch at 100 sometimes shows and sometimes disappears depending on the position while dragging (and i confirmed it already did before my change). Must be some floating point thing.

goto was introduced in lua 5.2.
mpv supports lua 5.1, so user scripts should too.
@tomasklaen tomasklaen merged commit 1ba31c4 into tomasklaen:master Aug 16, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants