diff options
-rw-r--r-- | src/savage_vbe.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/savage_vbe.c b/src/savage_vbe.c index 5cca4cd..89afd1a 100644 --- a/src/savage_vbe.c +++ b/src/savage_vbe.c @@ -39,21 +39,15 @@ SavageClearVM86Regs( xf86Int10InfoPtr pInt ) void SavageSetTextMode( SavagePtr psav ) { - int iDevInfo; - - /* The BIOS settings currently in effect (which are retrieved by SavageGetDevice) are the reference for comparison */ - iDevInfo = SavageGetDevice(psav); - - /* Save the BIOS settings (which are in effect) as current if they are different from the last state saved as "current" */ - if (iDevInfo != psav->iDevInfo) { - psav->iDevInfo = iDevInfo; - } + /* Retrieve current output status via BIOS calls */ + psav->iDevInfo = SavageGetDevice(psav); - /* TODO: should the original settings also be corrected for the DuoView flag? */ + /* TODO: should the settings also be corrected for the DuoView flag? */ - /* Restore display device to original (primary) state if changed since last mode switch AWAY from text. */ - /* avoid unnecessary changes - mask for ACTIVE_DEVICES only */ - if( (iDevInfo & ACTIVE_DEVICES) != (psav->iDevInfoPrim & ACTIVE_DEVICES) ) { + /* Restore display device to original (primary) state if active output + device status has changed since last mode switch AWAY from text. */ + if( (psav->iDevInfo & ACTIVE_DEVICES) != + (psav->iDevInfoPrim & ACTIVE_DEVICES) ) { SavageClearVM86Regs( psav->pVbe->pInt10 ); psav->pVbe->pInt10->ax = 0x4f14; psav->pVbe->pInt10->bx = 0x0003; |