From b368a1cb0b99dbc415e22b94c31f12e189c46399 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Wed, 25 May 2005 01:51:13 +0000 Subject: [PATCH] Never (!) only ask for a specific error code, and assume everything went okay if it isn't reported. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12805 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/app/ServerScreen.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/servers/app/ServerScreen.cpp b/src/servers/app/ServerScreen.cpp index 9e00e8c819..33478a0230 100644 --- a/src/servers/app/ServerScreen.cpp +++ b/src/servers/app/ServerScreen.cpp @@ -53,16 +53,14 @@ bool Screen::SupportsResolution(BPoint res, uint32 colorspace) display_mode *dm = NULL; uint32 count; - status_t err=fDDriver->GetModeList(&dm, &count); - - if(err==B_UNSUPPORTED) - { + status_t err = fDDriver->GetModeList(&dm, &count); + if (err < B_OK) { // We've run into quite a problem here! This is a function which is a requirement // for a graphics module. The best thing that we can hope for is 640x480x8 without // knowing anything else. While even this seems like insanity to assume that we // can support this, the only lower mode supported is 640x400, but we shouldn't even // bother with such a pathetic possibility. - if( (uint16)res.x == 640 && (uint16)res.y ==480 && colorspace==B_CMAP8) + if ((uint16)res.x == 640 && (uint16)res.y == 480 && colorspace == B_CMAP8) return true; else return false;