Add GPU name in status bar (#984)
* Add GPU name in status bar * Fixed like Ac_K suggest * Nit. * Minor fix * Minor change. * Nit. * Fixed for ATI vendor * Minor fix, again...
This commit is contained in:
parent
1de16f7653
commit
17200214df
5 changed files with 50 additions and 8 deletions
|
@ -19,6 +19,12 @@ namespace Ryujinx.Graphics.OpenGL
|
||||||
|
|
||||||
internal TextureCopy TextureCopy { get; }
|
internal TextureCopy TextureCopy { get; }
|
||||||
|
|
||||||
|
public string GpuVendor { get; private set; }
|
||||||
|
|
||||||
|
public string GpuRenderer { get; private set; }
|
||||||
|
|
||||||
|
public string GpuVersion { get; private set; }
|
||||||
|
|
||||||
public Renderer()
|
public Renderer()
|
||||||
{
|
{
|
||||||
_pipeline = new Pipeline();
|
_pipeline = new Pipeline();
|
||||||
|
@ -78,11 +84,11 @@ namespace Ryujinx.Graphics.OpenGL
|
||||||
|
|
||||||
private void PrintGpuInformation()
|
private void PrintGpuInformation()
|
||||||
{
|
{
|
||||||
string gpuVendor = GL.GetString(StringName.Vendor);
|
GpuVendor = GL.GetString(StringName.Vendor);
|
||||||
string gpuRenderer = GL.GetString(StringName.Renderer);
|
GpuRenderer = GL.GetString(StringName.Renderer);
|
||||||
string gpuVersion = GL.GetString(StringName.Version);
|
GpuVersion = GL.GetString(StringName.Version);
|
||||||
|
|
||||||
Logger.PrintInfo(LogClass.Gpu, $"{gpuVendor} {gpuRenderer} ({gpuVersion})");
|
Logger.PrintInfo(LogClass.Gpu, $"{GpuVendor} {GpuRenderer} ({GpuVersion})");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ResetCounter(CounterType type)
|
public void ResetCounter(CounterType type)
|
||||||
|
|
|
@ -335,10 +335,17 @@ namespace Ryujinx.Ui
|
||||||
|
|
||||||
_device.Statistics.RecordSystemFrameTime();
|
_device.Statistics.RecordSystemFrameTime();
|
||||||
|
|
||||||
|
string gpuVendor = "Unknown";
|
||||||
|
|
||||||
|
if (_renderer.GpuVendor.ToLower().Contains("nvidia")) gpuVendor = "NVIDIA";
|
||||||
|
if (_renderer.GpuVendor.ToLower().Contains("amd") || _renderer.GpuVendor.ToLower().Contains("ati")) gpuVendor = "AMD";
|
||||||
|
if (_renderer.GpuVendor.ToLower().Contains("intel")) gpuVendor = "Intel";
|
||||||
|
|
||||||
StatusUpdatedEvent?.Invoke(this, new StatusUpdatedEventArgs(
|
StatusUpdatedEvent?.Invoke(this, new StatusUpdatedEventArgs(
|
||||||
_device.EnableDeviceVsync,
|
_device.EnableDeviceVsync,
|
||||||
$"Host: {_device.Statistics.GetSystemFrameRate():00.00} FPS",
|
$"Host: {_device.Statistics.GetSystemFrameRate():00.00} FPS",
|
||||||
$"Game: {_device.Statistics.GetGameFrameRate():00.00} FPS"));
|
$"Game: {_device.Statistics.GetGameFrameRate():00.00} FPS",
|
||||||
|
$"GPU: {gpuVendor}"));
|
||||||
|
|
||||||
_device.System.SignalVsync();
|
_device.System.SignalVsync();
|
||||||
|
|
||||||
|
|
|
@ -71,6 +71,7 @@ namespace Ryujinx.Ui
|
||||||
[GUI] TreeView _gameTable;
|
[GUI] TreeView _gameTable;
|
||||||
[GUI] ScrolledWindow _gameTableWindow;
|
[GUI] ScrolledWindow _gameTableWindow;
|
||||||
[GUI] TreeSelection _gameTableSelection;
|
[GUI] TreeSelection _gameTableSelection;
|
||||||
|
[GUI] Label _gpuName;
|
||||||
[GUI] Label _progressLabel;
|
[GUI] Label _progressLabel;
|
||||||
[GUI] Label _firmwareVersionLabel;
|
[GUI] Label _firmwareVersionLabel;
|
||||||
[GUI] LevelBar _progressBar;
|
[GUI] LevelBar _progressBar;
|
||||||
|
@ -605,6 +606,7 @@ namespace Ryujinx.Ui
|
||||||
{
|
{
|
||||||
_hostStatus.Text = args.HostStatus;
|
_hostStatus.Text = args.HostStatus;
|
||||||
_gameStatus.Text = args.GameStatus;
|
_gameStatus.Text = args.GameStatus;
|
||||||
|
_gpuName.Text = args.GpuName;
|
||||||
|
|
||||||
if (args.VSyncEnabled)
|
if (args.VSyncEnabled)
|
||||||
{
|
{
|
||||||
|
|
|
@ -475,7 +475,7 @@
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="halign">start</property>
|
<property name="halign">start</property>
|
||||||
<property name="margin_left">10</property>
|
<property name="margin_left">5</property>
|
||||||
<property name="margin_right">5</property>
|
<property name="margin_right">5</property>
|
||||||
<property name="label" translatable="yes">VSync</property>
|
<property name="label" translatable="yes">VSync</property>
|
||||||
</object>
|
</object>
|
||||||
|
@ -527,11 +527,36 @@
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="halign">start</property>
|
<property name="halign">start</property>
|
||||||
<property name="margin_left">5</property>
|
<property name="margin_left">5</property>
|
||||||
|
<property name="margin_right">5</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">4</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSeparator">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">5</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="_gpuName">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="halign">start</property>
|
||||||
|
<property name="margin_left">5</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">True</property>
|
<property name="expand">True</property>
|
||||||
<property name="fill">True</property>
|
<property name="fill">True</property>
|
||||||
<property name="position">4</property>
|
<property name="position">6</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
|
|
@ -7,12 +7,14 @@ namespace Ryujinx.Ui
|
||||||
public bool VSyncEnabled;
|
public bool VSyncEnabled;
|
||||||
public string HostStatus;
|
public string HostStatus;
|
||||||
public string GameStatus;
|
public string GameStatus;
|
||||||
|
public string GpuName;
|
||||||
|
|
||||||
public StatusUpdatedEventArgs(bool vSyncEnabled, string hostStatus, string gameStatus)
|
public StatusUpdatedEventArgs(bool vSyncEnabled, string hostStatus, string gameStatus, string gpuName)
|
||||||
{
|
{
|
||||||
VSyncEnabled = vSyncEnabled;
|
VSyncEnabled = vSyncEnabled;
|
||||||
HostStatus = hostStatus;
|
HostStatus = hostStatus;
|
||||||
GameStatus = gameStatus;
|
GameStatus = gameStatus;
|
||||||
|
GpuName = gpuName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue