diff --git a/src/Ryujinx.Graphics.Metal.SharpMetalExtensions/CAMetalLayerExtensions.cs b/src/Ryujinx.Graphics.Metal.SharpMetalExtensions/CAMetalLayerExtensions.cs deleted file mode 100644 index f8fe7d2e7..000000000 --- a/src/Ryujinx.Graphics.Metal.SharpMetalExtensions/CAMetalLayerExtensions.cs +++ /dev/null @@ -1,22 +0,0 @@ -using SharpMetal; -using SharpMetal.Foundation; -using SharpMetal.ObjectiveCCore; -using SharpMetal.QuartzCore; -using System.Runtime.Versioning; -// ReSharper disable InconsistentNaming - -namespace Ryujinx.Graphics.Metal.SharpMetalExtensions -{ - [SupportedOSPlatform("macOS")] - public static class CAMetalLayerExtensions - { - private static readonly Selector sel_developerHUDProperties = "developerHUDProperties"; - private static readonly Selector sel_setDeveloperHUDProperties = "setDeveloperHUDProperties:"; - - public static NSDictionary GetDeveloperHudProperties(this CAMetalLayer metalLayer) - => new(ObjectiveCRuntime.IntPtr_objc_msgSend(metalLayer.NativePtr, sel_developerHUDProperties)); - - public static void SetDeveloperHudProperties(this CAMetalLayer metalLayer, NSDictionary dictionary) - => ObjectiveCRuntime.objc_msgSend(metalLayer.NativePtr, sel_setDeveloperHUDProperties, dictionary); - } -} diff --git a/src/Ryujinx.Graphics.Metal.SharpMetalExtensions/NSHelper.cs b/src/Ryujinx.Graphics.Metal.SharpMetalExtensions/NSHelper.cs deleted file mode 100644 index dc2495d07..000000000 --- a/src/Ryujinx.Graphics.Metal.SharpMetalExtensions/NSHelper.cs +++ /dev/null @@ -1,32 +0,0 @@ -using SharpMetal.Foundation; -using SharpMetal.ObjectiveCCore; -using System.Runtime.Versioning; -// ReSharper disable InconsistentNaming - -namespace Ryujinx.Graphics.Metal.SharpMetalExtensions -{ - [SupportedOSPlatform("macOS")] - public static class NSHelper - { - private static readonly Selector sel_getCStringMaxLengthEncoding = "getCString:maxLength:encoding:"; - private static readonly Selector sel_stringWithUTF8String = "stringWithUTF8String:"; - - public static unsafe string ToDotNetString(this NSString source) - { - char[] sourceBuffer = new char[source.Length]; - fixed (char* pSourceBuffer = sourceBuffer) - { - ObjectiveC.bool_objc_msgSend(source, - sel_getCStringMaxLengthEncoding, - pSourceBuffer, - source.MaximumLengthOfBytes(NSStringEncoding.UTF16) + 1, - (ulong)NSStringEncoding.UTF16); - } - - return new string(sourceBuffer); - } - - public static NSString ToNSString(this string source) - => new(ObjectiveC.IntPtr_objc_msgSend(new ObjectiveCClass(nameof(NSString)), sel_stringWithUTF8String, source)); - } -} diff --git a/src/Ryujinx.Graphics.Metal.SharpMetalExtensions/Ryujinx.Graphics.Metal.SharpMetalExtensions.csproj b/src/Ryujinx.Graphics.Metal.SharpMetalExtensions/Ryujinx.Graphics.Metal.SharpMetalExtensions.csproj deleted file mode 100644 index 1e75b4d26..000000000 --- a/src/Ryujinx.Graphics.Metal.SharpMetalExtensions/Ryujinx.Graphics.Metal.SharpMetalExtensions.csproj +++ /dev/null @@ -1,11 +0,0 @@ - - - enable - enable - true - - - - - - diff --git a/src/Ryujinx.HLE/Debugger/Debugger.MainThread.cs b/src/Ryujinx.HLE/Debugger/Debugger.MainThread.cs index 9ad80a58c..a76221da8 100644 --- a/src/Ryujinx.HLE/Debugger/Debugger.MainThread.cs +++ b/src/Ryujinx.HLE/Debugger/Debugger.MainThread.cs @@ -1,5 +1,6 @@ using Ryujinx.Common.Logging; using Ryujinx.HLE.Debugger.Gdb; +using System; using System.IO; using System.Net; using System.Net.Sockets; @@ -9,11 +10,22 @@ namespace Ryujinx.HLE.Debugger { public partial class Debugger { - private void DebuggerThreadMain() + private void MainLoop() { IPEndPoint endpoint = new(IPAddress.Any, GdbStubPort); _listenerSocket = new TcpListener(endpoint); - _listenerSocket.Start(); + + try + { + _listenerSocket.Start(); + } + catch (SocketException se) + { + Logger.Error?.Print(LogClass.GdbStub, + $"Failed to create TCP server on {endpoint} for GDB client: {Enum.GetName(se.SocketErrorCode)}"); + throw; + } + Logger.Notice.Print(LogClass.GdbStub, $"Currently waiting on {endpoint} for GDB client"); while (!_shuttingDown) @@ -22,8 +34,10 @@ namespace Ryujinx.HLE.Debugger { _clientSocket = _listenerSocket.AcceptSocket(); } - catch (SocketException) + catch (SocketException se) { + Logger.Error?.Print(LogClass.GdbStub, + $"Failed to accept incoming GDB client connection: {Enum.GetName(se.SocketErrorCode)}"); return; } @@ -31,7 +45,7 @@ namespace Ryujinx.HLE.Debugger int retries = 10; while ((DebugProcess == null || GetThreads().Length == 0) && retries-- > 0) { - Thread.Sleep(200); + Thread.Sleep(500); } if (DebugProcess == null || GetThreads().Length == 0) diff --git a/src/Ryujinx.HLE/Debugger/Debugger.cs b/src/Ryujinx.HLE/Debugger/Debugger.cs index 567e97071..ca6f39ec2 100644 --- a/src/Ryujinx.HLE/Debugger/Debugger.cs +++ b/src/Ryujinx.HLE/Debugger/Debugger.cs @@ -45,7 +45,7 @@ namespace Ryujinx.HLE.Debugger ARMeilleure.Optimizations.EnableDebugging = true; - _debuggerThread = new Thread(DebuggerThreadMain); + _debuggerThread = new Thread(MainLoop); _debuggerThread.Start(); _messageHandlerThread = new Thread(MessageHandlerMain); _messageHandlerThread.Start(); diff --git a/src/Ryujinx.Headless.SDL2/Ryujinx.Headless.SDL2.csproj b/src/Ryujinx.Headless.SDL2/Ryujinx.Headless.SDL2.csproj deleted file mode 100644 index fe535e6d5..000000000 --- a/src/Ryujinx.Headless.SDL2/Ryujinx.Headless.SDL2.csproj +++ /dev/null @@ -1,72 +0,0 @@ - - - - win-x64;osx-x64;linux-x64 - Exe - true - 1.0.0-dirty - $(DefineConstants);$(ExtraDefineConstants) - - - true - $(DefaultItemExcludes);._* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Always - THIRDPARTY.md - - - Always - LICENSE.txt - - - - - - Always - - - - - - - - - - false - ..\Ryujinx\Ryujinx.ico - - - - true - true - partial - -