Virtualpad - Targeting widget - hackery to fix movie playback
This commit is contained in:
parent
00f33d2ae9
commit
69ea80882d
|
@ -34,16 +34,27 @@ namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
Global.StickyXORAdapter.Unset(XName);
|
Global.StickyXORAdapter.Unset(XName);
|
||||||
Global.StickyXORAdapter.Unset(YName);
|
Global.StickyXORAdapter.Unset(YName);
|
||||||
|
overrideX = null;
|
||||||
|
overrideY = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int? overrideX = null;
|
||||||
|
int? overrideY = null;
|
||||||
public void Set(IController controller)
|
public void Set(IController controller)
|
||||||
{
|
{
|
||||||
var newX = controller.GetFloat(XName) / MultiplierX;
|
var newX = controller.GetFloat(XName) / MultiplierX;
|
||||||
var newY = controller.GetFloat(YName) / MultiplierY;
|
var newY = controller.GetFloat(YName) / MultiplierY;
|
||||||
var changed = newX != X && newY != Y;
|
|
||||||
|
var oldX = X / MultiplierX;
|
||||||
|
var oldY = Y / MultiplierY;
|
||||||
|
|
||||||
|
var changed = newX != oldX && newY != oldY;
|
||||||
|
|
||||||
XNumeric.Value = (int)newX;
|
XNumeric.Value = (int)newX;
|
||||||
XNumeric.Value = (int)newY;
|
YNumeric.Value = (int)newY;
|
||||||
|
|
||||||
|
overrideX = (int)newX;
|
||||||
|
overrideY = (int)newY;
|
||||||
|
|
||||||
if (changed)
|
if (changed)
|
||||||
{
|
{
|
||||||
|
@ -71,6 +82,12 @@ namespace BizHawk.Client.EmuHawk
|
||||||
_readonly = value;
|
_readonly = value;
|
||||||
Refresh();
|
Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_readonly)
|
||||||
|
{
|
||||||
|
overrideX = null;
|
||||||
|
overrideY = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -129,6 +146,11 @@ namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
|
if (overrideY.HasValue)
|
||||||
|
{
|
||||||
|
return overrideY.Value;
|
||||||
|
}
|
||||||
|
|
||||||
return (int)(Global.StickyXORAdapter.GetFloat(XName) / MultiplierX);
|
return (int)(Global.StickyXORAdapter.GetFloat(XName) / MultiplierX);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -155,6 +177,11 @@ namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
|
if (overrideY.HasValue)
|
||||||
|
{
|
||||||
|
return overrideX.Value;
|
||||||
|
}
|
||||||
|
|
||||||
return (int)(Global.StickyXORAdapter.GetFloat(YName) / MultiplierY);
|
return (int)(Global.StickyXORAdapter.GetFloat(YName) / MultiplierY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue