_common_depth_to_pixelformat() returns -1 and not zero, if a mode is

supported.
This commit is contained in:
Peter Ganten 2000-06-23 16:54:23 +00:00 committed by Alexandre Julliard
parent 5f5fb12420
commit 3020d1b0be
1 changed files with 1 additions and 1 deletions

View File

@ -215,7 +215,7 @@ static HRESULT WINAPI DGA_IDirectDrawImpl_SetDisplayMode(
TRACE("(%p)->(%ld,%ld,%ld)\n", This, width, height, depth);
/* We hope getting the asked for depth */
if (_common_depth_to_pixelformat(depth,iface)) {
if ( _common_depth_to_pixelformat(depth,iface) != -1 ) {
/* I.e. no visual found or emulated */
ERR("(w=%ld,h=%ld,d=%ld), unsupported depth!\n",width,height,depth);
return DDERR_UNSUPPORTEDMODE;