2600: fix hard reset sound crash caused by recent fuddlings

This commit is contained in:
goyuken 2014-05-26 01:21:31 +00:00
parent 898c57f5d9
commit 4f744323cf
1 changed files with 15 additions and 17 deletions

View File

@ -11,7 +11,6 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
private TIA _tia;
private DCFilter _dcfilter;
private MapperBase _mapper;
private bool _hardResetSignal;
public byte[] Ram;
@ -346,6 +345,12 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
_frame++;
_islag = true;
_tia.LineCount = 0;
if (Controller["Power"])
{
HardReset();
}
_tia.BeginAudioFrame();
while (_tia.LineCount < _tia.NominalNumScanlines)
{
@ -355,13 +360,6 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
_tia.CompleteAudioFrame();
if (_hardResetSignal)
{
HardReset();
}
_hardResetSignal = Controller["Power"];
if (_islag)
{
LagCount++;