Reset linecount on connects, reset the SID when the client disconnects

This commit is contained in:
simon.kagstrom 2009-11-08 15:29:16 +00:00
parent 92c007817d
commit 0e2bd92a57
2 changed files with 5 additions and 1 deletions

View File

@ -497,6 +497,7 @@ void C64::network_vblank()
this->network_connection_type = MASTER;
else
this->network_connection_type = CLIENT;
this->linecnt = 0;
}
else if (err != AGAIN_ERROR)
{
@ -524,6 +525,7 @@ void C64::network_vblank()
delete remote;
this->peer = NULL;
this->network_connection_type = NONE;
this->TheSID->Reset();
return;
}
if (this->network_connection_type == CLIENT)

View File

@ -939,7 +939,9 @@ void MOS6581::EmulateLine(void)
cur = TheC64->peer->DequeueSound();
}
}
TheC64->linecnt++;
if (TheC64->network_connection_type == MASTER ||
TheC64->network_connection_type == CLIENT)
TheC64->linecnt++;
}
void DigitalRenderer::WriteRegister(uint16 adr, uint8 byte)