wined3d: Comparing BOOLs against FALSE is redundant.
This commit is contained in:
parent
1d839e42e9
commit
5abdd7a19f
|
@ -143,7 +143,7 @@ static void WINAPI IWineD3DCubeTextureImpl_PreLoad(IWineD3DCubeTexture *iface) {
|
|||
|
||||
ENTER_GL();
|
||||
/* If were dirty then reload the surfaces */
|
||||
if (This->baseTexture.dirty != FALSE) {
|
||||
if (This->baseTexture.dirty) {
|
||||
for (i = 0; i < This->baseTexture.levels; i++) {
|
||||
for (j = D3DCUBEMAP_FACE_POSITIVE_X; j <= D3DCUBEMAP_FACE_NEGATIVE_Z ; j++) {
|
||||
if(setGlTextureDesc)
|
||||
|
|
|
@ -500,7 +500,7 @@ static void WINAPI IWineD3DDeviceImpl_SetupTextureStates(IWineD3DDevice *iface,
|
|||
|
||||
/* TODO: NV_POINT_SPRITE */
|
||||
if (GL_SUPPORT(ARB_POINT_SPRITE)) {
|
||||
if (This->stateBlock->renderState[WINED3DRS_POINTSPRITEENABLE] != FALSE) {
|
||||
if (This->stateBlock->renderState[WINED3DRS_POINTSPRITEENABLE]) {
|
||||
/* Doesn't work with GL_POINT_SMOOTH on on my ATI 9600, but then ATI drivers are buggered! */
|
||||
glDisable(GL_POINT_SMOOTH);
|
||||
|
||||
|
@ -1059,13 +1059,13 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, U
|
|||
* ****************************************/
|
||||
switch(Pool) {
|
||||
case WINED3DPOOL_SCRATCH:
|
||||
if(Lockable == FALSE)
|
||||
if(!Lockable)
|
||||
FIXME("Create suface called with a pool of SCRATCH and a Lockable of FALSE \
|
||||
which are mutually exclusive, setting lockable to true\n");
|
||||
Lockable = TRUE;
|
||||
break;
|
||||
case WINED3DPOOL_SYSTEMMEM:
|
||||
if(Lockable == FALSE) FIXME("Create surface called with a pool of SYSTEMMEM and a Lockable of FALSE, \
|
||||
if(!Lockable) FIXME("Create surface called with a pool of SYSTEMMEM and a Lockable of FALSE, \
|
||||
this is acceptable but unexpected (I can't know how the surface can be usable!)\n");
|
||||
case WINED3DPOOL_MANAGED:
|
||||
if(Usage == WINED3DUSAGE_DYNAMIC) FIXME("Create surface called with a pool of MANAGED and a \
|
||||
|
@ -2859,7 +2859,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetLightEnable(IWineD3DDevice *iface, D
|
|||
}
|
||||
|
||||
/* OK, we now have a light... */
|
||||
if (Enable == FALSE) {
|
||||
if (!Enable) {
|
||||
|
||||
/* If we are disabling it, check it was enabled, and
|
||||
still only do something if it has assigned a glIndex (which it should have!) */
|
||||
|
@ -2901,7 +2901,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetLightEnable(IWineD3DDevice *iface, D
|
|||
while (pos != NULL && pos->glIndex != -1 && Index < This->maxConcurrentLights) {
|
||||
|
||||
/* Try to remember which index can be replaced if necessary */
|
||||
if (bsf==NULL && pos->lightEnabled == FALSE) {
|
||||
if (bsf==NULL && !pos->lightEnabled) {
|
||||
/* Found a light we can replace, save as best replacement */
|
||||
bsf = pos;
|
||||
}
|
||||
|
@ -5224,7 +5224,7 @@ process_vertices_strided(IWineD3DDeviceImpl *This, DWORD dwDestIndex, DWORD dwCo
|
|||
*
|
||||
*/
|
||||
|
||||
if( doClip == FALSE ||
|
||||
if( !doClip ||
|
||||
( (-rhw -eps < x) && (-rhw -eps < y) && ( -eps < z) &&
|
||||
(x <= rhw + eps) && (y <= rhw + eps ) && (z <= rhw + eps) &&
|
||||
( rhw > eps ) ) ) {
|
||||
|
@ -5326,7 +5326,7 @@ process_vertices_strided(IWineD3DDeviceImpl *This, DWORD dwDestIndex, DWORD dwCo
|
|||
if(!color_d) {
|
||||
static BOOL warned = FALSE;
|
||||
|
||||
if(warned == FALSE) {
|
||||
if(!warned) {
|
||||
ERR("No diffuse color in source, but destination has one\n");
|
||||
warned = TRUE;
|
||||
}
|
||||
|
@ -5357,7 +5357,7 @@ process_vertices_strided(IWineD3DDeviceImpl *This, DWORD dwDestIndex, DWORD dwCo
|
|||
if(!color_s) {
|
||||
static BOOL warned = FALSE;
|
||||
|
||||
if(warned == FALSE) {
|
||||
if(!warned) {
|
||||
ERR("No specular color in source, but destination has one\n");
|
||||
warned = TRUE;
|
||||
}
|
||||
|
@ -7149,7 +7149,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderTarget(IWineD3DDevice *iface,
|
|||
} else {
|
||||
/* Otherwise, set the render target up */
|
||||
|
||||
if (FALSE == This->sceneEnded) {
|
||||
if (!This->sceneEnded) {
|
||||
IWineD3DDevice_EndScene(iface);
|
||||
}
|
||||
TRACE("clearing renderer\n");
|
||||
|
@ -7252,7 +7252,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_FindGLContext(IWineD3DDevice *iface, IW
|
|||
ATI cards don't destroy pbuffers, but as soon as resource releasing callbacks are inplace
|
||||
the pSurface can be set to 0 allowing it to be reused from cache **/
|
||||
if (This->contextCache[i].Width == width && This->contextCache[i].Height == height
|
||||
&& (pbuffer_per_surface == FALSE || This->contextCache[i].pSurface == pSurface || This->contextCache[i].pSurface == NULL)) {
|
||||
&& (!pbuffer_per_surface || This->contextCache[i].pSurface == pSurface || This->contextCache[i].pSurface == NULL)) {
|
||||
*context = &This->contextCache[i];
|
||||
break;
|
||||
}
|
||||
|
@ -7762,7 +7762,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Reset(IWineD3DDevice* iface, WINED3DPRE
|
|||
static HRESULT WINAPI IWineD3DDeviceImpl_SetDialogBoxMode(IWineD3DDevice *iface, BOOL bEnableDialogs) {
|
||||
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
|
||||
/** FIXME: always true at the moment **/
|
||||
if(bEnableDialogs == FALSE) {
|
||||
if(!bEnableDialogs) {
|
||||
FIXME("(%p) Dialogs cannot be disabled yet\n", This);
|
||||
}
|
||||
return WINED3D_OK;
|
||||
|
|
|
@ -1272,7 +1272,7 @@ static HRESULT WINAPI IWineD3DImpl_GetAdapterIdentifier(IWineD3D *iface, UINT Ad
|
|||
/* FillGLCaps updates gl_info, but we only want to store and
|
||||
reuse the values once we have a context which is valid. Values from
|
||||
a temporary context may differ from the final ones */
|
||||
if (isGLInfoValid == FALSE) {
|
||||
if (!isGLInfoValid) {
|
||||
WineD3D_Context *fake_ctx = NULL;
|
||||
if (glXGetCurrentContext() == NULL) fake_ctx = WineD3D_CreateFakeGLContext();
|
||||
/* If we don't know the device settings, go query them now */
|
||||
|
@ -1816,7 +1816,7 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter,
|
|||
/* FIXME: both the gl_info and the shader_mode should be made per adapter */
|
||||
|
||||
/* If we don't know the device settings, go query them now */
|
||||
if (This->isGLInfoValid == FALSE) {
|
||||
if (!This->isGLInfoValid) {
|
||||
/* use the desktop window to fill gl caps */
|
||||
BOOL rc = IWineD3DImpl_FillGLCaps(iface, IWineD3DImpl_GetAdapterDisplay(iface, Adapter));
|
||||
|
||||
|
|
|
@ -109,8 +109,8 @@ static void init_materials(IWineD3DDevice *iface, BOOL isDiffuseSupplied) {
|
|||
This->tracking_color = IS_TRACKING;
|
||||
requires_material_reset = TRUE; /* Restore material settings as will be used */
|
||||
|
||||
} else if ((This->tracking_color == IS_TRACKING && isDiffuseSupplied == FALSE) ||
|
||||
(This->tracking_color == NEEDS_TRACKING && isDiffuseSupplied == FALSE)) {
|
||||
} else if ((This->tracking_color == IS_TRACKING && !isDiffuseSupplied) ||
|
||||
(This->tracking_color == NEEDS_TRACKING && !isDiffuseSupplied)) {
|
||||
/* If we are tracking the current color but one isn't supplied, don't! */
|
||||
glDisable(GL_COLOR_MATERIAL);
|
||||
checkGLcall("glDisable GL_COLOR_MATERIAL");
|
||||
|
|
|
@ -124,7 +124,7 @@ static void WINAPI IWineD3DTextureImpl_PreLoad(IWineD3DTexture *iface) {
|
|||
IWineD3DTexture_BindTexture(iface);
|
||||
ENTER_GL();
|
||||
/* If were dirty then reload the surfaces */
|
||||
if(This->baseTexture.dirty != FALSE) {
|
||||
if(This->baseTexture.dirty) {
|
||||
|
||||
for (i = 0; i < This->baseTexture.levels; i++) {
|
||||
if(setGlTextureDesc)
|
||||
|
|
|
@ -1663,7 +1663,7 @@ void set_tex_op(IWineD3DDevice *iface, BOOL isAlpha, int Stage, D3DTEXTUREOP op,
|
|||
|
||||
/*FIXME("Stage %d matrix is (%.2f,%.2f),(%.2f,%.2f)\n", Stage, m[0][0], m[0][1], m[1][0], m[1][0]);*/
|
||||
|
||||
if (FALSE == This->texture_shader_active) {
|
||||
if (!This->texture_shader_active) {
|
||||
This->texture_shader_active = TRUE;
|
||||
glEnable(GL_TEXTURE_SHADER_NV);
|
||||
}
|
||||
|
|
|
@ -223,7 +223,7 @@ static HRESULT WINAPI IWineD3DVolumeImpl_LockBox(IWineD3DVolume *iface, WINED3DL
|
|||
|
||||
static HRESULT WINAPI IWineD3DVolumeImpl_UnlockBox(IWineD3DVolume *iface) {
|
||||
IWineD3DVolumeImpl *This = (IWineD3DVolumeImpl *)iface;
|
||||
if (FALSE == This->locked) {
|
||||
if (!This->locked) {
|
||||
ERR("trying to lock unlocked volume@%p\n", This);
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
|
|
@ -120,7 +120,7 @@ static void WINAPI IWineD3DVolumeTextureImpl_PreLoad(IWineD3DVolumeTexture *ifac
|
|||
|
||||
ENTER_GL();
|
||||
/* If were dirty then reload the volumes */
|
||||
if(This->baseTexture.dirty != FALSE) {
|
||||
if(This->baseTexture.dirty) {
|
||||
for (i = 0; i < This->baseTexture.levels; i++) {
|
||||
IWineD3DVolume_LoadTexture(This->volumes[i], i);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue