Code style fixes and nits on the HLE project (#355)
* Some style fixes and nits on ITimeZoneService * Remove some unneeded usings * Remove the Ryujinx.HLE.OsHle.Handles namespace * Remove hbmenu automatic load on process exit * Rename Ns to Device, rename Os to System, rename SystemState to State * Move Exceptions and Utilities out of OsHle * Rename OsHle to HOS * Rename OsHle folder to HOS * IManagerDisplayService and ISystemDisplayService style fixes * BsdError shouldn't be public * Add a empty new line before using static * Remove unused file * Some style fixes on NPDM * Exit gracefully when the application is closed * Code style fixes on IGeneralService * Add 0x prefix on values printed as hex * Small improvements on finalization code * Move ProcessId and ThreadId out of AThreadState * Rename VFs to FileSystem * FsAccessHeader shouldn't be public. Also fix file names casing * More case changes on NPDM * Remove unused files * Move using to the correct place on NPDM * Use properties on KernelAccessControlMmio * Address PR feedback
This commit is contained in:
parent
182d716867
commit
521751795a
258 changed files with 1574 additions and 1546 deletions
|
@ -31,7 +31,7 @@ namespace Ryujinx
|
|||
Device.Log.SetEnable(LogLevel.Warning, Convert.ToBoolean(Parser.Value("Logging_Enable_Warn")));
|
||||
Device.Log.SetEnable(LogLevel.Error, Convert.ToBoolean(Parser.Value("Logging_Enable_Error")));
|
||||
|
||||
Device.Os.SystemState.DockedMode = Convert.ToBoolean(Parser.Value("Docked_Mode"));
|
||||
Device.System.State.DockedMode = Convert.ToBoolean(Parser.Value("Docked_Mode"));
|
||||
|
||||
string[] FilteredLogClasses = Parser.Value("Logging_Filtered_Classes").Split(',', StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@ using OpenTK.Input;
|
|||
using Ryujinx.Graphics.Gal;
|
||||
using Ryujinx.HLE;
|
||||
using Ryujinx.HLE.Input;
|
||||
using Ryujinx.UI.Input;
|
||||
using System;
|
||||
using System.Threading;
|
||||
|
||||
|
@ -19,7 +18,7 @@ namespace Ryujinx
|
|||
|
||||
private const int TargetFPS = 60;
|
||||
|
||||
private Switch Ns;
|
||||
private Switch Device;
|
||||
|
||||
private IGalRenderer Renderer;
|
||||
|
||||
|
@ -35,13 +34,13 @@ namespace Ryujinx
|
|||
|
||||
private string NewTitle;
|
||||
|
||||
public GLScreen(Switch Ns, IGalRenderer Renderer)
|
||||
public GLScreen(Switch Device, IGalRenderer Renderer)
|
||||
: base(1280, 720,
|
||||
new GraphicsMode(), "Ryujinx", 0,
|
||||
DisplayDevice.Default, 3, 3,
|
||||
GraphicsContextFlags.ForwardCompatible)
|
||||
{
|
||||
this.Ns = Ns;
|
||||
this.Device = Device;
|
||||
this.Renderer = Renderer;
|
||||
|
||||
Location = new Point(
|
||||
|
@ -63,9 +62,9 @@ namespace Ryujinx
|
|||
|
||||
while (Exists && !IsExiting)
|
||||
{
|
||||
if (Ns.WaitFifo())
|
||||
if (Device.WaitFifo())
|
||||
{
|
||||
Ns.ProcessFrame();
|
||||
Device.ProcessFrame();
|
||||
}
|
||||
|
||||
Renderer.RunActions();
|
||||
|
@ -152,7 +151,7 @@ namespace Ryujinx
|
|||
|
||||
//Controller Input
|
||||
CurrentButton |= Config.JoyConController.GetButtons();
|
||||
|
||||
|
||||
//Keyboard has priority stick-wise
|
||||
if (LeftJoystickDX == 0 && LeftJoystickDY == 0)
|
||||
{
|
||||
|
@ -163,7 +162,7 @@ namespace Ryujinx
|
|||
{
|
||||
(RightJoystickDX, RightJoystickDY) = Config.JoyConController.GetRightStick();
|
||||
}
|
||||
|
||||
|
||||
LeftJoystick = new HidJoystickPosition
|
||||
{
|
||||
DX = LeftJoystickDX,
|
||||
|
@ -226,23 +225,23 @@ namespace Ryujinx
|
|||
|
||||
HasTouch = true;
|
||||
|
||||
Ns.Hid.SetTouchPoints(CurrentPoint);
|
||||
Device.Hid.SetTouchPoints(CurrentPoint);
|
||||
}
|
||||
}
|
||||
|
||||
if (!HasTouch)
|
||||
{
|
||||
Ns.Hid.SetTouchPoints();
|
||||
Device.Hid.SetTouchPoints();
|
||||
}
|
||||
|
||||
Ns.Hid.SetJoyconButton(
|
||||
Device.Hid.SetJoyconButton(
|
||||
HidControllerId.CONTROLLER_HANDHELD,
|
||||
HidControllerLayouts.Handheld_Joined,
|
||||
CurrentButton,
|
||||
LeftJoystick,
|
||||
RightJoystick);
|
||||
|
||||
Ns.Hid.SetJoyconButton(
|
||||
Device.Hid.SetJoyconButton(
|
||||
HidControllerId.CONTROLLER_HANDHELD,
|
||||
HidControllerLayouts.Main,
|
||||
CurrentButton,
|
||||
|
@ -254,10 +253,10 @@ namespace Ryujinx
|
|||
{
|
||||
Renderer.FrameBuffer.Render();
|
||||
|
||||
Ns.Statistics.RecordSystemFrameTime();
|
||||
Device.Statistics.RecordSystemFrameTime();
|
||||
|
||||
double HostFps = Ns.Statistics.GetSystemFrameRate();
|
||||
double GameFps = Ns.Statistics.GetGameFrameRate();
|
||||
double HostFps = Device.Statistics.GetSystemFrameRate();
|
||||
double GameFps = Device.Statistics.GetGameFrameRate();
|
||||
|
||||
NewTitle = $"Ryujinx | Host FPS: {HostFps:0.0} | Game FPS: {GameFps:0.0}";
|
||||
|
||||
|
@ -265,7 +264,7 @@ namespace Ryujinx
|
|||
|
||||
SwapBuffers();
|
||||
|
||||
Ns.Os.SignalVsync();
|
||||
Device.System.SignalVsync();
|
||||
}
|
||||
|
||||
protected override void OnUnload(EventArgs e)
|
||||
|
|
|
@ -18,11 +18,11 @@ namespace Ryujinx
|
|||
|
||||
IAalOutput AudioOut = new OpenALAudioOut();
|
||||
|
||||
Switch Ns = new Switch(Renderer, AudioOut);
|
||||
Switch Device = new Switch(Renderer, AudioOut);
|
||||
|
||||
Config.Read(Ns);
|
||||
Config.Read(Device);
|
||||
|
||||
Ns.Log.Updated += ConsoleLog.PrintLog;
|
||||
Device.Log.Updated += ConsoleLog.PrintLog;
|
||||
|
||||
if (args.Length == 1)
|
||||
{
|
||||
|
@ -39,20 +39,20 @@ namespace Ryujinx
|
|||
{
|
||||
Console.WriteLine("Loading as cart with RomFS.");
|
||||
|
||||
Ns.LoadCart(args[0], RomFsFiles[0]);
|
||||
Device.LoadCart(args[0], RomFsFiles[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Loading as cart WITHOUT RomFS.");
|
||||
|
||||
Ns.LoadCart(args[0]);
|
||||
Device.LoadCart(args[0]);
|
||||
}
|
||||
}
|
||||
else if (File.Exists(args[0]))
|
||||
{
|
||||
Console.WriteLine("Loading as homebrew.");
|
||||
|
||||
Ns.LoadProgram(args[0]);
|
||||
Device.LoadProgram(args[0]);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -60,18 +60,14 @@ namespace Ryujinx
|
|||
Console.WriteLine("Please specify the folder with the NSOs/IStorage or a NSO/NRO.");
|
||||
}
|
||||
|
||||
using (GLScreen Screen = new GLScreen(Ns, Renderer))
|
||||
using (GLScreen Screen = new GLScreen(Device, Renderer))
|
||||
{
|
||||
Ns.Finish += (Sender, Args) =>
|
||||
{
|
||||
Screen.Exit();
|
||||
};
|
||||
|
||||
Screen.MainLoop();
|
||||
Ns.OnFinish(EventArgs.Empty);
|
||||
|
||||
Device.Dispose();
|
||||
}
|
||||
|
||||
Environment.Exit(0);
|
||||
AudioOut.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue