From 382ece87e3f975a5939c674af3c68fbdcacf519b Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Fri, 24 May 2024 15:12:25 +0200 Subject: [PATCH] Add the new file to the build. --- src/GameController/GCMouse.cs | 12 ++++++++++++ src/frameworks.sources | 1 + 2 files changed, 13 insertions(+) diff --git a/src/GameController/GCMouse.cs b/src/GameController/GCMouse.cs index 6d92ee9bd9f9..6c75403f1481 100644 --- a/src/GameController/GCMouse.cs +++ b/src/GameController/GCMouse.cs @@ -1,6 +1,8 @@ #nullable enable using System; +using System.ComponentModel; +using System.Diagnostics.CodeAnalysis; using ObjCRuntime; using Foundation; @@ -22,20 +24,30 @@ public GCMouse (NSCoder coder) : base (NSObjectFlag.Empty) } [Export ("encodeWithCoder:")] +#if NET [SupportedOSPlatform ("ios14.0")] [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("tvos14.0")] [SupportedOSPlatform ("maccatalyst")] +#endif [BindingImpl (BindingImplOptions.Optimizable)] [EditorBrowsable (EditorBrowsableState.Never)] public virtual void EncodeTo (NSCoder encoder) { var encoder__handle__ = encoder!.GetNonNullHandle (nameof (encoder)); +#if NET if (IsDirectBinding) { global::ObjCRuntime.Messaging.void_objc_msgSend_NativeHandle (this.Handle, Selector.GetHandle ("encodeWithCoder:"), encoder__handle__); } else { global::ObjCRuntime.Messaging.void_objc_msgSendSuper_NativeHandle (this.SuperHandle, Selector.GetHandle ("encodeWithCoder:"), encoder__handle__); } +#else + if (IsDirectBinding) { + global::ObjCRuntime.Messaging.void_objc_msgSend_IntPtr (this.Handle, Selector.GetHandle ("encodeWithCoder:"), encoder__handle__); + } else { + global::ObjCRuntime.Messaging.void_objc_msgSendSuper_IntPtr (this.SuperHandle, Selector.GetHandle ("encodeWithCoder:"), encoder__handle__); + } +#endif } } #endif // !XAMCORE_5_0 diff --git a/src/frameworks.sources b/src/frameworks.sources index c5dcf0509309..2c7050804fdd 100644 --- a/src/frameworks.sources +++ b/src/frameworks.sources @@ -910,6 +910,7 @@ GAMECONTROLLER_SOURCES = \ GameController/GCExtendedGamepadSnapshot.cs \ GameController/GCGamepadSnapshot.cs \ GameController/GCMicroGamepadSnapshot.cs \ + GameController/GCMouse.cs \ # GameKit