[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
parent 7033010412
commit b00df47c1e

View File

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