mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 07:17:45 -04:00
gp2x: hack to avoid 940 reinit
..it used to rely on upper layer to avoid YM2612Init_940() calls on menu entry
This commit is contained in:
parent
f47d0a2898
commit
2d6460655c
1 changed files with 8 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue