From 83e3b1ce1a3b5e89cdd76893ed24668543aeb688 Mon Sep 17 00:00:00 2001 From: aiju Date: Sat, 14 Apr 2012 20:53:42 +0200 Subject: [PATCH] games/gb: crash and audio fix --- sys/src/games/gb/audio.c | 1 + sys/src/games/gb/state.c | 1 + 2 files changed, 2 insertions(+) diff --git a/sys/src/games/gb/audio.c b/sys/src/games/gb/audio.c index 92356b045..09806cbed 100644 --- a/sys/src/games/gb/audio.c +++ b/sys/src/games/gb/audio.c @@ -170,6 +170,7 @@ dosample(short *smp) ch4sr |= k; ch4c = 0; } + ch4c++; if(ch4sr & 1) ch4s = -1; else diff --git a/sys/src/games/gb/state.c b/sys/src/games/gb/state.c index 2b2f57391..fcf22a509 100644 --- a/sys/src/games/gb/state.c +++ b/sys/src/games/gb/state.c @@ -81,6 +81,7 @@ loadstate(char *file) clock = get32(); ppuclock = get32(); divclock = get32(); + timerclock = get32(); timerfreq = get32(); timer = get32(); rombank = get32();