[vlc-commits] [Git][videolan/vlc][master] 2 commits: control: hotkeys: fix scaling factor computation
Jean-Baptiste Kempf (@jbk)
gitlab at videolan.org
Thu Jul 8 10:20:04 UTC 2021
Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC
Commits:
7e13498f by Francois Cartegnie at 2021-07-08T09:42:57+00:00
control: hotkeys: fix scaling factor computation
regression by f9c971daef80a953aa5b0f97da63d986dced0b60
- - - - -
f54729f3 by Francois Cartegnie at 2021-07-08T09:42:57+00:00
control: hotkeys: fix handling of text scaling
- - - - -
1 changed file:
- modules/control/hotkeys.c
Changes:
=====================================
modules/control/hotkeys.c
=====================================
@@ -937,14 +937,14 @@ VOUT_ACTION_HANDLER(SubtitleDisplay)
default:
{
// FIXME all vouts
- char const *varname = "sub-text-scale";
+ vlc_player_t *player = vlc_playlist_GetPlayer(sys->playlist);
int scale;
if (action_id == ACTIONID_SUBTITLE_TEXT_SCALE_NORMAL)
scale = 100;
else
{
- scale = var_GetInteger(vout, varname);
- unsigned delta = (scale > 100 ? scale - 100 : 100 - scale) / 25;
+ scale = vlc_player_GetSubtitleTextScale(player);
+ int delta = (scale > 100 ? scale - 100 : 100 - scale) / 25;
delta = delta <= 1 ? 10 : 25;
if (action_id == ACTIONID_SUBTITLE_TEXT_SCALE_DOWN)
delta = -delta;
@@ -952,7 +952,7 @@ VOUT_ACTION_HANDLER(SubtitleDisplay)
scale -= scale % delta;
scale = VLC_CLIP(scale, 25, 500);
}
- var_SetInteger(vout, varname, scale);
+ vlc_player_SetSubtitleTextScale(player, scale);
break;
}
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/296e18b19c189a4e7409e7a34f897bb21dfdc1fa...f54729f303df4c4759a4ea29257b8f06e517a72c
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/296e18b19c189a4e7409e7a34f897bb21dfdc1fa...f54729f303df4c4759a4ea29257b8f06e517a72c
You're receiving this email because of your account on code.videolan.org.
More information about the vlc-commits
mailing list