Fix mpv subtitles cut off when zoomed in (#166)
* Fix MPV subtitles zoom in Closes #162 Some .ass subtitles will still be broken due to their forced stylings unless stripped. * Move everything in a single if statement Co-authored-by: Jarne Demeulemeester <jarnedemeulemeester@gmail.com>
This commit is contained in:
parent
1216322b4a
commit
86ea79b0b4
1 changed files with 10 additions and 2 deletions
|
@ -1208,8 +1208,16 @@ class MPVPlayer(
|
|||
}
|
||||
|
||||
fun updateZoomMode(enabled: Boolean) {
|
||||
val level = if (enabled) "1" else "0"
|
||||
MPVLib.setOptionString("panscan", level)
|
||||
if (enabled) {
|
||||
MPVLib.setOptionString("panscan", "1")
|
||||
MPVLib.setOptionString("sub-use-margins", "yes")
|
||||
MPVLib.setOptionString("sub-ass-force-margins", "yes")
|
||||
}
|
||||
else {
|
||||
MPVLib.setOptionString("panscan", "0")
|
||||
MPVLib.setOptionString("sub-use-margins", "no")
|
||||
MPVLib.setOptionString("sub-ass-force-margins", "no")
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
|
Loading…
Reference in a new issue