2024-12-26 22:42:39 -06:00
|
|
|
|
using SharpMetal;
|
2024-12-27 20:47:02 -06:00
|
|
|
|
using SharpMetal.Foundation;
|
2024-12-26 22:42:39 -06:00
|
|
|
|
using SharpMetal.ObjectiveCCore;
|
|
|
|
|
using SharpMetal.QuartzCore;
|
|
|
|
|
using System.Runtime.Versioning;
|
|
|
|
|
// ReSharper disable InconsistentNaming
|
|
|
|
|
|
|
|
|
|
namespace Ryujinx.Graphics.Metal.SharpMetalExtensions
|
|
|
|
|
{
|
2024-12-26 23:58:55 -06:00
|
|
|
|
[SupportedOSPlatform("macOS")]
|
2024-12-26 22:42:39 -06:00
|
|
|
|
public static class CAMetalLayerExtensions
|
|
|
|
|
{
|
2024-12-26 23:58:55 -06:00
|
|
|
|
private static readonly Selector sel_developerHUDProperties = "developerHUDProperties";
|
|
|
|
|
private static readonly Selector sel_setDeveloperHUDProperties = "setDeveloperHUDProperties:";
|
2024-12-26 22:42:39 -06:00
|
|
|
|
|
2024-12-27 20:47:02 -06:00
|
|
|
|
public static NSDictionary GetDeveloperHudProperties(this CAMetalLayer metalLayer)
|
|
|
|
|
=> new(ObjectiveCRuntime.IntPtr_objc_msgSend(metalLayer.NativePtr, sel_developerHUDProperties));
|
2024-12-26 23:58:55 -06:00
|
|
|
|
|
2024-12-27 20:47:02 -06:00
|
|
|
|
public static void SetDeveloperHudProperties(this CAMetalLayer metalLayer, NSDictionary dictionary)
|
|
|
|
|
=> ObjectiveCRuntime.objc_msgSend(metalLayer.NativePtr, sel_setDeveloperHUDProperties, dictionary);
|
2024-12-26 22:42:39 -06:00
|
|
|
|
}
|
|
|
|
|
}
|