Reverted the wrong part of Marcus' earlier patch. However, I made it a bit more
safe in the sense that it no longer clobbers fDisplayMode in case B_GET_DISPLAY_MODE fails. This fixes bug #564 resp. #566. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17353 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
cb9f2e8d34
commit
ae219f104e
@ -383,12 +383,19 @@ AccelerantHWInterface::SetMode(const display_mode &mode)
|
||||
|
||||
// just try to set the mode - we let the graphics driver
|
||||
// approve or deny the request, as it should know best
|
||||
display_mode new_mode = mode;
|
||||
if (fAccSetDisplayMode(&new_mode) != B_OK) {
|
||||
|
||||
display_mode newMode = mode;
|
||||
|
||||
if (fAccSetDisplayMode(&newMode) != B_OK) {
|
||||
ATRACE(("setting display mode failed\n"));
|
||||
return B_ERROR;
|
||||
// We just keep the current mode and continue.
|
||||
// Note, on startup, this may be different from
|
||||
// what we think is the current display mode
|
||||
if (fAccGetDisplayMode(&newMode) != B_OK)
|
||||
return B_ERROR;
|
||||
}
|
||||
fDisplayMode = new_mode;
|
||||
|
||||
fDisplayMode = newMode;
|
||||
|
||||
// update frontbuffer
|
||||
fFrontBuffer->SetDisplayMode(fDisplayMode);
|
||||
|
Loading…
Reference in New Issue
Block a user