Skip to content

Commit 479bdec

Browse files
authored
Merge pull request #308 from ionite34/input-prompts
2 parents e299c64 + c7e7f07 commit 479bdec

File tree

5 files changed

+36
-4
lines changed

5 files changed

+36
-4
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning 2.0](https://semver.org/spec/v2
88
## v2.5.5
99
### Added
1010
- Added Spanish UI language options, thanks to Carlos Baena and Lautaroturina for the translations
11+
- Manual input prompt popup on package input requests besides Y/n confirmations
12+
- Added `--disable-gpu` launch argument to disable hardware accelerated rendering
1113
### Fixed
1214
- Fixed infinite progress wheel when package uninstall fails
1315

StabilityMatrix.Avalonia/Models/AppArgs.cs

+5
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,9 @@ public class AppArgs
3535
/// Flag to indicate if we should reset the saved window position back to (O,0)
3636
/// </summary>
3737
public bool ResetWindowPosition { get; set; }
38+
39+
/// <summary>
40+
/// Flag for disabling hardware acceleration / GPU rendering
41+
/// </summary>
42+
public bool DisableGpuRendering { get; set; }
3843
}

StabilityMatrix.Avalonia/Program.cs

+23-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
using Avalonia.Controls;
1313
using Avalonia.Controls.ApplicationLifetimes;
1414
using Avalonia.Threading;
15-
using FluentAvalonia.Core;
1615
using NLog;
1716
using Polly.Contrib.WaitAndRetry;
1817
using Projektanker.Icons.Avalonia;
@@ -54,6 +53,7 @@ public static void Main(string[] args)
5453
Args.NoSentry = args.Contains("--no-sentry");
5554
Args.NoWindowChromeEffects = args.Contains("--no-window-chrome-effects");
5655
Args.ResetWindowPosition = args.Contains("--reset-window-position");
56+
Args.DisableGpuRendering = args.Contains("--disable-gpu");
5757

5858
SetDebugBuild();
5959

@@ -90,7 +90,28 @@ public static AppBuilder BuildAvaloniaApp()
9090
ImageLoader.AsyncImageLoader.Dispose();
9191
ImageLoader.AsyncImageLoader = new FallbackRamCachedWebImageLoader();
9292

93-
return AppBuilder.Configure<App>().UsePlatformDetect().WithInterFont().LogToTrace();
93+
var app = AppBuilder.Configure<App>().UsePlatformDetect().WithInterFont().LogToTrace();
94+
95+
if (Args.DisableGpuRendering)
96+
{
97+
app = app.With(
98+
new Win32PlatformOptions
99+
{
100+
RenderingMode = new[] { Win32RenderingMode.Software }
101+
}
102+
)
103+
.With(
104+
new X11PlatformOptions { RenderingMode = new[] { X11RenderingMode.Software } }
105+
)
106+
.With(
107+
new AvaloniaNativePlatformOptions
108+
{
109+
RenderingMode = new[] { AvaloniaNativeRenderingMode.Software }
110+
}
111+
);
112+
}
113+
114+
return app;
94115
}
95116

96117
private static void HandleUpdateReplacement()

StabilityMatrix.Avalonia/StabilityMatrix.Avalonia.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>WinExe</OutputType>
44
<TargetFramework>net7.0</TargetFramework>
@@ -8,7 +8,7 @@
88
<ApplicationManifest>app.manifest</ApplicationManifest>
99
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
1010
<ApplicationIcon>./Assets/Icon.ico</ApplicationIcon>
11-
<Version>2.5.3-dev.1</Version>
11+
<Version>2.5.5-dev.1</Version>
1212
<InformationalVersion>$(Version)</InformationalVersion>
1313
<EnableWindowsTargeting>true</EnableWindowsTargeting>
1414
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>

StabilityMatrix.Avalonia/ViewModels/LaunchPageViewModel.cs

+4
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,10 @@ ServiceManager<ViewModelBase> dialogFactory
146146
{
147147
ShowConfirmInputPrompt = true;
148148
}
149+
else
150+
{
151+
ShowManualInputPrompt = true;
152+
}
149153
};
150154
}
151155

0 commit comments

Comments
 (0)