Skip to content

Commit

Permalink
32x, take over sh2 cycles setting in-game
Browse files Browse the repository at this point in the history
  • Loading branch information
irixxxx committed Dec 30, 2024
1 parent 7808c76 commit 071a9e5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion pico/32x/32x.c
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,11 @@ void Pico32xStateLoaded(int is_early)

void Pico32xPrepare(void)
{
Pico32xSetClocks(PICO_MSH2_HZ, PICO_SSH2_HZ);
// fallback in case it was missing in saved config
if (msh2.mult_m68k_to_sh2 == 0 || msh2.mult_sh2_to_m68k == 0)
Pico32xSetClocks(PICO_MSH2_HZ, 0);
if (ssh2.mult_m68k_to_sh2 == 0 || ssh2.mult_sh2_to_m68k == 0)
Pico32xSetClocks(0, PICO_SSH2_HZ);

sh2_execute_prepare(&msh2, PicoIn.opt & POPT_EN_DRC);
sh2_execute_prepare(&ssh2, PicoIn.opt & POPT_EN_DRC);
Expand Down
4 changes: 2 additions & 2 deletions platform/common/menu_pico.c
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,8 @@ static int mh_opt_sh2cycles(int id, int keys)
else if (*khz > 0x7fffffff / 1000)
*khz = 0x7fffffff / 1000;

Pico32xSetClocks(currentConfig.msh2_khz * 1000, currentConfig.ssh2_khz * 1000);

return 0;
}

Expand Down Expand Up @@ -573,8 +575,6 @@ static int menu_loop_32x_options(int id, int keys)
me_enable(e_menu_32x_options, MA_32XOPT_RENDERER, 0);
me_loop_d(e_menu_32x_options, &sel, menu_draw_prep, NULL);

Pico32xSetClocks(currentConfig.msh2_khz * 1000, currentConfig.msh2_khz * 1000);

return 0;
}

Expand Down

0 comments on commit 071a9e5

Please sign in to comment.