uninitialized variables? oh my!

This commit is contained in:
tildearrow 2021-12-08 01:31:35 -05:00
parent 4eec990ec1
commit fe5f8afa05
3 changed files with 6 additions and 2 deletions

View file

@ -145,7 +145,9 @@ void DivPlatformNES::tick() {
if ((chan[i].prevFreq>>8)!=(chan[i].freq>>8) || i==2) {
apu_wr_reg(0x4003+i*4,0xf8|(chan[i].freq>>8));
}
chan[i].prevFreq=chan[i].freq;
if (chan[i].freq!=65535 && chan[i].freq!=0) {
chan[i].prevFreq=chan[i].freq;
}
}
if (chan[i].keyOn) chan[i].keyOn=false;
if (chan[i].keyOff) chan[i].keyOff=false;

View file

@ -28,6 +28,7 @@ class DivPlatformNES: public DivDispatch {
keyOff(false),
inPorta(false),
vol(15),
outVol(15),
wave(-1) {}
};
Channel chan[5];

View file

@ -23,7 +23,8 @@ class DivPlatformSMS: public DivDispatch {
freqChanged(false),
keyOn(false),
keyOff(false),
vol(15) {}
vol(15),
outVol(15) {}
};
Channel chan[4];
unsigned char snNoiseMode;