Fix touch coord calc when OpenGL is not available, probably fix off by one here too (I think this is right?)
This commit is contained in:
parent
07126b1e48
commit
f6a77a8410
|
@ -191,8 +191,8 @@ namespace BizHawk.Client.Common.Filters
|
||||||
{
|
{
|
||||||
var ret = _nds.GetTouchCoords((int)point.X, (int)point.Y);
|
var ret = _nds.GetTouchCoords((int)point.X, (int)point.Y);
|
||||||
var vp = _nds.AsVideoProvider();
|
var vp = _nds.AsVideoProvider();
|
||||||
ret.X *= vp.BufferWidth / 255.0f;
|
ret.X *= vp.BufferWidth / 256.0f;
|
||||||
ret.Y *= vp.BufferHeight / 191.0f;
|
ret.Y *= vp.BufferHeight / 192.0f;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -77,6 +77,11 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.NDS
|
||||||
{
|
{
|
||||||
_core.GetTouchCoords(ref x, ref y);
|
_core.GetTouchCoords(ref x, ref y);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// no GL context, so nothing fancy can be applied
|
||||||
|
y = Math.Max(0, y - 192);
|
||||||
|
}
|
||||||
|
|
||||||
return new(x, y);
|
return new(x, y);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue