From c9bf8ca8449c882651e0b0e86039ae6fec0d9ae0 Mon Sep 17 00:00:00 2001 From: Tormod Volden Date: Sun, 20 May 2012 21:44:57 +0200 Subject: fixup: small cleanup in SavageSetVESAMode() Since I have reworked the PAL/NTSC configuration handling the comments about this is not necessary. (these patches will likely be rebased on top of that rework) Otherwise just clean out double comments and fix whitespace. --- src/savage_vbe.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/src/savage_vbe.c b/src/savage_vbe.c index 89afd1a..d8a0833 100644 --- a/src/savage_vbe.c +++ b/src/savage_vbe.c @@ -138,39 +138,35 @@ SavageSetVESAMode( SavagePtr psav, int n, int Refresh ) } /* Get current display device status. */ - iDevInfo = SavageGetDevice(psav); iTVInfo = SavageGetTV(psav); - /* - * Check if we run for the first time - if this is the case, - * save the original settings both as current and original. - * Additionally, prefer the flag settings at this point as they are the user's desire. - */ + if( bFirstRun == TRUE ) { bFirstRun = FALSE; /* run for the first time - store settings as current and original */ - psav->iDevInfo = iDevInfo; psav->iDevInfoPrim = iDevInfo; + psav->iDevInfo = iDevInfo; /* add features requested by the config to the current settings */ if( psav->TvOn ) { psav->iDevInfo |= TV_ACTIVE; /* TvOn is NOT TvOnly! */ } if( psav->CrtOnly ) { - psav->iDevInfo = CRT_ACTIVE; /* do this at last as this is exclusive and cancels other settings */ + psav->iDevInfo = CRT_ACTIVE; /* cancels other settings */ } - /* read in TV format from the BIOS, ignore what has been configured before as the handling is silly and not documented (PAL does not mean that TV should be switched on, etc.) */ - /* TODO: check how preference of BIOS and config can be handled intelligently, this must be coordinated with savage_driver.c */ psav->PAL = ((iTVInfo & BIOS_TV_PAL) != 0); } else { /* subsequent run */ - /* if the current settings are identical to the original, we likely come from text mode - prefer the stored ones */ - /* but take the current ones if settings are different as they might have been modified on-line */ + /* if the current settings are identical to the original, we likely + come from text mode - prefer the stored ones */ + /* but take the current ones if settings are different as they might + have been modified on-line (outside this driver) */ if (psav->iDevInfoPrim != iDevInfo) { psav->iDevInfo = iDevInfo; } - /* in both cases, update the flags according to the selected configuration */ + /* update the configuration flags to reflect current status */ psav->TvOn = ((psav->iDevInfo & TV_ACTIVE) != 0); /* only set CRT flag if no other output is active */ - psav->CrtOnly = (((psav->iDevInfo & ACTIVE_DEVICES) & ((unsigned char) ~CRT_ACTIVE)) == 0); + psav->CrtOnly = (((psav->iDevInfo & ACTIVE_DEVICES) & + ((unsigned char) ~CRT_ACTIVE)) == 0); } /* fully adjust the DuoView flag */ -- cgit v1.2.3