Skip to content

Commit

Permalink
修复Steam Beta版库存游戏加载不出游戏详情和名称
Browse files Browse the repository at this point in the history
修复成就管理无法打开
修复库存游戏首次加载后,游戏加载失败提示文本依然存在
  • Loading branch information
rmbadmin committed Dec 18, 2022
1 parent 40b4696 commit 5509004
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 15 deletions.
2 changes: 1 addition & 1 deletion references/SteamAchievementManager
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@
Maximum="65535"/>
</DockPanel>-->

<DockPanel>
<TextBlock Text="IPV6支持:" />
<TextBlock Text="IPV6地址" ></TextBlock>
<Button Content="{ReflectionBinding Path=Res.Refresh,Mode=OneWay,Source={x:Static resx:R.Current}}"></Button>
</DockPanel>

<DockPanel>
<TextBlock Text="{ReflectionBinding Path=Res.CommunityFix_AutoRunProxy,Mode=OneWay,Source={x:Static resx:R.Current}}" ></TextBlock>
<ToggleSwitch
Expand All @@ -59,13 +65,13 @@
<ToggleSwitch
IsChecked="{ReflectionBinding Source={x:Static ms:ProxySettings.OnlyEnableProxyScript},Path=Value, Mode=TwoWay}"/>
</DockPanel>

<DockPanel>
<TextBlock Text="{ReflectionBinding Path=Res.CommunityFix_EnableHttpProxyToHttps,Mode=OneWay,Source={x:Static resx:R.Current}}" ></TextBlock>
<ToggleSwitch
IsChecked="{ReflectionBinding Source={x:Static ms:ProxySettings.EnableHttpProxyToHttps},Path=Value, Mode=TwoWay}"/>
</DockPanel>

<!--<DockPanel>
<Label Content="自定义根证书密码"></Label>
<TextBox></TextBox>
Expand All @@ -86,11 +92,13 @@
</DockPanel>
</Expander.Header>
<StackPanel Spacing="10">
--><!--<DockPanel>
-->
<!--<DockPanel>
<TextBlock Text="启用" ></TextBlock>
<ToggleSwitch
IsChecked="{ReflectionBinding Source={x:Static ms:ProxySettings.Socks5ProxyEnable},Path=Value, Mode=TwoWay}"/>
</DockPanel>--><!--
</DockPanel>-->
<!--
<DockPanel>
<Label Content="{ReflectionBinding Path=Res.Settings_Proxy_ProxyPort,Mode=OneWay,Source={x:Static resx:R.Current}}"></Label>
<NumericUpDown Maximum="65535"
Expand All @@ -109,11 +117,13 @@
</DockPanel>
</Expander.Header>
<StackPanel Spacing="10">
--><!--<DockPanel>
-->
<!--<DockPanel>
<TextBlock Text="启用" ></TextBlock>
<ToggleSwitch
IsChecked="{ReflectionBinding Source={x:Static ms:ProxySettings.TwoLevelAgentEnable},Path=Value, Mode=TwoWay}"/>
</DockPanel>--><!--
</DockPanel>-->
<!--
<DockPanel>
<Label Content="{ReflectionBinding Path=Res.Settings_Proxy_ProxyType,Mode=OneWay,Source={x:Static resx:R.Current}}"></Label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ namespace System.Application.Services.Implementation
{
internal sealed class DnsAnalysisServiceImpl : IDnsAnalysisService
{
public DnsAnalysisServiceImpl()
{

}

private static readonly LookupClient lookupClient = new();

public async Task<int> AnalysisHostnameTime(string url, CancellationToken cancellationToken = default)
Expand Down Expand Up @@ -141,6 +146,11 @@ public async Task<bool> GetIsIpv6Support()
}
return false;
}

public async Task<IPAddress?> GetHostIpv6Addres()
{
return null;
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -556,15 +556,15 @@ List<SteamApp> GetAppInfos_()
}
using BinaryReader binaryReader = new(stream);
uint num = binaryReader.ReadUInt32();
if (num != MagicNumberV2 && num != MagicNumber)
if (num is not MagicNumberV2 or MagicNumber)
{
Log.Error(nameof(GetAppInfos), string.Format("\"{0}\" magic code is not supported: 0x{1:X8}", Path.GetFileName(AppInfoPath), num));
return apps;
}
SteamApp? app = new();
univeseNumber = binaryReader.ReadUInt32();
var installAppIds = GetInstalledAppIds();
while ((app = SteamApp.FromReader(binaryReader, installAppIds, isSaveProperties)) != null)
while ((app = SteamApp.FromReader(binaryReader, installAppIds, isSaveProperties, num == MagicNumberV2)) != null)
{
if (app.AppId > 0)
{
Expand Down
5 changes: 4 additions & 1 deletion src/ST.Client/Models/Steam/SteamApp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ select prop.GetValue<SteamAppPropertyTable>()
return this;
}

public static SteamApp? FromReader(BinaryReader reader, uint[]? installedAppIds = null, bool isSaveProperties = false)
public static SteamApp? FromReader(BinaryReader reader, uint[]? installedAppIds = null, bool isSaveProperties = false, bool is0x07564428 = true)
{
uint id = reader.ReadUInt32();
if (id == 0)
Expand All @@ -825,6 +825,9 @@ select prop.GetValue<SteamAppPropertyTable>()
binaryReader.ReadBytes(20);
app._changeNumber = binaryReader.ReadUInt32();

if (is0x07564428)
binaryReader.ReadBytes(20);

var properties = SteamAppPropertyHelper.ReadPropertyTable(binaryReader);

if (properties == null)
Expand Down
4 changes: 3 additions & 1 deletion src/ST.Client/Services/IDnsAnalysisService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ async IAsyncEnumerable<IPAddress> AnalysisDomainIpAsync(string hostNameOrAddress
/// <param name="isIPv6"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
IAsyncEnumerable<IPAddress>? DohAnalysisDomainIpAsync(string hostNameOrAddress, string? dnsServers, bool isIPv6, CancellationToken cancellationToken = default)
IAsyncEnumerable<IPAddress>? DohAnalysisDomainIpAsync(string hostNameOrAddress, string? dnsServers, bool isIPv6, CancellationToken cancellationToken = default)
{
return null;
}
Expand All @@ -146,5 +146,7 @@ async IAsyncEnumerable<IPAddress> AnalysisDomainIpAsync(string hostNameOrAddress
}

Task<bool> GetIsIpv6Support() => Task.FromResult(false);

Task<IPAddress?> GetHostIpv6Addres() => Task.FromResult(default(IPAddress));
}
}
8 changes: 4 additions & 4 deletions src/ST.Client/UI/ViewModels/Pages/GameListPageViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,6 @@ public GameListPageViewModel()
this.RaisePropertyChanged(nameof(TypeFilterString));
}));

SteamConnectService.Current.WhenAnyValue(x => x.IsLoadingGameList)
.Subscribe(_ => this.RaisePropertyChanged(nameof(IsSteamAppsEmpty)));

SteamConnectService.Current.SteamApps
.Connect()
.Filter(nameFilter)
Expand All @@ -144,6 +141,9 @@ public GameListPageViewModel()
CalcTypeCount();
});

SteamConnectService.Current.WhenAnyValue(x => x.IsLoadingGameList)
.Subscribe(_ => this.RaisePropertyChanged(nameof(IsSteamAppsEmpty)));

HideAppCommand = ReactiveCommand.Create(() =>
{
IWindowManager.Instance.Show(CustomWindow.HideApp, resizeMode: ResizeMode.CanResize);
Expand Down Expand Up @@ -217,7 +217,7 @@ public override void Deactivation()
[Reactive]
public string? SearchText { get; set; }

public bool IsSteamAppsEmpty => !SteamApps.Any_Nullable() && !SteamConnectService.Current.IsLoadingGameList;
public bool IsSteamAppsEmpty => !SteamConnectService.Current.SteamApps.Items.Any_Nullable() && !SteamConnectService.Current.IsLoadingGameList;

[Reactive]
public ObservableCollection<EnumModel<SteamAppType>>? AppTypeFiltres { get; set; }
Expand Down

0 comments on commit 5509004

Please sign in to comment.