From eaed76f4dcc60022b3f10997fb34eb8ead9ae7d7 Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Wed, 28 Sep 2022 16:51:52 -0700 Subject: [PATCH] initial refresh backend selection API support --- src/Refresh.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/Refresh.cs b/src/Refresh.cs index ef0a9e2..ae93551 100644 --- a/src/Refresh.cs +++ b/src/Refresh.cs @@ -315,6 +315,14 @@ namespace RefreshCS IntOpaqueWhite } + public enum Backend + { + DontCare, + Vulkan, + PS5, + Invalid + } + /* Native Structures */ [StructLayout(LayoutKind.Sequential)] @@ -585,6 +593,12 @@ namespace RefreshCS /* Init/Quit */ + [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + public static extern Backend Refresh_SelectBackend( + Backend preferredBackend, + out uint flags + ); + [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] public static extern IntPtr Refresh_CreateDevice( in PresentationParameters presentationParameters,