Address last issues
This commit is contained in:
parent
98f2773db4
commit
4ef17f66c4
15 changed files with 45 additions and 48 deletions
|
@ -311,13 +311,13 @@ namespace Ryujinx.Configuration
|
||||||
ControllerType = Hid.ControllerType,
|
ControllerType = Hid.ControllerType,
|
||||||
GuiColumns = new GuiColumns()
|
GuiColumns = new GuiColumns()
|
||||||
{
|
{
|
||||||
FavColumn = Ui.GuiColumns.FavColumn,
|
FavColumn = Ui.GuiColumns.FavColumn,
|
||||||
IconColumn = Ui.GuiColumns.IconColumn,
|
IconColumn = Ui.GuiColumns.IconColumn,
|
||||||
AppColumn = Ui.GuiColumns.AppColumn,
|
AppColumn = Ui.GuiColumns.AppColumn,
|
||||||
DevColumn = Ui.GuiColumns.DevColumn,
|
DevColumn = Ui.GuiColumns.DevColumn,
|
||||||
VersionColumn = Ui.GuiColumns.VersionColumn,
|
VersionColumn = Ui.GuiColumns.VersionColumn,
|
||||||
TimePlayedColumn = Ui.GuiColumns.TimePlayedColumn,
|
TimePlayedColumn = Ui.GuiColumns.TimePlayedColumn,
|
||||||
LastPlayedColumn = Ui.GuiColumns.LastPlayedColumn,
|
LastPlayedColumn = Ui.GuiColumns.LastPlayedColumn,
|
||||||
FileExtColumn = Ui.GuiColumns.FileExtColumn,
|
FileExtColumn = Ui.GuiColumns.FileExtColumn,
|
||||||
FileSizeColumn = Ui.GuiColumns.FileSizeColumn,
|
FileSizeColumn = Ui.GuiColumns.FileSizeColumn,
|
||||||
PathColumn = Ui.GuiColumns.PathColumn,
|
PathColumn = Ui.GuiColumns.PathColumn,
|
||||||
|
|
|
@ -40,6 +40,6 @@
|
||||||
Hat2Up,
|
Hat2Up,
|
||||||
Hat2Down,
|
Hat2Down,
|
||||||
Hat2Left,
|
Hat2Left,
|
||||||
Hat2Right,
|
Hat2Right
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,6 @@
|
||||||
Handheld,
|
Handheld,
|
||||||
NpadPair,
|
NpadPair,
|
||||||
NpadLeft,
|
NpadLeft,
|
||||||
NpadRight,
|
NpadRight
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@ namespace Ryujinx.Common.Logging
|
||||||
|
|
||||||
m_Time = Stopwatch.StartNew();
|
m_Time = Stopwatch.StartNew();
|
||||||
|
|
||||||
// logger should log to console by default
|
// Logger should log to console by default
|
||||||
AddTarget(new AsyncLogTargetWrapper(
|
AddTarget(new AsyncLogTargetWrapper(
|
||||||
new ConsoleLogTarget("console"),
|
new ConsoleLogTarget("console"),
|
||||||
1000,
|
1000,
|
||||||
|
|
|
@ -27,7 +27,7 @@ namespace Ryujinx.Common.Logging
|
||||||
|
|
||||||
private readonly int _overflowTimeout;
|
private readonly int _overflowTimeout;
|
||||||
|
|
||||||
string ILogTarget.Name { get => _target.Name; set => throw new NotImplementedException(); }
|
string ILogTarget.Name { get => _target.Name; }
|
||||||
|
|
||||||
public AsyncLogTargetWrapper(ILogTarget target)
|
public AsyncLogTargetWrapper(ILogTarget target)
|
||||||
: this(target, -1, AsyncLogTargetOverflowAction.Block)
|
: this(target, -1, AsyncLogTargetOverflowAction.Block)
|
||||||
|
|
|
@ -11,7 +11,7 @@ namespace Ryujinx.Common.Logging
|
||||||
|
|
||||||
private readonly string _name;
|
private readonly string _name;
|
||||||
|
|
||||||
string ILogTarget.Name { get => _name; set => throw new NotImplementedException(); }
|
string ILogTarget.Name { get => _name; }
|
||||||
|
|
||||||
static ConsoleLogTarget()
|
static ConsoleLogTarget()
|
||||||
{
|
{
|
||||||
|
|
|
@ -12,7 +12,7 @@ namespace Ryujinx.Common.Logging
|
||||||
private readonly ILogFormatter _formatter;
|
private readonly ILogFormatter _formatter;
|
||||||
private readonly string _name;
|
private readonly string _name;
|
||||||
|
|
||||||
string ILogTarget.Name { get => _name; set => throw new NotImplementedException(); }
|
string ILogTarget.Name { get => _name; }
|
||||||
|
|
||||||
public FileLogTarget(string path, string name)
|
public FileLogTarget(string path, string name)
|
||||||
: this(path, name, FileShare.Read, FileMode.Append)
|
: this(path, name, FileShare.Read, FileMode.Append)
|
||||||
|
|
|
@ -6,6 +6,6 @@ namespace Ryujinx.Common.Logging
|
||||||
{
|
{
|
||||||
void Log(object sender, LogEventArgs args);
|
void Log(object sender, LogEventArgs args);
|
||||||
|
|
||||||
string Name { get; protected set; }
|
string Name { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ namespace Ryujinx.Common.Logging
|
||||||
private bool _leaveOpen;
|
private bool _leaveOpen;
|
||||||
private string _name;
|
private string _name;
|
||||||
|
|
||||||
string ILogTarget.Name { get => _name; set => throw new NotImplementedException(); }
|
string ILogTarget.Name { get => _name; }
|
||||||
|
|
||||||
public JsonLogTarget(Stream stream, string name)
|
public JsonLogTarget(Stream stream, string name)
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,7 +14,7 @@ namespace Ryujinx.Common
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
_readerWriterLock.AcquireReaderLock(int.MaxValue);
|
_readerWriterLock.AcquireReaderLock(Timeout.Infinite);
|
||||||
T value = _value;
|
T value = _value;
|
||||||
_readerWriterLock.ReleaseReaderLock();
|
_readerWriterLock.ReleaseReaderLock();
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ namespace Ryujinx.Common
|
||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_readerWriterLock.AcquireWriterLock(int.MaxValue);
|
_readerWriterLock.AcquireWriterLock(Timeout.Infinite);
|
||||||
|
|
||||||
T oldValue = _value;
|
T oldValue = _value;
|
||||||
|
|
||||||
|
@ -45,8 +45,8 @@ namespace Ryujinx.Common
|
||||||
|
|
||||||
public class ReactiveEventArgs<T>
|
public class ReactiveEventArgs<T>
|
||||||
{
|
{
|
||||||
public T OldValue { get; private set; }
|
public T OldValue { get; }
|
||||||
public T NewValue { get; private set; }
|
public T NewValue { get; }
|
||||||
|
|
||||||
public ReactiveEventArgs(T oldValue, T newValue)
|
public ReactiveEventArgs(T oldValue, T newValue)
|
||||||
{
|
{
|
||||||
|
|
|
@ -70,7 +70,7 @@ namespace Ryujinx.HLE
|
||||||
|
|
||||||
EnableDeviceVsync = ConfigurationState.Instance.Graphics.EnableVsync;
|
EnableDeviceVsync = ConfigurationState.Instance.Graphics.EnableVsync;
|
||||||
|
|
||||||
// TODO: Make this relodable and implement Docking/UnDocking logic.
|
// TODO: Make this reloadable and implement Docking/Undocking logic.
|
||||||
System.State.DockedMode = ConfigurationState.Instance.System.EnableDockedMode;
|
System.State.DockedMode = ConfigurationState.Instance.System.EnableDockedMode;
|
||||||
|
|
||||||
if (ConfigurationState.Instance.System.EnableMulticoreScheduling)
|
if (ConfigurationState.Instance.System.EnableMulticoreScheduling)
|
||||||
|
|
|
@ -10,6 +10,8 @@ namespace Ryujinx.Configuration
|
||||||
{
|
{
|
||||||
private static DiscordRpcClient DiscordClient;
|
private static DiscordRpcClient DiscordClient;
|
||||||
|
|
||||||
|
private static string LARGE_DESCRIPTION = "Ryujinx is a Nintendo Switch emulator.";
|
||||||
|
|
||||||
public static RichPresence DiscordPresence { get; private set; }
|
public static RichPresence DiscordPresence { get; private set; }
|
||||||
|
|
||||||
public static void Initialize()
|
public static void Initialize()
|
||||||
|
@ -19,7 +21,7 @@ namespace Ryujinx.Configuration
|
||||||
Assets = new Assets
|
Assets = new Assets
|
||||||
{
|
{
|
||||||
LargeImageKey = "ryujinx",
|
LargeImageKey = "ryujinx",
|
||||||
LargeImageText = "Ryujinx is an emulator for the Nintendo Switch"
|
LargeImageText = LARGE_DESCRIPTION
|
||||||
},
|
},
|
||||||
Details = "Main Menu",
|
Details = "Main Menu",
|
||||||
State = "Idling",
|
State = "Idling",
|
||||||
|
@ -81,7 +83,7 @@ namespace Ryujinx.Configuration
|
||||||
DiscordPresence.State = state;
|
DiscordPresence.State = state;
|
||||||
DiscordPresence.Assets.LargeImageText = titleName;
|
DiscordPresence.Assets.LargeImageText = titleName;
|
||||||
DiscordPresence.Assets.SmallImageKey = "ryujinx";
|
DiscordPresence.Assets.SmallImageKey = "ryujinx";
|
||||||
DiscordPresence.Assets.SmallImageText = "Ryujinx is a Nintendo Switch emulator";
|
DiscordPresence.Assets.SmallImageText = LARGE_DESCRIPTION;
|
||||||
DiscordPresence.Timestamps = new Timestamps(DateTime.UtcNow);
|
DiscordPresence.Timestamps = new Timestamps(DateTime.UtcNow);
|
||||||
|
|
||||||
DiscordClient?.SetPresence(DiscordPresence);
|
DiscordClient?.SetPresence(DiscordPresence);
|
||||||
|
|
|
@ -30,7 +30,7 @@ namespace Ryujinx
|
||||||
|
|
||||||
string configurationPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Config.json");
|
string configurationPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Config.json");
|
||||||
|
|
||||||
// Now load the configuration as the other subsystem are now registered
|
// Now load the configuration as the other subsystems are now registered
|
||||||
if (File.Exists(configurationPath))
|
if (File.Exists(configurationPath))
|
||||||
{
|
{
|
||||||
ConfigurationFileFormat configurationFileFormat = ConfigurationFileFormat.Load(configurationPath);
|
ConfigurationFileFormat configurationFileFormat = ConfigurationFileFormat.Load(configurationPath);
|
||||||
|
|
|
@ -160,28 +160,28 @@ namespace Ryujinx.Ui
|
||||||
CellRendererToggle favToggle = new CellRendererToggle();
|
CellRendererToggle favToggle = new CellRendererToggle();
|
||||||
favToggle.Toggled += FavToggle_Toggled;
|
favToggle.Toggled += FavToggle_Toggled;
|
||||||
|
|
||||||
if (ConfigurationState.Instance.Ui.GuiColumns.FavColumn) { _gameTable.AppendColumn("Fav", favToggle, "active", 0); }
|
if (ConfigurationState.Instance.Ui.GuiColumns.FavColumn) _gameTable.AppendColumn("Fav", favToggle, "active", 0);
|
||||||
if (ConfigurationState.Instance.Ui.GuiColumns.IconColumn) { _gameTable.AppendColumn("Icon", new CellRendererPixbuf(), "pixbuf", 1); }
|
if (ConfigurationState.Instance.Ui.GuiColumns.IconColumn) _gameTable.AppendColumn("Icon", new CellRendererPixbuf(), "pixbuf", 1);
|
||||||
if (ConfigurationState.Instance.Ui.GuiColumns.AppColumn) { _gameTable.AppendColumn("Application", new CellRendererText(), "text", 2); }
|
if (ConfigurationState.Instance.Ui.GuiColumns.AppColumn) _gameTable.AppendColumn("Application", new CellRendererText(), "text", 2);
|
||||||
if (ConfigurationState.Instance.Ui.GuiColumns.DevColumn) { _gameTable.AppendColumn("Developer", new CellRendererText(), "text", 3); }
|
if (ConfigurationState.Instance.Ui.GuiColumns.DevColumn) _gameTable.AppendColumn("Developer", new CellRendererText(), "text", 3);
|
||||||
if (ConfigurationState.Instance.Ui.GuiColumns.VersionColumn) { _gameTable.AppendColumn("Version", new CellRendererText(), "text", 4); }
|
if (ConfigurationState.Instance.Ui.GuiColumns.VersionColumn) _gameTable.AppendColumn("Version", new CellRendererText(), "text", 4);
|
||||||
if (ConfigurationState.Instance.Ui.GuiColumns.TimePlayedColumn) { _gameTable.AppendColumn("Time Played", new CellRendererText(), "text", 5); }
|
if (ConfigurationState.Instance.Ui.GuiColumns.TimePlayedColumn) _gameTable.AppendColumn("Time Played", new CellRendererText(), "text", 5);
|
||||||
if (ConfigurationState.Instance.Ui.GuiColumns.LastPlayedColumn) { _gameTable.AppendColumn("Last Played", new CellRendererText(), "text", 6); }
|
if (ConfigurationState.Instance.Ui.GuiColumns.LastPlayedColumn) _gameTable.AppendColumn("Last Played", new CellRendererText(), "text", 6);
|
||||||
if (ConfigurationState.Instance.Ui.GuiColumns.FileExtColumn) { _gameTable.AppendColumn("File Ext", new CellRendererText(), "text", 7); }
|
if (ConfigurationState.Instance.Ui.GuiColumns.FileExtColumn) _gameTable.AppendColumn("File Ext", new CellRendererText(), "text", 7);
|
||||||
if (ConfigurationState.Instance.Ui.GuiColumns.FileSizeColumn) { _gameTable.AppendColumn("File Size", new CellRendererText(), "text", 8); }
|
if (ConfigurationState.Instance.Ui.GuiColumns.FileSizeColumn) _gameTable.AppendColumn("File Size", new CellRendererText(), "text", 8);
|
||||||
if (ConfigurationState.Instance.Ui.GuiColumns.PathColumn) { _gameTable.AppendColumn("Path", new CellRendererText(), "text", 9); }
|
if (ConfigurationState.Instance.Ui.GuiColumns.PathColumn) _gameTable.AppendColumn("Path", new CellRendererText(), "text", 9);
|
||||||
|
|
||||||
foreach (TreeViewColumn column in _gameTable.Columns)
|
foreach (TreeViewColumn column in _gameTable.Columns)
|
||||||
{
|
{
|
||||||
if (column.Title == "Fav") { _favColumn = column; }
|
if (column.Title == "Fav") _favColumn = column;
|
||||||
else if (column.Title == "Application") { _appColumn = column; }
|
else if (column.Title == "Application") _appColumn = column;
|
||||||
else if (column.Title == "Developer") { _devColumn = column; }
|
else if (column.Title == "Developer") _devColumn = column;
|
||||||
else if (column.Title == "Version") { _versionColumn = column; }
|
else if (column.Title == "Version") _versionColumn = column;
|
||||||
else if (column.Title == "Time Played") { _timePlayedColumn = column; }
|
else if (column.Title == "Time Played") _timePlayedColumn = column;
|
||||||
else if (column.Title == "Last Played") { _lastPlayedColumn = column; }
|
else if (column.Title == "Last Played") _lastPlayedColumn = column;
|
||||||
else if (column.Title == "File Ext") { _fileExtColumn = column; }
|
else if (column.Title == "File Ext") _fileExtColumn = column;
|
||||||
else if (column.Title == "File Size") { _fileSizeColumn = column; }
|
else if (column.Title == "File Size") _fileSizeColumn = column;
|
||||||
else if (column.Title == "Path") { _pathColumn = column; }
|
else if (column.Title == "Path") _pathColumn = column;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ConfigurationState.Instance.Ui.GuiColumns.FavColumn) _favColumn.SortColumnId = 0;
|
if (ConfigurationState.Instance.Ui.GuiColumns.FavColumn) _favColumn.SortColumnId = 0;
|
||||||
|
@ -230,7 +230,7 @@ namespace Ryujinx.Ui
|
||||||
{
|
{
|
||||||
Logger.RestartTime();
|
Logger.RestartTime();
|
||||||
|
|
||||||
// TODO: move this somewhere else + reloadable?
|
// TODO: Move this somewhere else + reloadable?
|
||||||
GraphicsConfig.ShadersDumpPath = ConfigurationState.Instance.Graphics.ShadersDumpPath;
|
GraphicsConfig.ShadersDumpPath = ConfigurationState.Instance.Graphics.ShadersDumpPath;
|
||||||
|
|
||||||
if (Directory.Exists(path))
|
if (Directory.Exists(path))
|
||||||
|
@ -346,7 +346,6 @@ namespace Ryujinx.Ui
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private static void End()
|
private static void End()
|
||||||
{
|
{
|
||||||
if (_ending)
|
if (_ending)
|
||||||
|
|
|
@ -1,14 +1,10 @@
|
||||||
using Gtk;
|
using Gtk;
|
||||||
using Ryujinx.HLE.HOS.SystemState;
|
|
||||||
using Ryujinx.HLE.Input;
|
|
||||||
using Ryujinx.Ui.Input;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using Ryujinx.Configuration;
|
using Ryujinx.Configuration;
|
||||||
using Ryujinx.Common.Logging;
|
|
||||||
using Ryujinx.Configuration.System;
|
using Ryujinx.Configuration.System;
|
||||||
using Ryujinx.Configuration.Hid;
|
using Ryujinx.Configuration.Hid;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue