Correction: rendering mode was left displayed at the bottom of the screen in 32X, Correction: resync vid and audio every 5minutes, Correction: wait 120 frames before loading save from SegaCD

This commit is contained in:
Vincent-FK
2021-05-03 10:23:54 +02:00
parent 4f4a49dacd
commit 0b95bad314
2 changed files with 22 additions and 3 deletions

View File

@@ -1682,8 +1682,6 @@ void emu_loop(void)
fpsbuff[0] = 0;
printf("%s ------------------ \n", __func__);
PicoLoopPrepare();
plat_video_loop_prepare();
@@ -1744,6 +1742,19 @@ void emu_loop(void)
// second changed?
if (timestamp_x3 - timestamp_fps_x3 >= ms_to_ticks(1000) * 3)
{
#define FUNKEY_RESYNCHRONIZE_AUDIO_SECS (5*60)
#ifdef FUNKEY_RESYNCHRONIZE_AUDIO_SECS
static unsigned int last_resync = 0, cur_sec=0;
if(cur_sec++ - last_resync >= FUNKEY_RESYNCHRONIZE_AUDIO_SECS){
last_resync = cur_sec;
/** Resync here (same as quitting ans relaunching loop for now) */
printf("Resync sound now\n");
emu_sound_stop();
pemu_sound_start();
}
#endif //FUNKEY_RESYNCHRONIZE_AUDIO_SECS
#ifdef BENCHMARK
static int bench = 0, bench_fps = 0, bench_fps_s = 0, bfp = 0, bf[4];
if (++bench == 10) {
@@ -1852,7 +1863,7 @@ void emu_loop(void)
/* Leave some time for the bios to load before starting a quick load at boot */
/* (Sega CD doesn't quick load at boot otherwise) */
/* Should have a much cleaner implementation thant this fix */
if((PicoIn.AHW & PAHW_MCD) && frame_nb >= 100){
if((PicoIn.AHW & PAHW_MCD) && frame_nb >= 120){
/* Load slot */
if(load_state_slot != -1){

View File

@@ -91,6 +91,13 @@ static unsigned short *get_16bit_start(unsigned short *buf)
void pemu_finalize_frame(const char *fps, const char *notice)
{
//#define FUNKEY_AUTHORIZE_TEXT_OVERLAY
#ifndef FUNKEY_AUTHORIZE_TEXT_OVERLAY
return;
#endif //FUNKEY_AUTHORIZE_TEXT_OVERLAY
if (!is_16bit_mode()) {
// convert the 8 bit CLUT output to 16 bit RGB
unsigned short *pd = (unsigned short *)g_screen_ptr +
@@ -172,6 +179,7 @@ void plat_status_msg_clear(void)
void plat_status_msg_busy_next(const char *msg)
{
printf("****** %s: %s\n", __func__, msg);
plat_status_msg_clear();
pemu_finalize_frame("", msg);
plat_video_flip();