Commit 986796de authored by Felix Paul Kühne's avatar Felix Paul Kühne

Reset brightness slider value on appearance (fixes #14802)

(cherry picked from commit 31b830cd)
parent 7d182bc6
......@@ -450,6 +450,7 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
vpc.delegate = self;
[vpc recoverPlaybackState];
[self screenBrightnessChanged:nil];
[self setControlsHidden:NO animated:YES];
}
......@@ -1527,7 +1528,10 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
- (void)screenBrightnessChanged:(NSNotification *)notification
{
self.brightnessSlider.value = [(UIScreen *)notification.object brightness] * 2.;
if (notification)
self.brightnessSlider.value = [(UIScreen *)notification.object brightness] * 2.;
else if (![[UIDevice currentDevice] hasExternalDisplay])
self.brightnessSlider.value = [[[UIScreen screens] firstObject] brightness] * 2.;
}
#pragma mark - playback view
......
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