diff --git a/BizHawk.Common/BizInvoke/BizInvoker.cs b/BizHawk.Common/BizInvoke/BizInvoker.cs index 427ad293ad..609714d587 100644 --- a/BizHawk.Common/BizInvoke/BizInvoker.cs +++ b/BizHawk.Common/BizInvoke/BizInvoker.cs @@ -309,7 +309,10 @@ namespace BizHawk.Common.BizInvoke il.Emit(OpCodes.Ldarg_0); 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 {