summaryrefslogtreecommitdiff
path: root/src/savage_driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/savage_driver.c')
-rw-r--r--src/savage_driver.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/src/savage_driver.c b/src/savage_driver.c
index 4c8386d..658c925 100644
--- a/src/savage_driver.c
+++ b/src/savage_driver.c
@@ -269,7 +269,7 @@ typedef enum {
,OPTION_SHADOW_STATUS
,OPTION_CRT_ONLY
,OPTION_TV_ON
- ,OPTION_TV_PAL
+ ,OPTION_TVSTD
,OPTION_FORCE_INIT
,OPTION_OVERLAY
,OPTION_T_KEY
@@ -302,7 +302,7 @@ static const OptionInfoRec SavageOptions[] =
{ OPTION_SHADOW_STATUS, "ShadowStatus", OPTV_BOOLEAN, {0}, FALSE },
{ OPTION_CRT_ONLY, "CrtOnly", OPTV_BOOLEAN, {0}, FALSE },
{ OPTION_TV_ON, "TvOn", OPTV_BOOLEAN, {0}, FALSE },
- { OPTION_TV_PAL, "PAL", OPTV_BOOLEAN, {0}, FALSE },
+ { OPTION_TVSTD, "TVStandard", OPTV_STRING, {0}, FALSE },
{ OPTION_FORCE_INIT,"ForceInit", OPTV_BOOLEAN, {0}, FALSE },
{ OPTION_OVERLAY, "Overlay", OPTV_ANYSTR, {0}, FALSE },
{ OPTION_T_KEY, "TransparencyKey", OPTV_ANYSTR, {0}, FALSE },
@@ -1374,20 +1374,26 @@ static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags)
xf86DrvMsg( pScrn->scrnIndex, X_CONFIG,
"Option: CrtOnly enabled\n" );
- if( xf86GetOptValBool( psav->Options, OPTION_TV_ON, &psav->TvOn)) {
- psav->PAL = FALSE;
- SavageGetTvMaxSize(psav);
+ psav->tvStd = TV_STD_UNDEFINED;
+ if ((s = xf86GetOptValString(psav->Options, OPTION_TVSTD))) {
+ if (!strcasecmp("pal", s))
+ psav->tvStd = TV_STD_PAL;
+ else if (!strcasecmp("ntsc", s))
+ psav->tvStd = TV_STD_NTSC;
+ else if (!strcasecmp("ntsc-j", s) || (!strcasecmp("ntscj", s)))
+ psav->tvStd = TV_STD_NTSC_J;
+ else {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Invalid TV Standard: %s\n", s);
+ }
}
- if( xf86GetOptValBool( psav->Options, OPTION_TV_PAL, &psav->PAL)) {
+ if( xf86GetOptValBool( psav->Options, OPTION_TV_ON, &psav->TvOn)) {
SavageGetTvMaxSize(psav);
- psav->TvOn = TRUE;
}
if( psav->TvOn )
xf86DrvMsg( pScrn->scrnIndex, X_CONFIG,
- "TV enabled in %s format\n",
- psav->PAL ? "PAL" : "NTSC" );
+ "TV enabled\n");
psav->ForceInit = 0;
if( xf86GetOptValBool( psav->Options, OPTION_FORCE_INIT, &psav->ForceInit))
@@ -4608,7 +4614,7 @@ SavageDDC1(ScrnInfoPtr pScrn)
static void
SavageGetTvMaxSize(SavagePtr psav)
{
- if( psav->PAL ) {
+ if( psav->tvStd == TV_STD_PAL) {
psav->TVSizeX = 800;
psav->TVSizeY = 600;
}