[NUI] Make sure that Interop return type is bool
authorjoogab.yun <joogab.yun@samsung.com>
Fri, 19 Aug 2022 01:51:34 +0000 (10:51 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Mon, 22 Aug 2022 09:37:36 +0000 (18:37 +0900)
Marshal's bool is mapped to 4byte in default.
So if native-code return boolean type, the datasize is mismatched and make problems

This patch will fix this problem

src/Tizen.NUI/src/internal/Interop/Interop.Window.cs

index 32a791b..a85b913 100755 (executable)
@@ -282,6 +282,7 @@ namespace Tizen.NUI
             public static extern void Maximize(global::System.Runtime.InteropServices.HandleRef window, bool maximize);
 
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_IsMaximized")]
+            [return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.U1)]
             public static extern bool IsMaximized(global::System.Runtime.InteropServices.HandleRef window);
 
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_Set_Maximum_Size")]
@@ -291,6 +292,7 @@ namespace Tizen.NUI
             public static extern void Minimize(global::System.Runtime.InteropServices.HandleRef window, bool minimize);
 
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_IsMinimized")]
+            [return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.U1)]
             public static extern bool IsMinimized(global::System.Runtime.InteropServices.HandleRef window);
 
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_Set_Minimum_Size")]