mirror of
https://git.743378673.xyz/MeloNX/MeloNX.git
synced 2025-07-02 05:16:25 +02:00
Merge Latest Ryujinx (Unstable)
This commit is contained in:
parent
aaefc0a9e5
commit
12ab8bc3e2
1237 changed files with 48656 additions and 21399 deletions
|
@ -1,4 +1,4 @@
|
|||
using Ryujinx.HLE.Ui;
|
||||
using Ryujinx.HLE.UI;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
using Ryujinx.HLE.Ui;
|
||||
using Ryujinx.HLE.UI;
|
||||
|
||||
namespace Ryujinx.Headless.SDL2
|
||||
{
|
||||
internal class HeadlessHostUiTheme : IHostUiTheme
|
||||
internal class HeadlessHostUiTheme : IHostUITheme
|
||||
{
|
||||
public string FontFamily => "sans-serif";
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Ryujinx.Ui.Common.Helper;
|
||||
using Ryujinx.UI.Common.Helper;
|
||||
using System.Threading;
|
||||
|
||||
namespace Ryujinx.Headless.SDL2
|
||||
|
|
|
@ -96,6 +96,8 @@ namespace Ryujinx.Headless.SDL2.OpenGL
|
|||
}
|
||||
}
|
||||
|
||||
public bool HasContext() => SDL_GL_GetCurrentContext() != IntPtr.Zero;
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
SDL_GL_DeleteContext(_context);
|
||||
|
|
|
@ -222,7 +222,7 @@ namespace Ryujinx.Headless.SDL2
|
|||
|
||||
// Hacks
|
||||
|
||||
[Option("expand-ram", Required = false, Default = false, HelpText = "Expands the RAM amount on the emulated system from 4GiB to 6GiB.")]
|
||||
[Option("expand-ram", Required = false, Default = false, HelpText = "Expands the RAM amount on the emulated system from 4GiB to 8GiB.")]
|
||||
public bool ExpandRAM { get; set; }
|
||||
|
||||
[Option("ignore-missing-services", Required = false, Default = false, HelpText = "Enable ignoring missing services.")]
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
using ARMeilleure.Translation;
|
||||
using CommandLine;
|
||||
using LibHac.Tools.FsSystem;
|
||||
using Ryujinx.Audio.Backends.SDL2;
|
||||
|
@ -8,6 +7,7 @@ using Ryujinx.Common.Configuration.Hid;
|
|||
using Ryujinx.Common.Configuration.Hid.Controller;
|
||||
using Ryujinx.Common.Configuration.Hid.Controller.Motion;
|
||||
using Ryujinx.Common.Configuration.Hid.Keyboard;
|
||||
using Ryujinx.Common.GraphicsDriver;
|
||||
using Ryujinx.Common.Logging;
|
||||
using Ryujinx.Common.Logging.Targets;
|
||||
using Ryujinx.Common.SystemInterop;
|
||||
|
@ -19,6 +19,7 @@ using Ryujinx.Graphics.Gpu;
|
|||
using Ryujinx.Graphics.Gpu.Shader;
|
||||
using Ryujinx.Graphics.OpenGL;
|
||||
using Ryujinx.Graphics.Vulkan;
|
||||
using Ryujinx.Graphics.Vulkan.MoltenVK;
|
||||
using Ryujinx.Headless.SDL2.OpenGL;
|
||||
using Ryujinx.Headless.SDL2.Vulkan;
|
||||
using Ryujinx.HLE;
|
||||
|
@ -29,9 +30,9 @@ using Ryujinx.Input;
|
|||
using Ryujinx.Input.HLE;
|
||||
using Ryujinx.Input.SDL2;
|
||||
using Ryujinx.SDL2.Common;
|
||||
using Ryujinx.Ui.Common.Configuration;
|
||||
using Ryujinx.Ui.Common.Configuration.System;
|
||||
using Ryujinx.Ui.Common;
|
||||
using Ryujinx.UI.Common.Configuration;
|
||||
using Ryujinx.UI.Common.Configuration.System;
|
||||
using Ryujinx.UI.Common;
|
||||
using Silk.NET.Vulkan;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
@ -55,7 +56,7 @@ using LibHac.Tools.FsSystem;
|
|||
using Ryujinx.Graphics.GAL.Multithreading;
|
||||
using Ryujinx.Audio.Backends.Dummy;
|
||||
using Ryujinx.HLE.HOS.SystemState;
|
||||
using Ryujinx.Ui.Common.Configuration;
|
||||
using Ryujinx.UI.Common.Configuration;
|
||||
using Ryujinx.Common.Logging;
|
||||
using Ryujinx.Audio.Integration;
|
||||
using Ryujinx.Audio.Backends.SDL2;
|
||||
|
@ -74,13 +75,13 @@ using Ryujinx.Common.Configuration.Multiplayer;
|
|||
using Ryujinx.HLE.Loaders.Npdm;
|
||||
using Ryujinx.Common.Utilities;
|
||||
using System.Globalization;
|
||||
using Ryujinx.Ui.Common.Configuration.System;
|
||||
using Ryujinx.UI.Common.Configuration.System;
|
||||
using Ryujinx.Common.Logging.Targets;
|
||||
using System.Collections.Generic;
|
||||
using LibHac.Bcat;
|
||||
using Ryujinx.Ui.App.Common;
|
||||
using Ryujinx.UI.App.Common;
|
||||
using System.Text;
|
||||
using Ryujinx.HLE.Ui;
|
||||
using Ryujinx.HLE.UI;
|
||||
using ARMeilleure.Translation;
|
||||
using LibHac.Ncm;
|
||||
using LibHac.Tools.FsSystem.NcaUtils;
|
||||
|
@ -304,11 +305,9 @@ namespace Ryujinx.Headless.SDL2
|
|||
|
||||
Silk.NET.Core.Loader.SearchPathContainer.Platform = Silk.NET.Core.Loader.UnderlyingPlatform.MacOS;
|
||||
|
||||
Version = ReleaseInformation.GetVersion();
|
||||
|
||||
if (!OperatingSystem.IsIOS())
|
||||
{
|
||||
Console.Title = $"Ryujinx Console {Version} (Headless SDL2)";
|
||||
// Console.Title = $"Ryujinx Console {Version} (Headless SDL2)";
|
||||
}
|
||||
|
||||
if (OperatingSystem.IsMacOS() || OperatingSystem.IsIOS() || OperatingSystem.IsLinux())
|
||||
|
@ -331,14 +330,14 @@ namespace Ryujinx.Headless.SDL2
|
|||
};
|
||||
}
|
||||
|
||||
var result = Parser.Default.ParseArguments<Options>(args)
|
||||
.WithParsed(options =>
|
||||
{
|
||||
Load(options);
|
||||
})
|
||||
.WithNotParsed(errors => errors.Output());
|
||||
|
||||
if (OperatingSystem.IsMacOS())
|
||||
{
|
||||
MVKInitialization.InitializeResolver();
|
||||
}
|
||||
|
||||
Parser.Default.ParseArguments<Options>(args)
|
||||
.WithParsed(Load)
|
||||
.WithNotParsed(errors => errors.Output());
|
||||
}
|
||||
|
||||
[UnmanagedCallersOnly(EntryPoint = "install_firmware")]
|
||||
|
@ -408,11 +407,6 @@ namespace Ryujinx.Headless.SDL2
|
|||
{
|
||||
if (_window != null)
|
||||
{
|
||||
if (_window._isPaused) {
|
||||
_window._isPaused = false;
|
||||
} else {
|
||||
_window._isPaused = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1251,11 +1245,26 @@ namespace Ryujinx.Headless.SDL2
|
|||
|
||||
if (!option.DisableFileLog)
|
||||
{
|
||||
Logger.AddTarget(new AsyncLogTargetWrapper(
|
||||
new FileLogTarget(ReleaseInformation.GetBaseApplicationDirectory(), "file"),
|
||||
1000,
|
||||
AsyncLogTargetOverflowAction.Block
|
||||
));
|
||||
string logDir = AppDataManager.LogsDirPath;
|
||||
FileStream logFile = null;
|
||||
|
||||
if (!string.IsNullOrEmpty(logDir))
|
||||
{
|
||||
logFile = FileLogTarget.PrepareLogFile(logDir);
|
||||
}
|
||||
|
||||
if (logFile != null)
|
||||
{
|
||||
Logger.AddTarget(new AsyncLogTargetWrapper(
|
||||
new FileLogTarget("file", logFile),
|
||||
1000,
|
||||
AsyncLogTargetOverflowAction.Block
|
||||
));
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger.Error?.Print(LogClass.Application, "No writable log directory available. Make sure either the Logs directory, Application Data, or the Ryujinx directory is writable.");
|
||||
}
|
||||
}
|
||||
|
||||
// Setup graphics configuration
|
||||
|
@ -1266,6 +1275,8 @@ namespace Ryujinx.Headless.SDL2
|
|||
GraphicsConfig.ShadersDumpPath = option.GraphicsShadersDumpPath;
|
||||
GraphicsConfig.EnableMacroHLE = !option.DisableMacroHLE;
|
||||
|
||||
DriverUtilities.InitDriverConfig(option.BackendThreading == BackendThreading.Off);
|
||||
|
||||
while (true)
|
||||
{
|
||||
LoadApplication(option);
|
||||
|
@ -1389,7 +1400,7 @@ namespace Ryujinx.Headless.SDL2
|
|||
_userChannelPersistence,
|
||||
renderer,
|
||||
new SDL2HardwareDeviceDriver(),
|
||||
options.ExpandRAM ? MemoryConfiguration.MemoryConfiguration6GiB : MemoryConfiguration.MemoryConfiguration4GiB,
|
||||
options.ExpandRAM ? MemoryConfiguration.MemoryConfiguration8GiB : MemoryConfiguration.MemoryConfiguration4GiB,
|
||||
window,
|
||||
options.SystemLanguage,
|
||||
options.SystemRegion,
|
||||
|
@ -1588,9 +1599,6 @@ namespace Ryujinx.Headless.SDL2
|
|||
}
|
||||
|
||||
SetupProgressHandler();
|
||||
|
||||
Translator.IsReadyForTranslation.Reset();
|
||||
|
||||
ExecutionEntrypoint();
|
||||
|
||||
return true;
|
||||
|
|
|
@ -106,7 +106,7 @@
|
|||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CommandLineParser" />
|
||||
<PackageReference Include="Ryujinx.Graphics.Vulkan.Dependencies.MoltenVK" Condition="'$(RuntimeIdentifier)' != 'linux-x64' AND '$(RuntimeIdentifier)' != 'win-x64'" />
|
||||
<PackageReference Include="Ryujinx.Graphics.Vulkan.Dependencies.MoltenVK" Condition="'$(RuntimeIdentifier)' != 'linux-x64' AND '$(RuntimeIdentifier)' != 'linux-arm64' AND '$(RuntimeIdentifier)' != 'win-x64'" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -120,7 +120,7 @@
|
|||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(RuntimeIdentifier)' == 'linux-x64'">
|
||||
<ItemGroup Condition="'$(RuntimeIdentifier)' == 'linux-x64' OR '$(RuntimeIdentifier)' == 'linux-arm64' OR ('$(RuntimeIdentifier)' == '' AND $([MSBuild]::IsOSPlatform('Linux')))">
|
||||
<Content Include="..\..\distribution\linux\Ryujinx.sh">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
using ARMeilleure.Translation;
|
||||
using Ryujinx.Common.Configuration;
|
||||
using Ryujinx.Common.Configuration.Hid;
|
||||
using Ryujinx.Common.Logging;
|
||||
|
@ -8,7 +7,7 @@ using Ryujinx.Graphics.Gpu;
|
|||
using Ryujinx.Graphics.OpenGL;
|
||||
using Ryujinx.HLE.HOS.Applets;
|
||||
using Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.ApplicationProxy.Types;
|
||||
using Ryujinx.HLE.Ui;
|
||||
using Ryujinx.HLE.UI;
|
||||
using Ryujinx.Input;
|
||||
using Ryujinx.Input.HLE;
|
||||
using Ryujinx.SDL2.Common;
|
||||
|
@ -26,7 +25,7 @@ using Switch = Ryujinx.HLE.Switch;
|
|||
|
||||
namespace Ryujinx.Headless.SDL2
|
||||
{
|
||||
abstract partial class WindowBase : IHostUiHandler, IDisposable
|
||||
abstract partial class WindowBase : IHostUIHandler, IDisposable
|
||||
{
|
||||
protected const int DefaultWidth = 1280;
|
||||
protected const int DefaultHeight = 720;
|
||||
|
@ -54,7 +53,7 @@ namespace Ryujinx.Headless.SDL2
|
|||
|
||||
public IntPtr WindowHandle;
|
||||
|
||||
public IHostUiTheme HostUiTheme { get; }
|
||||
public IHostUITheme HostUITheme { get; }
|
||||
public int Width { get; private set; }
|
||||
public int Height { get; private set; }
|
||||
public int DisplayId { get; set; }
|
||||
|
@ -81,9 +80,7 @@ namespace Ryujinx.Headless.SDL2
|
|||
private bool _isStopped;
|
||||
private uint _windowId;
|
||||
|
||||
public bool _isPaused = false;
|
||||
|
||||
private string _gpuVendorName;
|
||||
private string _gpuDriverName;
|
||||
|
||||
private readonly AspectRatio _aspectRatio;
|
||||
private readonly bool _enableMouse;
|
||||
|
@ -109,7 +106,7 @@ namespace Ryujinx.Headless.SDL2
|
|||
_gpuDoneEvent = new ManualResetEvent(false);
|
||||
_aspectRatio = aspectRatio;
|
||||
_enableMouse = enableMouse;
|
||||
HostUiTheme = new HeadlessHostUiTheme();
|
||||
HostUITheme = new HeadlessHostUiTheme();
|
||||
|
||||
SDL2Driver.Instance.Initialize();
|
||||
}
|
||||
|
@ -259,9 +256,9 @@ namespace Ryujinx.Headless.SDL2
|
|||
|
||||
public abstract SDL_WindowFlags GetWindowFlags();
|
||||
|
||||
private string GetGpuVendorName()
|
||||
private string GetGpuDriverName()
|
||||
{
|
||||
return Renderer.GetHardwareInfo().GpuVendor;
|
||||
return Renderer.GetHardwareInfo().GpuDriver;
|
||||
}
|
||||
|
||||
private void SetAntiAliasing()
|
||||
|
@ -287,13 +284,12 @@ namespace Ryujinx.Headless.SDL2
|
|||
|
||||
SetScalingFilter();
|
||||
|
||||
_gpuVendorName = GetGpuVendorName();
|
||||
_gpuDriverName = GetGpuDriverName();
|
||||
|
||||
Device.Gpu.Renderer.RunLoop(() =>
|
||||
{
|
||||
Device.Gpu.SetGpuThread();
|
||||
Device.Gpu.InitializeShaderCache(_gpuCancellationTokenSource.Token);
|
||||
Translator.IsReadyForTranslation.Set();
|
||||
|
||||
while (_isActive)
|
||||
{
|
||||
|
@ -302,11 +298,6 @@ namespace Ryujinx.Headless.SDL2
|
|||
return;
|
||||
}
|
||||
|
||||
if (_isPaused)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_ticks += _chrono.ElapsedTicks;
|
||||
|
||||
_chrono.Restart();
|
||||
|
@ -338,7 +329,7 @@ namespace Ryujinx.Headless.SDL2
|
|||
Device.Configuration.AspectRatio.ToText(),
|
||||
$"Game: {Device.Statistics.GetGameFrameRate():00.00} FPS ({Device.Statistics.GetGameFrameTime():00.00} ms)",
|
||||
$"FIFO: {Device.Statistics.GetFifoPercent():0.00} %",
|
||||
$"GPU: {_gpuVendorName}"));
|
||||
$"GPU: {_gpuDriverName}"));
|
||||
|
||||
_ticks = Math.Min(_ticks - _ticksPerFrame, _ticksPerFrame);
|
||||
}
|
||||
|
@ -388,12 +379,6 @@ namespace Ryujinx.Headless.SDL2
|
|||
while (_isActive)
|
||||
{
|
||||
|
||||
if (_isPaused)
|
||||
{
|
||||
Thread.Sleep(1);
|
||||
return;
|
||||
}
|
||||
|
||||
UpdateFrame();
|
||||
|
||||
SDL_PumpEvents();
|
||||
|
@ -433,11 +418,6 @@ namespace Ryujinx.Headless.SDL2
|
|||
return true;
|
||||
}
|
||||
|
||||
if (_isPaused)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (_isStopped)
|
||||
{
|
||||
return false;
|
||||
|
@ -489,7 +469,7 @@ namespace Ryujinx.Headless.SDL2
|
|||
Exit();
|
||||
}
|
||||
|
||||
public void DisplayInputDialog(SoftwareKeyboardUiArgs args, Action<string> onTextEntered)
|
||||
public void DisplayInputDialog(SoftwareKeyboardUIArgs args, Action<string> onTextEntered)
|
||||
{
|
||||
// SDL2 doesn't support input dialogs
|
||||
// Trying to use Objective-C on iDevices
|
||||
|
@ -511,7 +491,7 @@ namespace Ryujinx.Headless.SDL2
|
|||
return true;
|
||||
}
|
||||
|
||||
public bool DisplayMessageDialog(ControllerAppletUiArgs args)
|
||||
public bool DisplayMessageDialog(ControllerAppletUIArgs args)
|
||||
{
|
||||
string playerCount = args.PlayerCountMin == args.PlayerCountMax ? $"exactly {args.PlayerCountMin}" : $"{args.PlayerCountMin}-{args.PlayerCountMax}";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue