diff --git a/scripts/csharp.lua b/scripts/csharp.lua index 8c3f59bcf..01f7fcd35 100644 --- a/scripts/csharp.lua +++ b/scripts/csharp.lua @@ -15,7 +15,7 @@ using System; using System.Runtime.InteropServices; using System.Security; -internal struct NativeFunctions +internal struct bgfx { $types @@ -268,7 +268,7 @@ function converter.types(typ) end function converter.funcs(func) - yield("[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]") + yield("[DllImport(DllName, EntryPoint=\"bgfx_" .. func.cname .. "\", CallingConvention = CallingConvention.Cdecl)]") if func.ret.cpptype == "bool" then yield("[return: MarshalAs(UnmanagedType.I1)]") @@ -287,7 +287,7 @@ function converter.funcs(func) first = ", " end - yield("internal static extern unsafe " .. convert_ret_type(func.ret) .. " bgfx_" .. func.cname .. args .. ");") + yield("internal static extern unsafe " .. convert_ret_type(func.ret) .. " " .. func.cname .. args .. ");") end print(gen())