summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/savage_driver.h1
-rw-r--r--src/savage_vbe.c12
-rw-r--r--src/savage_video.c3
3 files changed, 16 insertions, 0 deletions
diff --git a/src/savage_driver.h b/src/savage_driver.h
index 355a0f0..aa05b9d 100644
--- a/src/savage_driver.h
+++ b/src/savage_driver.h
@@ -620,6 +620,7 @@ void SavageSetVESAMode( SavagePtr psav, int n, int Refresh );
void SavageSetPanelEnabled( SavagePtr psav, Bool active );
void SavageFreeBIOSModeTable( SavagePtr psav, SavageModeTablePtr* ppTable );
int SavageGetTV( SavagePtr psav );
+void SavageUpdateDevices(ScrnInfoPtr pScrn);
int SavageCorrectDuoViewFlag(int iDevInfo, Bool bEnableActivate, Bool bEnableDeactivate);
SavageModeTablePtr SavageGetBIOSModeTable( SavagePtr psav, int iDepth );
ModeStatus SavageMatchBiosMode(ScrnInfoPtr pScrn,int width,int height,int refresh,
diff --git a/src/savage_vbe.c b/src/savage_vbe.c
index 5576496..1528896 100644
--- a/src/savage_vbe.c
+++ b/src/savage_vbe.c
@@ -307,6 +307,18 @@ int SavageGetTV( SavagePtr psav )
return ((psav->pVbe->pInt10->cx) & 0xc); /* TV mode bits are bits 2 and 3 */
}
+/* function for online update of current devices and TV format */
+void SavageUpdateDevices(ScrnInfoPtr pScrn)
+{
+ SavagePtr psav;
+
+ psav = SAVPTR(pScrn);
+ psav->iDevInfo = SavageGetDevice(psav);
+ psav->PAL = ((SavageGetTV(psav) & BIOS_TV_PAL) != 0);
+ psav->TvOn = ((psav->iDevInfo & TV_ACTIVE) != 0);
+ psav->CrtOnly = ((psav->iDevInfo & (unsigned char) ~CRT_ACTIVE) == 0);
+}
+
/* Function to correct the DuoView flag in the case of a single display */
int SavageCorrectDuoViewFlag(int iDevInfo, Bool bEnableActivate,
diff --git a/src/savage_video.c b/src/savage_video.c
index 2124032..d7546d2 100644
--- a/src/savage_video.c
+++ b/src/savage_video.c
@@ -1662,6 +1662,9 @@ SavageDisplayVideoNew(
/* Calculate horizontal and vertical scale factors. */
+ /* update device list to get the correct prerequisites for the following calculations */
+ SavageUpdateDevices(pScrn);
+
if ( S3_SAVAGE_MOBILE_SERIES(psav->Chipset) &&
(psav->DisplayType == MT_LCD) &&
!psav->CrtOnly &&