summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/savage_driver.h1
-rw-r--r--src/savage_vbe.c13
2 files changed, 14 insertions, 0 deletions
diff --git a/src/savage_driver.h b/src/savage_driver.h
index 338cfac..9849fdf 100644
--- a/src/savage_driver.h
+++ b/src/savage_driver.h
@@ -619,6 +619,7 @@ void SavageSetTextMode( SavagePtr psav );
void SavageSetVESAMode( SavagePtr psav, int n, int Refresh );
void SavageSetPanelEnabled( SavagePtr psav, Bool active );
void SavageFreeBIOSModeTable( SavagePtr psav, SavageModeTablePtr* ppTable );
+int SavageGetTV( SavagePtr psav );
SavageModeTablePtr SavageGetBIOSModeTable( SavagePtr psav, int iDepth );
ModeStatus SavageMatchBiosMode(ScrnInfoPtr pScrn,int width,int height,int refresh,
unsigned int *vesaMode,unsigned int *newRefresh);
diff --git a/src/savage_vbe.c b/src/savage_vbe.c
index d22b560..17a534e 100644
--- a/src/savage_vbe.c
+++ b/src/savage_vbe.c
@@ -222,6 +222,19 @@ static int SavageGetDevice( SavagePtr psav )
return ((psav->pVbe->pInt10->cx) & 0xf);
}
+/* Function to get TV format. */
+
+int SavageGetTV( SavagePtr psav )
+{
+ SavageClearVM86Regs( psav->pVbe->pInt10 );
+ psav->pVbe->pInt10->ax = 0x4f14; /* S3 extensions */
+ psav->pVbe->pInt10->bx = 0x0107; /* get TV mode */
+
+ xf86ExecX86int10( psav->pVbe->pInt10 );
+
+ return ((psav->pVbe->pInt10->cx) & 0xc); /* TV mode bits are bits 2 and 3 */
+}
+
void
SavageFreeBIOSModeTable( SavagePtr psav, SavageModeTablePtr* ppTable )