Initial work
This commit is contained in:
parent
f617fb542a
commit
1876b346fe
518 changed files with 15170 additions and 12486 deletions
|
@ -79,10 +79,11 @@
|
|||
<ItemGroup>
|
||||
<ProjectReference Include="..\Ryujinx.Audio\Ryujinx.Audio.csproj" />
|
||||
<ProjectReference Include="..\Ryujinx.Common\Ryujinx.Common.csproj" />
|
||||
<ProjectReference Include="..\Ryujinx.Graphics\Ryujinx.Graphics.csproj" />
|
||||
<ProjectReference Include="..\Ryujinx.HLE\Ryujinx.HLE.csproj" />
|
||||
<ProjectReference Include="..\Ryujinx.Profiler\Ryujinx.Profiler.csproj" />
|
||||
<ProjectReference Include="..\ARMeilleure\ARMeilleure.csproj" />
|
||||
<ProjectReference Include="..\Ryujinx.Graphics.OpenGL\Ryujinx.Graphics.OpenGL.csproj" />
|
||||
<ProjectReference Include="..\Ryujinx.Graphics.Gpu\Ryujinx.Graphics.Gpu.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -2,7 +2,7 @@ using OpenTK;
|
|||
using OpenTK.Graphics;
|
||||
using OpenTK.Input;
|
||||
using Ryujinx.Configuration;
|
||||
using Ryujinx.Graphics.Gal;
|
||||
using Ryujinx.Graphics.OpenGL;
|
||||
using Ryujinx.HLE;
|
||||
using Ryujinx.HLE.Input;
|
||||
using Ryujinx.Profiler.UI;
|
||||
|
@ -23,7 +23,7 @@ namespace Ryujinx.Ui
|
|||
|
||||
private Switch _device;
|
||||
|
||||
private IGalRenderer _renderer;
|
||||
private Renderer _renderer;
|
||||
|
||||
private HotkeyButtons _prevHotkeyButtons = 0;
|
||||
|
||||
|
@ -45,7 +45,7 @@ namespace Ryujinx.Ui
|
|||
private ProfileWindowManager _profileWindow;
|
||||
#endif
|
||||
|
||||
public GlScreen(Switch device, IGalRenderer renderer)
|
||||
public GlScreen(Switch device, Renderer renderer)
|
||||
: base(1280, 720,
|
||||
new GraphicsMode(), "Ryujinx", 0,
|
||||
DisplayDevice.Default, 3, 3,
|
||||
|
@ -59,7 +59,7 @@ namespace Ryujinx.Ui
|
|||
Location = new Point(
|
||||
(DisplayDevice.Default.Width / 2) - (Width / 2),
|
||||
(DisplayDevice.Default.Height / 2) - (Height / 2));
|
||||
|
||||
|
||||
#if USE_PROFILING
|
||||
// Start profile window, it will handle itself from there
|
||||
_profileWindow = new ProfileWindowManager();
|
||||
|
@ -70,6 +70,8 @@ namespace Ryujinx.Ui
|
|||
{
|
||||
MakeCurrent();
|
||||
|
||||
_renderer.InitializeCounters();
|
||||
|
||||
Stopwatch chrono = new Stopwatch();
|
||||
|
||||
chrono.Start();
|
||||
|
@ -85,13 +87,11 @@ namespace Ryujinx.Ui
|
|||
_device.ProcessFrame();
|
||||
}
|
||||
|
||||
_renderer.RunActions();
|
||||
|
||||
if (_resizeEvent)
|
||||
{
|
||||
_resizeEvent = false;
|
||||
|
||||
_renderer.RenderTarget.SetWindowSize(Width, Height);
|
||||
// TODO: Resize
|
||||
}
|
||||
|
||||
ticks += chrono.ElapsedTicks;
|
||||
|
@ -114,8 +114,6 @@ namespace Ryujinx.Ui
|
|||
|
||||
Visible = true;
|
||||
|
||||
_renderer.RenderTarget.SetWindowSize(Width, Height);
|
||||
|
||||
Context.MakeCurrent(null);
|
||||
|
||||
// OpenTK doesn't like sleeps in its thread, to avoid this a renderer thread is created
|
||||
|
@ -188,7 +186,7 @@ namespace Ryujinx.Ui
|
|||
Keys = new int[0x8]
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
currentButton |= _primaryController.GetButtons();
|
||||
|
||||
// Keyboard has priority stick-wise
|
||||
|
@ -296,7 +294,7 @@ namespace Ryujinx.Ui
|
|||
|
||||
private new void RenderFrame()
|
||||
{
|
||||
_renderer.RenderTarget.Render();
|
||||
_renderer.Window.Present();
|
||||
|
||||
_device.Statistics.RecordSystemFrameTime();
|
||||
|
||||
|
|
|
@ -3,8 +3,7 @@ using JsonPrettyPrinterPlus;
|
|||
using Ryujinx.Audio;
|
||||
using Ryujinx.Common.Logging;
|
||||
using Ryujinx.Configuration;
|
||||
using Ryujinx.Graphics.Gal;
|
||||
using Ryujinx.Graphics.Gal.OpenGL;
|
||||
using Ryujinx.Graphics.OpenGL;
|
||||
using Ryujinx.HLE.FileSystem;
|
||||
using Ryujinx.Profiler;
|
||||
using System;
|
||||
|
@ -25,7 +24,7 @@ namespace Ryujinx.Ui
|
|||
{
|
||||
private static HLE.Switch _device;
|
||||
|
||||
private static IGalRenderer _renderer;
|
||||
private static Renderer _renderer;
|
||||
|
||||
private static IAalOutput _audioOut;
|
||||
|
||||
|
@ -74,12 +73,12 @@ namespace Ryujinx.Ui
|
|||
_gameTable.ButtonReleaseEvent += Row_Clicked;
|
||||
|
||||
bool continueWithStartup = Migration.PromptIfMigrationNeededForStartup(this, out bool migrationNeeded);
|
||||
if (!continueWithStartup)
|
||||
if (!continueWithStartup)
|
||||
{
|
||||
End();
|
||||
}
|
||||
|
||||
_renderer = new OglRenderer();
|
||||
_renderer = new Renderer();
|
||||
|
||||
_audioOut = InitializeAudioEngine();
|
||||
|
||||
|
@ -231,7 +230,7 @@ namespace Ryujinx.Ui
|
|||
Logger.RestartTime();
|
||||
|
||||
// TODO: Move this somewhere else + reloadable?
|
||||
GraphicsConfig.ShadersDumpPath = ConfigurationState.Instance.Graphics.ShadersDumpPath;
|
||||
Ryujinx.Graphics.Gpu.GraphicsConfig.ShadersDumpPath = ConfigurationState.Instance.Graphics.ShadersDumpPath;
|
||||
|
||||
if (Directory.Exists(path))
|
||||
{
|
||||
|
@ -406,11 +405,11 @@ namespace Ryujinx.Ui
|
|||
/// <returns>An <see cref="IAalOutput"/> supported by this machine</returns>
|
||||
private static IAalOutput InitializeAudioEngine()
|
||||
{
|
||||
if (SoundIoAudioOut.IsSupported)
|
||||
/*if (SoundIoAudioOut.IsSupported)
|
||||
{
|
||||
return new SoundIoAudioOut();
|
||||
}
|
||||
else if (OpenALAudioOut.IsSupported)
|
||||
else*/ if (OpenALAudioOut.IsSupported)
|
||||
{
|
||||
return new OpenALAudioOut();
|
||||
}
|
||||
|
@ -452,7 +451,7 @@ namespace Ryujinx.Ui
|
|||
IJsonFormatterResolver resolver = CompositeResolver.Create(new[] { StandardResolver.AllowPrivateSnakeCase });
|
||||
|
||||
ApplicationMetadata appMetadata;
|
||||
|
||||
|
||||
using (Stream stream = File.OpenRead(metadataPath))
|
||||
{
|
||||
appMetadata = JsonSerializer.Deserialize<ApplicationMetadata>(stream, resolver);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue