-set progressive flag if component cable is found

This commit is contained in:
fix94.1 2012-02-21 17:21:12 +00:00
parent 13c5a0e906
commit 130949f212

View File

@ -1,30 +1,5 @@
#include <stdint.h>
#include <string.h>
#include <gccore.h>
#include <ogc/es.h>
#include <ogc/video_types.h>
#include <dirent.h>
#include <stdio.h>
#include <stdarg.h>
#include <malloc.h>
#include <math.h>
#include <ogcsys.h>
#include <unistd.h>
#include <sys/statvfs.h>
#include "gc.h"
#define SEP 0xFF
#define BC 0x0000000100000100ULL
#define MIOS 0x0000000100000101ULL
/** Base address for video registers. */
#define MEM_VIDEO_BASE (0xCC002000)
#define VIDEO_MODE_NTSC 0
#define VIDEO_MODE_PAL 1
#define VIDEO_MODE_PAL60 2
#define VIDEO_MODE_NTSC480P 3
#define VIDEO_MODE_PAL480P 4
#define SRAM_ENGLISH 0
#define SRAM_GERMAN 1
@ -43,18 +18,22 @@ void set_video_mode(int i)
sram = __SYS_LockSram();
void *m_frameBuf;
static GXRModeObj *rmode;
if (i == VIDEO_MODE_NTSC)
if(VIDEO_HaveComponentCable())
sram->flags |= 0x80; //set progressive flag
else
sram->flags &= 0x7F; //clear progressive flag
if (!i)
{
rmode = &TVNtsc480IntDf;
sram->flags &= 0xFE; // Clear bit 0 to set the video mode to NTSC
//sram->flags |= 0x80; //set progressive flag
sram->ntd &= 0xBF; //clear pal60 flag
}
else
{
rmode = &TVPal528IntDf;
sram->flags |= 0x01; // Set bit 0 to set the video mode to PAL
sram->flags &= 0x7F; //clear progressive flag
sram->ntd |= 0x40; //set pal60 flag
}