Skip to content

Commit db34978

Browse files
committed
1.8.8
[Bug fixes] - Removed UWP apps caused empty settings.
1 parent d286298 commit db34978

File tree

3 files changed

+20
-4
lines changed

3 files changed

+20
-4
lines changed

Source/AutoHDR.Audio/AudioController.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public void UpdateDevices()
5454
{
5555
lock (_lockDevices)
5656
{
57-
List<CoreAudioDevice> devices = Controller.GetDevices(AudioSwitcher.AudioApi.DeviceState.Active).ToList();
57+
List<CoreAudioDevice> devices = Controller.GetDevices(AudioSwitcher.AudioApi.DeviceState.All).ToList();
5858

5959
List<AudioDevice> outputAudioDevices = new List<AudioDevice>();
6060
List<AudioDevice> inputAudioDevices = new List<AudioDevice>();

Source/AutoHDR/Applications/ApplicationItem.cs

+17-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ namespace AutoHDR
2121
[JsonObject(MemberSerialization.OptIn)]
2222
public class ApplicationItem : BaseViewModel, IEquatable<ApplicationItem>
2323
{
24+
[JsonProperty]
25+
public bool PackageError { get; set; } = false;
2426
private bool _isUWP = false;
2527
private bool _isUWPWebApp = false;
2628

@@ -97,6 +99,8 @@ public ApplicationItem(UWPApp uwpApp) : this(uwpApp.Name, uwpApp.ExecutablePath)
9799

98100
private void LoadUWPData()
99101
{
102+
string packageNotFound = "[PackageNotFound]_";
103+
100104
if (!IsUWP && !IsUWPWepApp)
101105
return;
102106
UWPApp uwpApp;
@@ -105,7 +109,19 @@ private void LoadUWPData()
105109
uwpApp = UWPAppsManager.GetUWPApp(UWPFamilyPackageName, UWPApplicationID);
106110
else
107111
uwpApp = UWPAppsManager.GetUWPApp(UWPFullPackageName);
108-
112+
if (uwpApp == null)
113+
{
114+
if (PackageError)
115+
return;
116+
DisplayName = $"{packageNotFound}{DisplayName}";
117+
UWPIconPath = "";
118+
UWPIdentity = "";
119+
PackageError = true;
120+
return;
121+
}
122+
PackageError = false;
123+
if (DisplayName.StartsWith(packageNotFound))
124+
DisplayName = DisplayName.Substring(packageNotFound.Length, DisplayName.Length - packageNotFound.Length);
109125
UWPFamilyPackageName = uwpApp.FamilyPackageName;
110126
_uwpFullPackageName = uwpApp.FullPackageName;
111127
_uwpApplicationID = uwpApp.ApplicationID;

Source/AutoHDR/Properties/AssemblyInfo.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,5 @@
5252
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
5353
// indem Sie "*" wie unten gezeigt eingeben:
5454
// [assembly: AssemblyVersion("1.0.*")]
55-
[assembly: AssemblyVersion("1.8.7.0")]
56-
[assembly: AssemblyFileVersion("1.8.7.0")]
55+
[assembly: AssemblyVersion("1.8.8.0")]
56+
[assembly: AssemblyFileVersion("1.8.8.0")]

0 commit comments

Comments
 (0)