Commit 70a5e265 authored by Naohiro KORIYAMA's avatar Naohiro KORIYAMA Committed by Felix Paul Kühne

Fix misleading Playback Speed string on menu.

When increasing speed to 1.50 (command + =), '1.50x' is shown on OSD, but '10x' is shown on menu (Playback -> 'Playback Speed').
Signed-off-by: default avatarFelix Paul Kühne <fkuehne@videolan.org>
parent 72332b75
......@@ -544,9 +544,8 @@ static VLCMainMenu *_o_sharedInstance = nil;
[o_mi_rate_sld setEnabled: b_enabled];
[o_mi_rate_sld setIntValue: [[VLCCoreInteraction sharedInstance] playbackRate]];
int i = [[VLCCoreInteraction sharedInstance] playbackRate];
if (i == 0)
i = 1;
[o_mi_rate_fld setStringValue: [NSString stringWithFormat:@"%ix", i]];
double speed = pow( 2, (double)i / 17 );
[o_mi_rate_fld setStringValue: [NSString stringWithFormat:@"%.2fx", speed]];
if (b_enabled) {
[o_mi_rate_lbl setHidden: NO];
[o_mi_rate_lbl_gray setHidden: YES];
......@@ -598,17 +597,15 @@ static VLCMainMenu *_o_sharedInstance = nil;
{
[[VLCCoreInteraction sharedInstance] setPlaybackRate: [o_mi_rate_sld intValue]];
int i = [[VLCCoreInteraction sharedInstance] playbackRate];
if (i == 0)
i = 1;
[o_mi_rate_fld setStringValue: [NSString stringWithFormat:@"%ix", i]];
double speed = pow( 2, (double)i / 17 );
[o_mi_rate_fld setStringValue: [NSString stringWithFormat:@"%.2fx", speed]];
}
- (void)updatePlaybackRate
{
int i = [[VLCCoreInteraction sharedInstance] playbackRate];
if (i == 0)
i = 1;
[o_mi_rate_fld setStringValue: [NSString stringWithFormat:@"%ix", i]];
double speed = pow( 2, (double)i / 17 );
[o_mi_rate_fld setStringValue: [NSString stringWithFormat:@"%.2fx", speed]];
[o_mi_rate_sld setIntValue: i];
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment