From 6cd6c1ae18c99cd74b7f6bf3f0d0281669fa5ee8 Mon Sep 17 00:00:00 2001 From: Shyanne Date: Fri, 2 Jan 2026 15:54:42 -0500 Subject: [PATCH] added some debugging and fix for fs --- src/Ryujinx/Program.cs | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/src/Ryujinx/Program.cs b/src/Ryujinx/Program.cs index 0a45aa2da..692a85f9b 100644 --- a/src/Ryujinx/Program.cs +++ b/src/Ryujinx/Program.cs @@ -110,13 +110,16 @@ namespace Ryujinx.Ava // If you add a check here, please, for the love of god, check it BEFORE loading the dialog. if (root) { + Console.WriteLine($"Ryujinx {Version}: Ryujinx is not intended to be run as administrator. Exiting..."); // Grab what we need to make the message box. const string ObjCRuntime = "/usr/lib/libobjc.A.dylib"; const string FoundationFramework = "/System/Library/Frameworks/Foundation.framework/Foundation"; + Console.Write("Set strings for library fetch."); + [DllImport(ObjCRuntime, EntryPoint = "sel_registerName")] static extern IntPtr GetSelector(string name); - + [DllImport(ObjCRuntime, EntryPoint = "objc_getClass")] static extern IntPtr GetClass(string name); @@ -125,11 +128,15 @@ namespace Ryujinx.Ava [DllImport(FoundationFramework, EntryPoint = "objc_msgSend")] static extern IntPtr SendMessageWithParameter(IntPtr target, IntPtr selector, IntPtr param); + + Console.Write("Set up DLL Imports."); IntPtr NSStringClass = GetClass("NSString"); IntPtr Selector = GetSelector("stringWithUTF8String:"); IntPtr AlertInstance = SendMessage(SendMessage(GetClass("NSAlert"), GetSelector("alloc")), GetSelector("init")); + Console.Write("Set up necessary classes and instances."); + // Create caption and text. IntPtr caption = SendMessageWithParameter(NSStringClass, Selector, Marshal.StringToHGlobalAnsi($"Ryujinx {Version}")); IntPtr text = SendMessageWithParameter(NSStringClass, Selector, Marshal.StringToHGlobalAnsi("Ryujinx is not intended to be run as administrator.")); @@ -142,8 +149,14 @@ namespace Ryujinx.Ava // Send prompt to user, then clean up. SendMessage(AlertInstance, GetSelector("runModal")); + Console.Write($"AlertInstance: {AlertInstance}"); + + Console.Write("Sent message box to macOS."); + SendMessage(AlertInstance, GetSelector("release")); + Console.Write("Cleaned up."); + return 0; } } @@ -159,11 +172,13 @@ namespace Ryujinx.Ava if (Environment.GetEnvironmentVariable("container").EqualsIgnoreCase("flatpak")) { Logger.Warning?.PrintMsg(LogClass.Application, "This is very likely an unofficial build, Ryujinx does NOT have a flatpak!"); + Logger.Info?.PrintMsg(LogClass.Application, "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="); Logger.Info?.PrintMsg(LogClass.Application, "Please visit https://ryujinx.app/ for our official builds."); Logger.Info?.PrintMsg(LogClass.Application, - "AppImage >> https://update.ryujinx.app/download/query?os=linuxappimage&arch=x64&rc=stable"); + " AppImage >> https://update.ryujinx.app/download/query?os=linuxappimage&arch=x64&rc=stable"); Logger.Info?.PrintMsg(LogClass.Application, - "Tarball >> http://update.ryujinx.app/download/query?os=linux&arch=x64&rc=stable"); + " Tarball >> http://update.ryujinx.app/download/query?os=linux&arch=x64&rc=stable"); + Logger.Info?.PrintMsg(LogClass.Application, "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="); } } } @@ -204,6 +219,8 @@ namespace Ryujinx.Ava .UsePlatformDetect() .With(new X11PlatformOptions { + UseDBusMenu = false, + UseDBusFilePicker = false, EnableMultiTouch = true, EnableIme = true, EnableInputFocusProxy = Environment.GetEnvironmentVariable("XDG_CURRENT_DESKTOP") == "gamescope",