mirror of
https://git.ryujinx.app/kenji-nx/ryujinx.git
synced 2025-12-17 07:37:06 +00: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:
parent
da0b784679
commit
e9dea85064
9 changed files with 99 additions and 31 deletions
|
|
@ -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;
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue