Made the display update sooner when launching steam deck software

This commit is contained in:
dlprows 2023-09-10 22:16:16 -06:00
parent 2e44a27b2b
commit 1fea2a2e11

View File

@ -70,6 +70,7 @@ public class DialAction : EncoderBase
_thread.Start(); _thread.Start();
_currentAudioSession = settings.FallbackBehavior == FallbackBehavior.SystemSounds ? _audioHelper.GetSystemSounds() : _audioHelper.GetSystemVolume(); _currentAudioSession = settings.FallbackBehavior == FallbackBehavior.SystemSounds ? _audioHelper.GetSystemSounds() : _audioHelper.GetSystemVolume();
_ = UpdateStateIfNeeded();
} }
public override async void DialDown(DialPayload payload) public override async void DialDown(DialPayload payload)
@ -174,6 +175,9 @@ public class DialAction : EncoderBase
private async Task UpdateStateIfNeeded() private async Task UpdateStateIfNeeded()
{ {
try
{
if (_currentAudioSession != null) if (_currentAudioSession != null)
{ {
@ -196,6 +200,11 @@ public class DialAction : EncoderBase
_previousState = uiState; _previousState = uiState;
} }
} }
catch (Exception ex )
{
Logger.Instance.LogMessage(TracingLevel.ERROR, $"Failed to update screen\n {ex}");
}
}
public override void ReceivedGlobalSettings(ReceivedGlobalSettingsPayload payload) public override void ReceivedGlobalSettings(ReceivedGlobalSettingsPayload payload)