diff options
Diffstat (limited to 'src/savage_vbe.c')
-rw-r--r-- | src/savage_vbe.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/savage_vbe.c b/src/savage_vbe.c index 90127e6..1528896 100644 --- a/src/savage_vbe.c +++ b/src/savage_vbe.c @@ -18,6 +18,7 @@ #endif #define L_ADD(x) (B_O32(x) & 0xffff) + ((B_O32(x) >> 12) & 0xffff00) +static int SavageGetDevice( SavagePtr psav ); /*static int SavageGetTVType( SavagePtr psav );*/ void SavageSetVESAModeCrtc1( SavagePtr psav, int n, int Refresh ); void SavageSetVESAModeCrtc2( SavagePtr psav, int n, int Refresh ); @@ -282,7 +283,7 @@ SavageSetPanelEnabled( SavagePtr psav, Bool active ) /* Function to get supported device list. */ -int SavageGetDevice( SavagePtr psav ) +static int SavageGetDevice( SavagePtr psav ) { SavageClearVM86Regs( psav->pVbe->pInt10 ); psav->pVbe->pInt10->ax = 0x4f14; /* S3 extensions */ @@ -306,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, |