[Core/Gamecube] improved progressive mode switch request on startup when component cable is detected

This commit is contained in:
EkeEke 2013-07-11 23:33:11 +02:00 committed by twinaphex
parent 4c188bb4a1
commit a32165f064

View File

@ -223,27 +223,37 @@ void config_default(void)
int loaded = config_load(); int loaded = config_load();
#ifndef HW_RVL #ifndef HW_RVL
/* detect progressive mode enable/disable requests */ /* check if component cable was detected */
PAD_ScanPads(); if (VIDEO_HaveComponentCable())
if (PAD_ButtonsHeld(0) & PAD_BUTTON_B)
{ {
/* swap progressive mode enable flag and play some sound to inform user */ /* when component cable is detected, libogc automatically enables progressive mode */
config.v_prog ^= 1; /* as preferred video mode but it could still be used on TV not supporting 480p/576p */
ASND_Pause(0); PAD_ScanPads();
int voice = ASND_GetFirstUnusedVoice();
ASND_SetVoice(voice,VOICE_MONO_16BIT,44100,0,(u8 *)intro_pcm,intro_pcm_size,200,200,NULL);
sleep (2);
ASND_Pause(1);
}
/* switch into 480p if component cable has been detected and progressive mode is enabled */ /* detect progressive mode switch requests */
if (VIDEO_HaveComponentCable() && config.v_prog) if (PAD_ButtonsHeld(0) & PAD_BUTTON_B)
{ {
vmode = &TVNtsc480Prog; /* swap progressive mode enable flag */
VIDEO_Configure (vmode); config.v_prog ^= 1;
VIDEO_Flush();
VIDEO_WaitVSync(); /* play some sound to inform user */
VIDEO_WaitVSync(); ASND_Pause(0);
int voice = ASND_GetFirstUnusedVoice();
ASND_SetVoice(voice,VOICE_MONO_16BIT,44100,0,(u8 *)intro_pcm,intro_pcm_size,200,200,NULL);
sleep (2);
ASND_Pause(1);
}
/* check if progressive mode should be disabled */
if (!config.v_prog)
{
/* switch menu video mode to interlaced */
vmode->viTVMode = (vmode->viTVMode & ~3) | VI_INTERLACE;
VIDEO_Configure (vmode);
VIDEO_Flush();
VIDEO_WaitVSync();
VIDEO_WaitVSync();
}
} }
#endif #endif