Don't check if the requested display mode is in the mode list - just ask the
graphics add-on if it can handle it. This fixes setting the screen resolution natively. Unfortunately, that's not all (the input_server still constraints the cursor position to the previous resolution...). Also, there is apparently no B_SCREEN_CHANGED sent. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15164 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -343,26 +343,12 @@ AccelerantHWInterface::SetMode(const display_mode &mode)
|
|||||||
// prevent from doing the unnecessary
|
// prevent from doing the unnecessary
|
||||||
if (fModeCount > 0 && fBackBuffer && fFrontBuffer
|
if (fModeCount > 0 && fBackBuffer && fFrontBuffer
|
||||||
&& fDisplayMode == mode) {
|
&& fDisplayMode == mode) {
|
||||||
|
// TODO: better comparison of display modes
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fModeCount <= 0 || !fModeList) {
|
// just try to set the mode - we let the graphics driver
|
||||||
if (_UpdateModeList() != B_OK || fModeCount <= 0) {
|
// approve or deny the request, as it should know best
|
||||||
ATRACE(("unable to update mode list\n"));
|
|
||||||
return B_ERROR;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// check if the mode is in our list
|
|
||||||
bool found = false;
|
|
||||||
for (int32 i = 0; i < fModeCount; i++) {
|
|
||||||
if (fModeList[i] == mode) {
|
|
||||||
found = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!found)
|
|
||||||
return B_BAD_VALUE;
|
|
||||||
|
|
||||||
fDisplayMode = mode;
|
fDisplayMode = mode;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user