Compare commits

...

1 Commits

Author SHA1 Message Date
qhy040404
09a2d930be minor fix 2024-02-29 14:14:23 +08:00
2 changed files with 32 additions and 31 deletions

View File

@@ -40,8 +40,6 @@ internal sealed partial class DiscordService : IDiscordService, IDisposable
}
private bool IsSupported()
{
try
{
// Actually requires a discord client to be running on Windows platform.
// If not, discord core creation code will throw.
@@ -62,6 +60,7 @@ internal sealed partial class DiscordService : IDiscordService, IDisposable
{
if (!isInitialized)
{
isInitialized = true;
infoBarService.Warning(SH.ServiceDiscordActivityElevationRequiredHint);
}
@@ -71,9 +70,4 @@ internal sealed partial class DiscordService : IDiscordService, IDisposable
return true;
}
finally
{
isInitialized = true;
}
}
}

View File

@@ -22,9 +22,16 @@ internal sealed class LaunchExecutionBetterGenshinImpactAutomationHandlder : ILa
{
Uri betterGenshinImpactUri = "bettergi://start".ToUri();
if (await Launcher.QueryUriSupportAsync(betterGenshinImpactUri, LaunchQuerySupportType.Uri) is LaunchQuerySupportStatus.Available)
{
try
{
context.Logger.LogInformation("Waiting game window to be ready");
context.Process.WaitForInputIdle();
}
catch (InvalidOperationException)
{
return;
}
context.Logger.LogInformation("Launching BetterGI");
await Launcher.LaunchUriAsync(betterGenshinImpactUri);