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
This commit is contained in:
parent
8adcce5097
commit
b368a1cb0b
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user