UI: Add Metal surface creation for MoltenVK (#3980)

* 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>
This commit is contained in:
riperiperi 2022-12-06 22:00:25 +00:00 committed by GitHub
parent d3709a753f
commit e211c3f00a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 495 additions and 63 deletions

View file

@ -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;