summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTormod Volden <debian.tormod@gmail.com>2012-05-20 21:44:57 +0200
committerTormod Volden <debian.tormod@gmail.com>2012-05-20 21:50:14 +0200
commitc9bf8ca8449c882651e0b0e86039ae6fec0d9ae0 (patch)
tree866ff152af8e9c8eea9b752137c46c402bd19f6f
parent100ebd8040605dc9c87ee613c66c082273741270 (diff)
fixup: small cleanup in SavageSetVESAMode()output-hansj
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.
-rw-r--r--src/savage_vbe.c24
1 files 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 */