mirror of
https://github.com/reactos/reactos.git
synced 2025-05-28 21:48:19 +00:00
Fix some bugs, reported by GCC.
svn path=/trunk/; revision=42193
This commit is contained in:
parent
4deef99ee8
commit
6e31a0dd00
3 changed files with 5 additions and 6 deletions
|
@ -24,8 +24,8 @@ HRESULT CALLBACK EnumDisplayModes( LPDDSURFACEDESC2 pDDSD, ENUMCONTEXT* Context
|
||||||
DDSURFACEDESC2 DisplayMode = {0};
|
DDSURFACEDESC2 DisplayMode = {0};
|
||||||
DisplayMode.dwSize = sizeof(DDSURFACEDESC2);
|
DisplayMode.dwSize = sizeof(DDSURFACEDESC2);
|
||||||
|
|
||||||
TEST ( pDDSD->dwFlags == DDSD_HEIGHT | DDSD_WIDTH | DDSD_PITCH | DDSD_PIXELFORMAT | DDSD_REFRESHRATE);
|
TEST ( pDDSD->dwFlags == (DDSD_HEIGHT | DDSD_WIDTH | DDSD_PITCH | DDSD_PIXELFORMAT | DDSD_REFRESHRATE));
|
||||||
TEST ( pDDSD->ddpfPixelFormat.dwFlags == DDPF_RGB | DDPF_PALETTEINDEXED8 || pDDSD->ddpfPixelFormat.dwFlags == DDPF_RGB );
|
TEST ( pDDSD->ddpfPixelFormat.dwFlags == (DDPF_RGB | DDPF_PALETTEINDEXED8) || pDDSD->ddpfPixelFormat.dwFlags == DDPF_RGB );
|
||||||
TEST ( Context->DirectDraw->SetDisplayMode (pDDSD->dwWidth, pDDSD->dwHeight, pDDSD->ddpfPixelFormat.dwRGBBitCount, pDDSD->dwRefreshRate, 0) == DD_OK);
|
TEST ( Context->DirectDraw->SetDisplayMode (pDDSD->dwWidth, pDDSD->dwHeight, pDDSD->ddpfPixelFormat.dwRGBBitCount, pDDSD->dwRefreshRate, 0) == DD_OK);
|
||||||
TEST ( Context->DirectDraw->GetMonitorFrequency (&lpdwFrequency) == DD_OK && lpdwFrequency == pDDSD->dwRefreshRate);
|
TEST ( Context->DirectDraw->GetMonitorFrequency (&lpdwFrequency) == DD_OK && lpdwFrequency == pDDSD->dwRefreshRate);
|
||||||
TEST ( Context->DirectDraw->GetDisplayMode (&DisplayMode) == DD_OK
|
TEST ( Context->DirectDraw->GetDisplayMode (&DisplayMode) == DD_OK
|
||||||
|
@ -33,7 +33,7 @@ HRESULT CALLBACK EnumDisplayModes( LPDDSURFACEDESC2 pDDSD, ENUMCONTEXT* Context
|
||||||
&& pDDSD->dwWidth == DisplayMode.dwWidth
|
&& pDDSD->dwWidth == DisplayMode.dwWidth
|
||||||
&& pDDSD->dwRefreshRate == DisplayMode.dwRefreshRate
|
&& pDDSD->dwRefreshRate == DisplayMode.dwRefreshRate
|
||||||
&& pDDSD->ddpfPixelFormat.dwRGBBitCount == DisplayMode.ddpfPixelFormat.dwRGBBitCount
|
&& pDDSD->ddpfPixelFormat.dwRGBBitCount == DisplayMode.ddpfPixelFormat.dwRGBBitCount
|
||||||
&& DisplayMode.dwFlags == DDSD_HEIGHT | DDSD_WIDTH | DDSD_PITCH | DDSD_PIXELFORMAT | DDSD_REFRESHRATE );
|
&& DisplayMode.dwFlags == (DDSD_HEIGHT | DDSD_WIDTH | DDSD_PITCH | DDSD_PIXELFORMAT | DDSD_REFRESHRATE) );
|
||||||
|
|
||||||
setcout++;
|
setcout++;
|
||||||
return DDENUMRET_OK;
|
return DDENUMRET_OK;
|
||||||
|
|
|
@ -12,7 +12,7 @@ BOOL Test_Misc (INT* passed, INT* failed)
|
||||||
DDSCAPS2 Caps;
|
DDSCAPS2 Caps;
|
||||||
TEST (Surface->GetCaps((DDSCAPS2*)0xdeadbeef) == DDERR_INVALIDPARAMS);
|
TEST (Surface->GetCaps((DDSCAPS2*)0xdeadbeef) == DDERR_INVALIDPARAMS);
|
||||||
TEST (Surface->GetCaps(&Caps) == DD_OK && Caps.dwCaps == 0x10004040
|
TEST (Surface->GetCaps(&Caps) == DD_OK && Caps.dwCaps == 0x10004040
|
||||||
&& Caps.dwCaps2 == Caps.dwCaps3 == Caps.dwCaps4 == 0); // FIXME: Replace 0x10004040
|
&& Caps.dwCaps2 == 0 && Caps.dwCaps3 == 0 && Caps.dwCaps4 == 0); // FIXME: Replace 0x10004040
|
||||||
|
|
||||||
// GetDC / ReleaseDC
|
// GetDC / ReleaseDC
|
||||||
HDC hdc;
|
HDC hdc;
|
||||||
|
|
|
@ -63,7 +63,6 @@ int main( int argc, char **argv ) {
|
||||||
|
|
||||||
free( WcharResult );
|
free( WcharResult );
|
||||||
free( CharResult );
|
free( CharResult );
|
||||||
free( ValueNameWC );
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue