Inverted unclear check and changed it check the dllimport option directly.

This commit is contained in:
Jarl Gullberg 2017-06-26 21:13:02 +02:00
parent 77ebecb9f7
commit 4184e6a10e
No known key found for this signature in database
GPG key ID: 750FF6F6BDA72D23

View file

@ -302,7 +302,12 @@ namespace OpenTK.Rewrite
generatedVariables = EmitConvenienceWrapper(wrapper, native, difference, body, il); generatedVariables = EmitConvenienceWrapper(wrapper, native, difference, body, il);
} }
if (slot != -1) if (Options.UseDLLImport)
{
// issue DllImport call
EmitCall(il, native);
}
else
{ {
// push the entry point address on the stack // push the entry point address on the stack
EmitEntryPoint(entry_points, il, slot); EmitEntryPoint(entry_points, il, slot);
@ -310,11 +315,6 @@ namespace OpenTK.Rewrite
// issue calli // issue calli
EmitCalli(il, native); EmitCalli(il, native);
} }
else
{
// issue DllImport call
EmitCall(il, native);
}
if (wrapper.ReturnType.Name != "Void") if (wrapper.ReturnType.Name != "Void")
{ {