mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-11-04 18:05:06 +01:00
[Core/Gamecube] improved progressive mode switch request on startup when component cable is detected
This commit is contained in:
parent
7033010412
commit
b00df47c1e
48
gx/config.c
48
gx/config.c
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user