summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Juergen Mauser <hjmauser@gmx.net>2012-05-13 17:38:25 +0200
committerTormod Volden <debian.tormod@gmail.com>2012-05-26 17:28:55 +0200
commitad3816e0fb8846768ce13b70ed890714103f8916 (patch)
tree8cd7145f07bc071504d3bf2fdb461ce2d722a207
parent6020843c7c0857c063ca624bb062b4a29cc2097e (diff)
Replace useless counter by bFirstRun flag
Signed-off-by: Hans-Juergen Mauser <hjmauser@gmx.net> [Tormod: split out from an big diff] Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
-rw-r--r--src/savage_vbe.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/savage_vbe.c b/src/savage_vbe.c
index 677523f..05b472c 100644
--- a/src/savage_vbe.c
+++ b/src/savage_vbe.c
@@ -118,7 +118,7 @@ void
SavageSetVESAMode( SavagePtr psav, int n, int Refresh )
{
int iDevInfo;
- static int iCount = 0;
+ static Bool bFirstRun = TRUE;
if (psav->IsSecondary) {
SavageSetVESAModeCrtc2(psav, n, Refresh);
@@ -133,8 +133,10 @@ SavageSetVESAMode( SavagePtr psav, int n, int Refresh )
iDevInfo = SavageGetDevice(psav);
psav->iDevInfo = iDevInfo;
- if( !iCount++ )
+ if( bFirstRun == TRUE ) {
+ bFirstRun = FALSE;
psav->iDevInfoPrim = psav->iDevInfo;
+ }
if( psav->CrtOnly )
psav->iDevInfo = CRT_ACTIVE;
if( psav->TvOn )