diff options
author | riperiperi <rhy3756547@hotmail.com> | 2022-12-06 22:00:25 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-06 19:00:25 -0300 |
commit | e211c3f00a847f50b286349918e5c51967862e93 (patch) | |
tree | 5c703923741ee42362c86fef3981bdf745f881a4 /Ryujinx.Headless.SDL2/Program.cs | |
parent | d3709a753f88e6b02d6a1760835227a7fdcc5a19 (diff) |
UI: Add Metal surface creation for MoltenVK (#3980)1.1.439
* Initial implementation of metal surface across UIs
* Fix SDL2 on windows
* Update Ryujinx/Ryujinx.csproj
Co-authored-by: Mary-nyan <thog@protonmail.com>
* Address Feedback
Co-authored-by: Mary-nyan <thog@protonmail.com>
Diffstat (limited to 'Ryujinx.Headless.SDL2/Program.cs')
-rw-r--r-- | Ryujinx.Headless.SDL2/Program.cs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Ryujinx.Headless.SDL2/Program.cs b/Ryujinx.Headless.SDL2/Program.cs index bfc33edc..50a90763 100644 --- a/Ryujinx.Headless.SDL2/Program.cs +++ b/Ryujinx.Headless.SDL2/Program.cs @@ -77,6 +77,26 @@ namespace Ryujinx.Headless.SDL2 _accountManager = new AccountManager(_libHacHorizonManager.RyujinxClient); _userChannelPersistence = new UserChannelPersistence(); + if (OperatingSystem.IsMacOS()) + { + AutoResetEvent invoked = new AutoResetEvent(false); + + // MacOS must perform SDL polls from the main thread. + Ryujinx.SDL2.Common.SDL2Driver.MainThreadDispatcher = (Action action) => + { + invoked.Reset(); + + WindowBase.QueueMainThreadAction(() => + { + action(); + + invoked.Set(); + }); + + invoked.WaitOne(); + }; + } + _inputManager = new InputManager(new SDL2KeyboardDriver(), new SDL2GamepadDriver()); GraphicsConfig.EnableShaderCache = true; |