Make the bizinvoker, when not in compatibility mode, marshal bool returns as C++ would expect you to, and not winapi because fuck winapi
This commit is contained in:
parent
e298863b3d
commit
deaf22cb36
|
@ -309,7 +309,10 @@ namespace BizHawk.Common.BizInvoke
|
||||||
|
|
||||||
il.Emit(OpCodes.Ldarg_0);
|
il.Emit(OpCodes.Ldarg_0);
|
||||||
il.Emit(OpCodes.Ldfld, field);
|
il.Emit(OpCodes.Ldfld, field);
|
||||||
il.EmitCalli(OpCodes.Calli, nativeCall, returnType, nativeParamTypes.ToArray());
|
il.EmitCalli(OpCodes.Calli,
|
||||||
|
nativeCall,
|
||||||
|
returnType == typeof(bool) ? typeof(byte) : returnType, // undo winapi style bool garbage
|
||||||
|
nativeParamTypes.ToArray());
|
||||||
|
|
||||||
if (monitorField != null) // monitor: finally exit
|
if (monitorField != null) // monitor: finally exit
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue