Converted GPGX Analog Controls to 1D

This commit is contained in:
sappharad 2014-02-02 01:35:03 +00:00
parent a17945296c
commit cae7e7fc98
2 changed files with 3 additions and 3 deletions

View File

@ -92,8 +92,8 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx
ControllerDef.FloatRanges.Add(FullShort); ControllerDef.FloatRanges.Add(FullShort);
Converts.Add(delegate() Converts.Add(delegate()
{ {
target.analog[idx,0] = (short)source.GetFloat(NX); target.analog[(2*idx)+0] = (short)source.GetFloat(NX);
target.analog[idx,1] = (short)source.GetFloat(NY); target.analog[(2*idx)+1] = (short)source.GetFloat(NY);
}); });
} }

View File

@ -215,7 +215,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx
/// analog (x/y) /// analog (x/y)
/// </summary> /// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = MAX_DEVICES * 2)] [MarshalAs(UnmanagedType.ByValArray, SizeConst = MAX_DEVICES * 2)]
public readonly short[,] analog = new short[MAX_DEVICES, 2]; public readonly short[] analog = new short[MAX_DEVICES * 2];
/// <summary> /// <summary>
/// gun horizontal offset /// gun horizontal offset
/// </summary> /// </summary>