mirror of
https://git.743378673.xyz/MeloNX/MeloNX.git
synced 2025-06-29 03:46:24 +02:00
add nativaot libryujinx project
This commit is contained in:
parent
cea50d80c9
commit
1694303e4c
13 changed files with 1530 additions and 3 deletions
33
src/LibRyujinx.NativeSample/Program.cs
Normal file
33
src/LibRyujinx.NativeSample/Program.cs
Normal file
|
@ -0,0 +1,33 @@
|
|||
using LibRyujinx.Sample;
|
||||
using OpenTK.Mathematics;
|
||||
using OpenTK.Windowing.Common;
|
||||
using OpenTK.Windowing.Desktop;
|
||||
|
||||
namespace LibRyujinx.NativeSample
|
||||
{
|
||||
internal class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
if (args.Length > 0)
|
||||
{
|
||||
var success = LibRyujinxInterop.Initialize(IntPtr.Zero);
|
||||
success = LibRyujinxInterop.InitializeGraphics(new GraphicsConfiguration());
|
||||
var nativeWindowSettings = new NativeWindowSettings()
|
||||
{
|
||||
Size = new Vector2i(800, 600),
|
||||
Title = "Ryujinx",
|
||||
API = ContextAPI.NoAPI,
|
||||
IsEventDriven = true,
|
||||
// This is needed to run on macos
|
||||
Flags = ContextFlags.ForwardCompatible,
|
||||
};
|
||||
|
||||
using var window = new NativeWindow(nativeWindowSettings);
|
||||
|
||||
window.IsVisible = true;
|
||||
window.Start(args[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue