mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-30 01:29:48 -06:00

Launch the Ryujinx.exe, first argument --no-gui or nogui, and the rest of the arguments should be your normal headless script. You can include the new option --use-main-config which will provide any arguments that you don't, filled in from your main config made by the UI. Input config is not inherited at this time.
48 lines
1.3 KiB
C#
48 lines
1.3 KiB
C#
using Ryujinx.Common.Configuration;
|
|
using Ryujinx.Input.HLE;
|
|
using Ryujinx.SDL2.Common;
|
|
using SharpMetal.QuartzCore;
|
|
using System.Runtime.Versioning;
|
|
using static SDL2.SDL;
|
|
|
|
namespace Ryujinx.Headless
|
|
{
|
|
[SupportedOSPlatform("macos")]
|
|
class MetalWindow : WindowBase
|
|
{
|
|
private CAMetalLayer _caMetalLayer;
|
|
|
|
public CAMetalLayer GetLayer()
|
|
{
|
|
return _caMetalLayer;
|
|
}
|
|
|
|
public MetalWindow(
|
|
InputManager inputManager,
|
|
GraphicsDebugLevel glLogLevel,
|
|
AspectRatio aspectRatio,
|
|
bool enableMouse,
|
|
HideCursorMode hideCursorMode,
|
|
bool ignoreControllerApplet)
|
|
: base(inputManager, glLogLevel, aspectRatio, enableMouse, hideCursorMode, ignoreControllerApplet) { }
|
|
|
|
public override SDL_WindowFlags GetWindowFlags() => SDL_WindowFlags.SDL_WINDOW_METAL;
|
|
|
|
protected override void InitializeWindowRenderer()
|
|
{
|
|
void CreateLayer()
|
|
{
|
|
_caMetalLayer = new CAMetalLayer(SDL_Metal_GetLayer(SDL_Metal_CreateView(WindowHandle)));
|
|
}
|
|
|
|
SDL2Driver.MainThreadDispatcher?.Invoke(CreateLayer);
|
|
}
|
|
|
|
protected override void InitializeRenderer() { }
|
|
|
|
protected override void FinalizeWindowRenderer() { }
|
|
|
|
protected override void SwapBuffers() { }
|
|
}
|
|
}
|