mirror of https://github.com/stella-emu/stella.git
Fix undeflow in RESMP.
This commit is contained in:
parent
38d8d893aa
commit
a9d1ed3741
|
@ -215,13 +215,13 @@ uInt8 Player::getRespClock() const
|
||||||
switch (myWidth)
|
switch (myWidth)
|
||||||
{
|
{
|
||||||
case 8:
|
case 8:
|
||||||
return myCounter - 3;
|
return (myCounter + 160 - 3) % 160;
|
||||||
|
|
||||||
case 16:
|
case 16:
|
||||||
return myCounter - 9;
|
return (myCounter + 160 - 9) % 160;
|
||||||
|
|
||||||
case 32:
|
case 32:
|
||||||
return myCounter - 13;
|
return (myCounter + 160 - 13) % 160;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw runtime_error("invalid width");
|
throw runtime_error("invalid width");
|
||||||
|
|
Loading…
Reference in New Issue