mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2025-01-09 15:51:59 +00:00
metal: wip: allow getting/setting developerHUDProperies
This commit is contained in:
parent
9754d247b5
commit
c73b5bdf46
1 changed files with 10 additions and 1 deletions
|
@ -6,16 +6,25 @@ using System.Runtime.Versioning;
|
||||||
|
|
||||||
namespace Ryujinx.Graphics.Metal.SharpMetalExtensions
|
namespace Ryujinx.Graphics.Metal.SharpMetalExtensions
|
||||||
{
|
{
|
||||||
[SupportedOSPlatform("OSX")]
|
[SupportedOSPlatform("macOS")]
|
||||||
public static class CAMetalLayerExtensions
|
public static class CAMetalLayerExtensions
|
||||||
{
|
{
|
||||||
private static readonly Selector sel_displaySyncEnabled = "displaySyncEnabled";
|
private static readonly Selector sel_displaySyncEnabled = "displaySyncEnabled";
|
||||||
private static readonly Selector sel_setDisplaySyncEnabled = "setDisplaySyncEnabled:";
|
private static readonly Selector sel_setDisplaySyncEnabled = "setDisplaySyncEnabled:";
|
||||||
|
|
||||||
|
private static readonly Selector sel_developerHUDProperties = "developerHUDProperties";
|
||||||
|
private static readonly Selector sel_setDeveloperHUDProperties = "setDeveloperHUDProperties:";
|
||||||
|
|
||||||
public static bool IsDisplaySyncEnabled(this CAMetalLayer metalLayer)
|
public static bool IsDisplaySyncEnabled(this CAMetalLayer metalLayer)
|
||||||
=> ObjectiveCRuntime.bool_objc_msgSend(metalLayer.NativePtr, sel_displaySyncEnabled);
|
=> ObjectiveCRuntime.bool_objc_msgSend(metalLayer.NativePtr, sel_displaySyncEnabled);
|
||||||
|
|
||||||
public static void SetDisplaySyncEnabled(this CAMetalLayer metalLayer, bool enabled)
|
public static void SetDisplaySyncEnabled(this CAMetalLayer metalLayer, bool enabled)
|
||||||
=> ObjectiveCRuntime.objc_msgSend(metalLayer.NativePtr, sel_setDisplaySyncEnabled, enabled);
|
=> ObjectiveCRuntime.objc_msgSend(metalLayer.NativePtr, sel_setDisplaySyncEnabled, enabled);
|
||||||
|
|
||||||
|
public static nint GetDeveloperHudProperties(this CAMetalLayer metalLayer)
|
||||||
|
=> ObjectiveCRuntime.IntPtr_objc_msgSend(metalLayer.NativePtr, sel_developerHUDProperties);
|
||||||
|
|
||||||
|
public static void SetDeveloperHudProperties(this CAMetalLayer metalLayer, nint dictionaryPointer)
|
||||||
|
=> ObjectiveCRuntime.objc_msgSend(metalLayer.NativePtr, sel_setDisplaySyncEnabled, dictionaryPointer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue