remove struct hack, it's not actually needed
out double is System.Double& while double is System.Double, so it doesn't actually trip paramenter verifier
This commit is contained in:
parent
eec86ad81a
commit
a0de42b1b3
|
@ -98,19 +98,9 @@ namespace BizHawk.Emulation.Cores.Arcades.MAME
|
|||
[BizImport(cc)]
|
||||
public abstract long mame_lua_get_long(string code);
|
||||
|
||||
/// <summary>
|
||||
/// Struct for indirectly returning doubles
|
||||
/// This is needed due to floating point types
|
||||
/// being unsupported by the msabi to sysv adapter
|
||||
/// </summary>
|
||||
public struct IndirectDouble
|
||||
{
|
||||
public double val;
|
||||
}
|
||||
|
||||
// get double
|
||||
[BizImport(cc)]
|
||||
public abstract void mame_lua_get_double(string code, out IndirectDouble ret);
|
||||
public abstract void mame_lua_get_double(string code, out double ret);
|
||||
|
||||
// get string
|
||||
[BizImport(cc)]
|
||||
|
|
|
@ -36,10 +36,10 @@ namespace BizHawk.Emulation.Cores.Arcades.MAME
|
|||
{
|
||||
_core.mame_lua_get_double(MAMELuaCommand.GetBoundX, out var x);
|
||||
_core.mame_lua_get_double(MAMELuaCommand.GetBoundY, out var y);
|
||||
VirtualHeight = BufferWidth > BufferHeight * x.val / y.val
|
||||
? (int)Math.Round(BufferWidth * y.val / x.val)
|
||||
VirtualHeight = BufferWidth > BufferHeight * x / y
|
||||
? (int)Math.Round(BufferWidth * y / x)
|
||||
: BufferHeight;
|
||||
VirtualWidth = (int)Math.Round(VirtualHeight * x.val / y.val);
|
||||
VirtualWidth = (int)Math.Round(VirtualHeight * x / y);
|
||||
}
|
||||
|
||||
private void UpdateVideo()
|
||||
|
|
Loading…
Reference in New Issue