mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2025-01-23 05:24:56 +03:00
misc: chore: Remove status update event stuff in Headless
This commit is contained in:
parent
ade2f256e0
commit
6fca4492d0
@ -1,21 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace Ryujinx.Headless
|
||||
{
|
||||
class StatusUpdatedEventArgs(
|
||||
string vSyncMode,
|
||||
string dockedMode,
|
||||
string aspectRatio,
|
||||
string gameStatus,
|
||||
string fifoStatus,
|
||||
string gpuName)
|
||||
: EventArgs
|
||||
{
|
||||
public string VSyncMode = vSyncMode;
|
||||
public string DockedMode = dockedMode;
|
||||
public string AspectRatio = aspectRatio;
|
||||
public string GameStatus = gameStatus;
|
||||
public string FifoStatus = fifoStatus;
|
||||
public string GpuName = gpuName;
|
||||
}
|
||||
}
|
@ -1,13 +1,12 @@
|
||||
using Humanizer;
|
||||
using LibHac.Tools.Fs;
|
||||
using Ryujinx.Ava;
|
||||
using Ryujinx.Ava.UI.Models;
|
||||
using Ryujinx.Common;
|
||||
using Ryujinx.Common.Configuration;
|
||||
using Ryujinx.Common.Configuration.Hid;
|
||||
using Ryujinx.Common.Logging;
|
||||
using Ryujinx.Graphics.GAL;
|
||||
using Ryujinx.Graphics.GAL.Multithreading;
|
||||
using Ryujinx.Graphics.Gpu;
|
||||
using Ryujinx.Graphics.OpenGL;
|
||||
using Ryujinx.HLE.HOS.Applets;
|
||||
using Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.ApplicationProxy.Types;
|
||||
@ -54,8 +53,6 @@ namespace Ryujinx.Headless
|
||||
public Switch Device { get; private set; }
|
||||
public IRenderer Renderer { get; private set; }
|
||||
|
||||
public event EventHandler<StatusUpdatedEventArgs> StatusUpdatedEvent;
|
||||
|
||||
protected nint WindowHandle { get; set; }
|
||||
|
||||
public IHostUITheme HostUITheme { get; }
|
||||
@ -164,6 +161,8 @@ namespace Ryujinx.Headless
|
||||
}
|
||||
}
|
||||
|
||||
private StatusUpdatedEventArgs _lastStatus;
|
||||
|
||||
private void InitializeWindow()
|
||||
{
|
||||
var activeProcess = Device.Processes.ActiveApplication;
|
||||
@ -309,21 +308,6 @@ namespace Ryujinx.Headless
|
||||
|
||||
if (_ticks >= _ticksPerFrame)
|
||||
{
|
||||
string dockedMode = Device.System.State.DockedMode ? "Docked" : "Handheld";
|
||||
float scale = GraphicsConfig.ResScale;
|
||||
if (scale != 1)
|
||||
{
|
||||
dockedMode += $" ({scale}x)";
|
||||
}
|
||||
|
||||
StatusUpdatedEvent?.Invoke(this, new StatusUpdatedEventArgs(
|
||||
Device.VSyncMode.ToString(),
|
||||
dockedMode,
|
||||
Device.Configuration.AspectRatio.ToText(),
|
||||
$"{Device.Statistics.GetGameFrameRate():00.00} FPS ({Device.Statistics.GetGameFrameTime():00.00} ms)",
|
||||
$"FIFO: {Device.Statistics.GetFifoPercent():0.00} %",
|
||||
$"GPU: {_gpuDriverName}"));
|
||||
|
||||
_ticks = Math.Min(_ticks - _ticksPerFrame, _ticksPerFrame);
|
||||
}
|
||||
}
|
||||
|
@ -22,5 +22,22 @@ namespace Ryujinx.Ava.UI.Models
|
||||
FifoStatus = fifoStatus;
|
||||
ShaderCount = shaderCount;
|
||||
}
|
||||
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj is not StatusUpdatedEventArgs suea) return false;
|
||||
return
|
||||
VSyncMode == suea.VSyncMode &&
|
||||
VolumeStatus == suea.VolumeStatus &&
|
||||
DockedMode == suea.DockedMode &&
|
||||
AspectRatio == suea.AspectRatio &&
|
||||
GameStatus == suea.GameStatus &&
|
||||
FifoStatus == suea.FifoStatus &&
|
||||
ShaderCount == suea.ShaderCount;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
=> HashCode.Combine(VSyncMode, VolumeStatus, AspectRatio, DockedMode, FifoStatus, GameStatus, ShaderCount);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user