Commit 31b830cd authored by Felix Paul Kühne's avatar Felix Paul Kühne

Reset brightness slider value on appearance (fixes #14802)

parent 29bb59ad
......@@ -427,6 +427,7 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
vpc.delegate = self;
[vpc recoverPlaybackState];
[self screenBrightnessChanged:nil];
[self setControlsHidden:NO animated:YES];
}
......@@ -1488,7 +1489,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