diff --git a/NetObsBindings/NetObsBindings.csproj b/NetObsBindings/NetObsBindings.csproj index 2eb646f..61fcb2b 100644 --- a/NetObsBindings/NetObsBindings.csproj +++ b/NetObsBindings/NetObsBindings.csproj @@ -13,7 +13,7 @@ - 0.0.1.37-alpha + 0.0.1.38-alpha LICENSE.md https://github.com/kostya9/NetObsBindings diff --git a/NetObsBindings/Obs.Version.cs b/NetObsBindings/Obs.Version.cs index bef140e..649a608 100644 Binary files a/NetObsBindings/Obs.Version.cs and b/NetObsBindings/Obs.Version.cs differ diff --git a/NetObsBindings/ObsInterop/ObsBase.cs b/NetObsBindings/ObsInterop/ObsBase.cs index 6c9eb87..8529101 100644 --- a/NetObsBindings/ObsInterop/ObsBase.cs +++ b/NetObsBindings/ObsInterop/ObsBase.cs @@ -1,4 +1,3 @@ -using System; using System.Runtime.InteropServices; namespace ObsInterop; @@ -21,13 +20,4 @@ public static unsafe partial class ObsBase [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void bcrash([NativeTypeName("const char *")] sbyte* format, __arglist); - - [NativeTypeName("#define S__LINE__ STRINGIFY_(__LINE__)")] - public static ReadOnlySpan S__LINE__ => "9"u8; - - [NativeTypeName("#define INT_CUR_LINE __LINE__")] - public const int INT_CUR_LINE = 11; - - [NativeTypeName("#define FILE_LINE __FILE__ \" (\" S__LINE__ \"): \"")] - public static ReadOnlySpan FILE_LINE => ".\\generate\\util\\obs-util.h (13): "u8; } diff --git a/generate_bindings.ps1 b/generate_bindings.ps1 index e8bc90f..a6ad35d 100644 --- a/generate_bindings.ps1 +++ b/generate_bindings.ps1 @@ -19,7 +19,11 @@ function Get-ObsClassName { $config = "multi-file", "generate-file-scoped-namespaces", "generate-helper-types", "exclude-funcs-with-body", "generate-macro-bindings", "latest-codegen" $replacements = "vec2=@System.Numerics.Vector2", "vec3=@System.Numerics.Vector3", "vec4=@System.Numerics.Vector4", "half=@Half", "__m128=@System.Runtime.Intrinsics.Vector128", "quat=@System.Numerics.Quaternion", "_iobuf*=@nint","stat*=@nint" -$excludes = "blogva", "blog", "ARCH_BITS" +$excludes = @( + "blogva", "blog", <# this method uses __arglist (variable argument list in C) but it is not fully supported in .NET (e.g. on Linux it just crashes) #> + "ARCH_BITS", <# manually implemented for .NET #> + "S__LINE__", "INT_CUR_LINE", "FILE_LINE" <# macroses for line and file in C, doesnt't work well in C# #> + ) $obsModuleTracersals = @( ".\obs-studio\libobs\obs-source.h",