From: notaz Date: Sat, 12 Oct 2013 00:16:51 +0000 (+0300) Subject: gp2x: hack to avoid 940 reinit X-Git-Tag: v1.91~3 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d6460655c774462193bbc893dce5a43e04b4ed7;p=picodrive.git gp2x: hack to avoid 940 reinit ..it used to rely on upper layer to avoid YM2612Init_940() calls on menu entry --- diff --git a/platform/gp2x/940ctl.c b/platform/gp2x/940ctl.c index d3769570..6ba13bd8 100644 --- a/platform/gp2x/940ctl.c +++ b/platform/gp2x/940ctl.c @@ -284,6 +284,12 @@ void sharedmem940_finish(void) void YM2612Init_940(int baseclock, int rate) { + static int oldrate; + + // HACK + if (Pico.m.frame_count > 0 && !crashed_940 && rate == oldrate) + return; + printf("YM2612Init_940()\n"); printf("Mem usage: shared_data: %i, shared_ctl: %i\n", sizeof(*shared_data), sizeof(*shared_ctl)); @@ -353,6 +359,8 @@ void YM2612Init_940(int baseclock, int rate) shared_ctl->baseclock = baseclock; shared_ctl->rate = rate; add_job_940(JOB940_INITALL); + + oldrate = rate; }