Skip to content

Commit

Permalink
Wait for component cable
Browse files Browse the repository at this point in the history
  • Loading branch information
9ary committed Jan 19, 2024
1 parent e6f2088 commit fef3483
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions source/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,19 @@ void delay_exit() {

int main()
{
// GCVideo takes a while to boot up.
// If VIDEO_GetPreferredMode is called before it's done,
// it will not see the "component cable", and default to interlaced mode,
// causing extraneous mode switches in the chainloaded application.
u64 start = gettime();
if (SYS_GetProgressiveScan()) {
while (!VIDEO_HaveComponentCable()) {
if (diff_sec(start, gettime()) >= 1) {
break;
}
}
}

VIDEO_Init();
PAD_Init();
GXRModeObj *rmode = VIDEO_GetPreferredMode(NULL);
Expand Down

0 comments on commit fef3483

Please sign in to comment.