diff options
author | Tormod Volden <debian.tormod@gmail.com> | 2012-05-20 19:56:02 +0200 |
---|---|---|
committer | Tormod Volden <debian.tormod@gmail.com> | 2012-05-20 21:50:13 +0200 |
commit | 0fcc405001c8b85f6cadb863784848366afd8278 (patch) | |
tree | 69af1f5e3da380aac75d9f65f97f5bc56ab767b8 /src/savage_vbe.c | |
parent | 4d07bc05b027e8fdcc30cab0958eada62642dde2 (diff) |
fixup: move SavageUpdateDevices to savage_vbe.ctormod-sync
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, |