sst1, init96.c: coding style tidy-up.
dxdrvr.c: add missing braces around BufDesc[] initializer
This commit is contained in:
@@ -89,7 +89,7 @@ static FxU32 FifoOffset = 0;
|
||||
static FxU32 Width = 0;
|
||||
static FxU32 Height = 0;
|
||||
static FxBool IsFullScreen = 0;
|
||||
static InitBufDesc_t BufDesc[NUM_BUFS] = {0};
|
||||
static InitBufDesc_t BufDesc[NUM_BUFS] = { {0} };
|
||||
#ifdef H3D
|
||||
static int pageFlip = 0;
|
||||
#endif
|
||||
|
||||
@@ -174,9 +174,6 @@ devNum,
|
||||
physAddr,
|
||||
fifoMTRRNum = 0xffffffff;
|
||||
|
||||
static void init96SetupRendering(InitRegisterDesc *regDesc,
|
||||
GrScreenResolution_t sRes);
|
||||
|
||||
/*-----------Debuging Info Data------------------------------*/
|
||||
#ifdef GDBG_INFO_ON
|
||||
/* NOTE:
|
||||
@@ -498,6 +495,8 @@ init96LoadBufRegs(int nBuffers,
|
||||
InitBufDesc_t *pBufDesc,
|
||||
int xRes, int yRes,
|
||||
InitRegisterDesc *rd);
|
||||
static void init96SetupRendering(InitRegisterDesc *regDesc,
|
||||
GrScreenResolution_t sRes);
|
||||
|
||||
#define XY_ONE (1<<SST_XY_FRACBITS)
|
||||
|
||||
@@ -690,7 +689,6 @@ INITVG96ENTRY(init96MapBoard, FxBool , (void *rd, void *info, FxU16 vID, FxU16 d
|
||||
|
||||
GDBG_INFO((80, "SST-96 Initialization code\n"));
|
||||
|
||||
|
||||
/* !!! FIXME hack for vxd bug */
|
||||
putenv( "SST_DUALHEAD=1" );
|
||||
|
||||
@@ -714,21 +712,15 @@ INITVG96ENTRY(init96MapBoard, FxBool , (void *rd, void *info, FxU16 vID, FxU16 d
|
||||
if (regDesc->hwDep.VG96RegDesc.baseAddress == NULL) {
|
||||
#ifdef __WIN32__
|
||||
MessageBox(NULL, pciGetErrorString(), NULL, MB_OK);
|
||||
#else
|
||||
{
|
||||
#ifdef __linux__
|
||||
#elif defined(__linux__)
|
||||
fprintf(stderr, "Failed to map board: %s\n", pciGetErrorString());
|
||||
exit(1);
|
||||
#else
|
||||
#else /* DOS */
|
||||
/* Set Mode 3 before going */
|
||||
union REGS
|
||||
inR, outR;
|
||||
|
||||
inR.w.ax = 0x0003;
|
||||
int386(0x10, &inR, &outR);
|
||||
fprintf(stderr, "%s\n", pciGetErrorString());
|
||||
#endif
|
||||
}
|
||||
#endif /* __WIN32__ */
|
||||
exit(1);
|
||||
return FXFALSE;
|
||||
@@ -769,7 +761,7 @@ INITVG96ENTRY(init96MapBoard, FxBool , (void *rd, void *info, FxU16 vID, FxU16 d
|
||||
sst96InitGetTmuInfo((FxU32 *)sstHW, vg96Info);
|
||||
}
|
||||
#else
|
||||
#ifdef(__DOS32__)
|
||||
#ifdef __DOS32__
|
||||
{
|
||||
/* In dos mode, we do it the way it is supposed to be.
|
||||
In windows mode, calling initEnableRegs() will change the clock
|
||||
@@ -1015,7 +1007,7 @@ INITVG96ENTRY(init96SetVideo, FxBool ,
|
||||
if (curHALData->initAperture)
|
||||
(*curHALData->initAperture)(regDesc);
|
||||
|
||||
#if defined( __DOS32__ )
|
||||
#ifdef __DOS32__
|
||||
{
|
||||
union REGS
|
||||
inR, outR;
|
||||
@@ -1027,7 +1019,7 @@ INITVG96ENTRY(init96SetVideo, FxBool ,
|
||||
GDBG_INFO((80, "%s: Saving Current video mode (0x%x).\n",
|
||||
FN_NAME, oldVidMode));
|
||||
}
|
||||
#endif
|
||||
#endif /* __DOS32__ */
|
||||
|
||||
/*-------------------------------------
|
||||
Set Video Mode
|
||||
@@ -1038,13 +1030,13 @@ INITVG96ENTRY(init96SetVideo, FxBool ,
|
||||
#ifdef __linux__
|
||||
if (!linOpen(hWnd, sRes, vRefresh, cFormat, yOrigin,
|
||||
nColBuffers, nAuxBuffers, bufDesc,
|
||||
xres, yres, &swapType)) {
|
||||
xres, yres, &swapType))
|
||||
#else
|
||||
if (!dxOpen(hWnd, sRes, vRefresh, cFormat, yOrigin,
|
||||
nColBuffers, nAuxBuffers, bufDesc,
|
||||
xres, yres, &swapType)) {
|
||||
xres, yres, &swapType))
|
||||
#endif
|
||||
GDBG_INFO((80, "Failed dxOpen\n"));
|
||||
{ GDBG_INFO((80, "Failed dxOpen\n"));
|
||||
rv = FXFALSE;
|
||||
goto BAIL;
|
||||
}
|
||||
@@ -1146,7 +1138,6 @@ INITVG96ENTRY(init96SetVideo, FxBool ,
|
||||
} while (status & 0x1);
|
||||
} /* end of swap buffer block */
|
||||
|
||||
|
||||
if (tripleBuffering) {
|
||||
GETREGVALFROMENV(regVal, "SST96_FBIJRINIT0", 0xf600);
|
||||
regVal |= (1 << 2);
|
||||
@@ -1401,9 +1392,9 @@ INITVG96ENTRY(init96EnableTransport, FxBool, ( InitFIFOData *info, InitRegisterD
|
||||
|
||||
if (res)
|
||||
pciSetMTRR(fifoMTRRNum, fifoPhysBaseAddress, fifoPhysSize, fifoMemType);
|
||||
else
|
||||
else {
|
||||
GDBG_INFO((80, "%s: Couldn't get free or used MTRR!\n"));
|
||||
|
||||
}
|
||||
|
||||
return rv;
|
||||
|
||||
@@ -1498,7 +1489,6 @@ INITVG96ENTRY(init96Swap, void ,
|
||||
|
||||
sstPtr->swappendCMD = 0x1;
|
||||
|
||||
|
||||
if (gotEnv == FXFALSE) {
|
||||
const char *envVal;
|
||||
if ((envVal = myGetenv("SST96_INITSWAPCOUNT")) != NULL) {
|
||||
@@ -1592,7 +1582,6 @@ INITVG96ENTRY(init96Swap, void ,
|
||||
bI[rfbRenderIdx].rfb));
|
||||
wcb( (FxU32*)&(sstPtr->colBufferSetup), bI[rfbRenderIdx].rfb );
|
||||
|
||||
|
||||
} else {
|
||||
while ((*rd->hwDep.VG96RegDesc.serialStatus) & 0x1);
|
||||
#ifdef __linux__
|
||||
@@ -1610,7 +1599,6 @@ INITVG96ENTRY(init96Swap, void ,
|
||||
} /* init96Swap */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: init96Idle
|
||||
Date: 13-Feb-97
|
||||
@@ -1779,11 +1767,11 @@ INITVG96ENTRY(init96Control, FxBool , ( FxU32 code, InitRegisterDesc *regDesc))
|
||||
if ( !sstHW ) return FXFALSE;
|
||||
|
||||
#ifdef __linux__
|
||||
if (!linControl(code, bufDesc, &xRes, &yRes)) {
|
||||
if (!linControl(code, bufDesc, &xRes, &yRes))
|
||||
#else
|
||||
if (!dxControl(code, bufDesc, &xRes, &yRes)) {
|
||||
if (!dxControl(code, bufDesc, &xRes, &yRes))
|
||||
#endif
|
||||
GDBG_INFO((80, "dxControl failed!\n"));
|
||||
{ GDBG_INFO((80, "dxControl failed!\n"));
|
||||
return FXFALSE;
|
||||
}
|
||||
|
||||
@@ -1990,7 +1978,6 @@ INITVG96ENTRY(init96WrapFIFO, FxBool , (InitRegisterDesc *rd, InitFIFOData *fifo
|
||||
fifoData->hwDep.vg96FIFOData.fifoSize -= 4;
|
||||
}
|
||||
|
||||
|
||||
fifoData->hwDep.vg96FIFOData.fifoCur += 4096;
|
||||
|
||||
/* Wrap back to beginning? */
|
||||
@@ -2028,7 +2015,6 @@ INITVG96ENTRY(init96WrapFIFO, FxBool , (InitRegisterDesc *rd, InitFIFOData *fifo
|
||||
(FxU32) rd->hwDep.VG96RegDesc.baseAddress
|
||||
)
|
||||
));
|
||||
|
||||
}
|
||||
|
||||
GDBG_INFO((80, "%s: Waiting for more room.\n", FN_NAME));
|
||||
|
||||
@@ -108,7 +108,7 @@ static FxU32 FifoOffset = 0;
|
||||
static FxU32 Width = 0;
|
||||
static FxU32 Height = 0;
|
||||
static FxBool IsFullScreen = 0;
|
||||
static InitBufDesc_t BufDesc[NUM_BUFS] = {0};
|
||||
static InitBufDesc_t BufDesc[NUM_BUFS] = { {0} };
|
||||
#ifdef H3D
|
||||
static int pageFlip = 0;
|
||||
#endif
|
||||
|
||||
@@ -725,21 +725,15 @@ INITVG96ENTRY(init96MapBoard, FxBool , (void *rd, void *info, FxU16 vID, FxU16 d
|
||||
if (regDesc->hwDep.VG96RegDesc.baseAddress == NULL) {
|
||||
#ifdef __WIN32__
|
||||
MessageBox(NULL, pciGetErrorString(), NULL, MB_OK);
|
||||
#else
|
||||
{
|
||||
#ifdef __linux__
|
||||
#elif defined(__linux__)
|
||||
fprintf(stderr, "Failed to map board: %s\n", pciGetErrorString());
|
||||
exit(1);
|
||||
#else
|
||||
#else /* DOS */
|
||||
/* Set Mode 3 before going */
|
||||
union REGS
|
||||
inR, outR;
|
||||
|
||||
inR.w.ax = 0x0003;
|
||||
int386(0x10, &inR, &outR);
|
||||
fprintf(stderr, "%s\n", pciGetErrorString());
|
||||
#endif
|
||||
}
|
||||
#endif /* __WIN32__ */
|
||||
exit(1);
|
||||
return FXFALSE;
|
||||
@@ -1050,13 +1044,13 @@ INITVG96ENTRY(init96SetVideo, FxBool ,
|
||||
#ifdef __linux__
|
||||
if (!linOpen(hWnd, sRes, vRefresh, cFormat, yOrigin,
|
||||
nColBuffers, nAuxBuffers, bufDesc,
|
||||
xres, yres, &swapType)) {
|
||||
xres, yres, &swapType))
|
||||
#else
|
||||
if (!dxOpen(hWnd, sRes, vRefresh, cFormat, yOrigin,
|
||||
nColBuffers, nAuxBuffers, bufDesc,
|
||||
xres, yres, &swapType)) {
|
||||
xres, yres, &swapType))
|
||||
#endif
|
||||
GDBG_INFO((80, "Failed dxOpen\n"));
|
||||
{ GDBG_INFO((80, "Failed dxOpen\n"));
|
||||
rv = FXFALSE;
|
||||
goto BAIL;
|
||||
}
|
||||
@@ -1158,7 +1152,6 @@ INITVG96ENTRY(init96SetVideo, FxBool ,
|
||||
} while (status & 0x1);
|
||||
} /* end of swap buffer block */
|
||||
|
||||
|
||||
if (tripleBuffering) {
|
||||
GETREGVALFROMENV(regVal, "SST96_FBIJRINIT0", 0xf600);
|
||||
regVal |= (1 << 2);
|
||||
@@ -1527,7 +1520,6 @@ INITVG96ENTRY(init96Swap, void ,
|
||||
|
||||
if (overrideSwap == FXTRUE)
|
||||
code = overrideVal;
|
||||
|
||||
}
|
||||
|
||||
GDBG_INFO((80, "%s: Sending swapbufferCMD (0x%x) via FIFO callback\n",
|
||||
@@ -1608,7 +1600,6 @@ INITVG96ENTRY(init96Swap, void ,
|
||||
bI[rfbRenderIdx].rfb));
|
||||
wcb( (FxU32*)&(sstPtr->colBufferSetup), bI[rfbRenderIdx].rfb );
|
||||
|
||||
|
||||
} else {
|
||||
while ((*rd->hwDep.VG96RegDesc.serialStatus) & 0x1);
|
||||
#ifdef __linux__
|
||||
@@ -1626,7 +1617,6 @@ INITVG96ENTRY(init96Swap, void ,
|
||||
} /* init96Swap */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: init96Idle
|
||||
Date: 13-Feb-97
|
||||
@@ -1800,11 +1790,11 @@ INITVG96ENTRY(init96Control, FxBool , ( FxU32 code, InitRegisterDesc *regDesc))
|
||||
if ( !sstHW ) return FXFALSE;
|
||||
|
||||
#ifdef __linux__
|
||||
if (!linControl(code, bufDesc, &xRes, &yRes)) {
|
||||
if (!linControl(code, bufDesc, &xRes, &yRes))
|
||||
#else
|
||||
if (!dxControl(code, bufDesc, &xRes, &yRes)) {
|
||||
if (!dxControl(code, bufDesc, &xRes, &yRes))
|
||||
#endif
|
||||
GDBG_INFO((80, "dxControl failed!\n"));
|
||||
{ GDBG_INFO((80, "dxControl failed!\n"));
|
||||
return FXFALSE;
|
||||
}
|
||||
|
||||
@@ -2011,7 +2001,6 @@ INITVG96ENTRY(init96WrapFIFO, FxBool , (InitRegisterDesc *rd, InitFIFOData *fifo
|
||||
fifoData->hwDep.vg96FIFOData.fifoSize -= 4;
|
||||
}
|
||||
|
||||
|
||||
fifoData->hwDep.vg96FIFOData.fifoCur += 4096;
|
||||
|
||||
/* Wrap back to beginning? */
|
||||
@@ -2049,7 +2038,6 @@ INITVG96ENTRY(init96WrapFIFO, FxBool , (InitRegisterDesc *rd, InitFIFOData *fifo
|
||||
(FxU32) rd->hwDep.VG96RegDesc.baseAddress
|
||||
)
|
||||
));
|
||||
|
||||
}
|
||||
|
||||
GDBG_INFO((80, "%s: Waiting for more room.\n", FN_NAME));
|
||||
|
||||
Reference in New Issue
Block a user