From 7184da205030a37ca1c8d724a7d4d3a61613c710 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D1=80=D0=B0=D0=BD=D0=B8=D0=BC=D0=B8=D1=80=20=D0=9A?= =?UTF-8?q?=D0=B0=D1=80=D0=B0=D1=9F=D0=B8=D1=9B?= Date: Thu, 4 Jul 2019 16:07:18 -0700 Subject: [PATCH] IDL: Cleanup. --- scripts/csharp.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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())