From 2d6460655c774462193bbc893dce5a43e04b4ed7 Mon Sep 17 00:00:00 2001 From: notaz Date: Sat, 12 Oct 2013 03:16:51 +0300 Subject: [PATCH] gp2x: hack to avoid 940 reinit ..it used to rely on upper layer to avoid YM2612Init_940() calls on menu entry --- platform/gp2x/940ctl.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/platform/gp2x/940ctl.c b/platform/gp2x/940ctl.c index d376957..6ba13bd 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; } -- 2.39.2