mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-10-06 19:18:55 +02:00
2 unmerged PRs from original Ryujinx:
Implement shader compile counter (currently not translated, will change, need to pull changes.) Remove event logic in favor of a single init function. Thanks @MutantAura
This commit is contained in:
committed by
KeatonTheBot
parent
da0b784679
commit
e9dea85064
@@ -10,8 +10,10 @@ namespace Ryujinx.Ava.UI.Models
|
||||
public string DockedMode { get; }
|
||||
public string FifoStatus { get; }
|
||||
public string GameStatus { get; }
|
||||
|
||||
public uint ShaderCount { get; }
|
||||
|
||||
public StatusUpdatedEventArgs(string vSyncMode, string volumeStatus, string dockedMode, string aspectRatio, string gameStatus, string fifoStatus)
|
||||
public StatusUpdatedEventArgs(string vSyncMode, string volumeStatus, string dockedMode, string aspectRatio, string gameStatus, string fifoStatus, uint shaderCount)
|
||||
{
|
||||
VSyncMode = vSyncMode;
|
||||
VolumeStatus = volumeStatus;
|
||||
@@ -19,6 +21,7 @@ namespace Ryujinx.Ava.UI.Models
|
||||
AspectRatio = aspectRatio;
|
||||
GameStatus = gameStatus;
|
||||
FifoStatus = fifoStatus;
|
||||
ShaderCount = shaderCount;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ using DynamicData;
|
||||
using DynamicData.Alias;
|
||||
using DynamicData.Binding;
|
||||
using FluentAvalonia.UI.Controls;
|
||||
using Gommon;
|
||||
using LibHac.Common;
|
||||
using Ryujinx.Ava.Common;
|
||||
using Ryujinx.Ava.Common.Locale;
|
||||
@@ -69,7 +70,9 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||
private string _gameStatusText;
|
||||
private string _volumeStatusText;
|
||||
private string _gpuStatusText;
|
||||
private string _shaderCountText;
|
||||
private bool _isAmiiboRequested;
|
||||
private bool _showRightmostSeparator;
|
||||
private bool _isAmiiboBinRequested;
|
||||
private bool _isGameRunning;
|
||||
private bool _isFullScreen;
|
||||
@@ -324,6 +327,17 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||
|
||||
public bool ShowFirmwareStatus => !ShowLoadProgress;
|
||||
|
||||
public bool ShowRightmostSeparator
|
||||
{
|
||||
get => _showRightmostSeparator;
|
||||
set
|
||||
{
|
||||
_showRightmostSeparator = value;
|
||||
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsGameRunning
|
||||
{
|
||||
get => _isGameRunning;
|
||||
@@ -680,6 +694,16 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
|
||||
public string ShaderCountText
|
||||
{
|
||||
get => _shaderCountText;
|
||||
set
|
||||
{
|
||||
_shaderCountText = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
|
||||
public string BackendText
|
||||
{
|
||||
@@ -1473,8 +1497,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||
private void InitializeGame()
|
||||
{
|
||||
RendererHostControl.WindowCreated += RendererHost_Created;
|
||||
|
||||
AppHost.StatusInitEvent += Init_StatusBar;
|
||||
|
||||
AppHost.StatusUpdatedEvent += Update_StatusBar;
|
||||
AppHost.AppExit += AppHost_AppExit;
|
||||
|
||||
@@ -1501,18 +1524,6 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
private void Init_StatusBar(object sender, StatusInitEventArgs args)
|
||||
{
|
||||
if (ShowMenuAndStatusBar && !ShowLoadProgress)
|
||||
{
|
||||
Dispatcher.UIThread.InvokeAsync(() =>
|
||||
{
|
||||
GpuNameText = args.GpuName;
|
||||
BackendText = args.GpuBackend;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void Update_StatusBar(object sender, StatusUpdatedEventArgs args)
|
||||
{
|
||||
if (ShowMenuAndStatusBar && !ShowLoadProgress)
|
||||
@@ -1536,6 +1547,8 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||
GameStatusText = args.GameStatus;
|
||||
VolumeStatusText = args.VolumeStatus;
|
||||
FifoStatusText = args.FifoStatus;
|
||||
ShaderCountText = args.ShaderCount > 0 ? $"Compiling shaders: {args.ShaderCount}" : string.Empty;
|
||||
ShowRightmostSeparator = !ShaderCountText.IsNullOrEmpty();
|
||||
|
||||
ShowStatusSeparator = true;
|
||||
});
|
||||
|
||||
@@ -325,6 +325,19 @@
|
||||
IsVisible="{Binding !ShowLoadProgress}"
|
||||
Text="{Binding GpuNameText}"
|
||||
TextAlignment="Start" />
|
||||
<Border
|
||||
Width="2"
|
||||
Height="12"
|
||||
Margin="0"
|
||||
BorderBrush="Gray"
|
||||
BorderThickness="1"
|
||||
IsVisible="{Binding ShowRightmostSeparator}" />
|
||||
<TextBlock
|
||||
Name="ShaderCount"
|
||||
Margin="5,0,5,0"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding ShaderCountText}" />
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
Grid.Column="3"
|
||||
|
||||
Reference in New Issue
Block a user