diff options
author | Tormod Volden <debian.tormod@gmail.com> | 2012-05-10 18:30:52 +0200 |
---|---|---|
committer | Tormod Volden <debian.tormod@gmail.com> | 2012-05-20 21:50:13 +0200 |
commit | 4d07bc05b027e8fdcc30cab0958eada62642dde2 (patch) | |
tree | 721ef6b1c362732c3ec2767bf329134621d57412 | |
parent | fbb1f41cd3a4a0f60d761bc2d9a7c20a7ae5dcdd (diff) |
fixup: simplify SavageUpdateDevices
For setting psav->CrtOnly:
Should we really ignore the CRT_ACTIVE bit here, or can we
simply check iDeviceList == CRT_ACTIVE instead?
And mask it with ACTIVE_DEVICES if DUO_ON should be ignored?
-rw-r--r-- | src/savage_video.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/src/savage_video.c b/src/savage_video.c index 5ce5da9..f473e1c 100644 --- a/src/savage_video.c +++ b/src/savage_video.c @@ -1434,21 +1434,12 @@ SavageFreeMemory( static void SavageUpdateDevices(ScrnInfoPtr pScrn) { SavagePtr psav; - int iDeviceList; - int iTVFormatList; psav = SAVPTR(pScrn); - - iDeviceList = SavageGetDevice(psav); - iTVFormatList = SavageGetTV(psav); - - /* start updating the devices */ - psav->PAL = ((iTVFormatList & BIOS_TV_PAL) != 0); - psav->TvOn = ((iDeviceList & TV_ACTIVE) != 0); - /* set the CRT flag intelligently by obeying the word "only" */ - psav->CrtOnly = ((iDeviceList & ((unsigned char) ~CRT_ACTIVE)) == 0); - /* update the current device list */ - psav->iDevInfo = iDeviceList; + 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); } static void |