From b635c022cb1825ecb4b323a54b4a81ebe11446b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Sat, 26 Nov 2005 15:52:22 +0000 Subject: [PATCH] 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 --- .../app/drawing/AccelerantHWInterface.cpp | 20 +++---------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/src/servers/app/drawing/AccelerantHWInterface.cpp b/src/servers/app/drawing/AccelerantHWInterface.cpp index d3d8646f0f..3f504fdbfb 100644 --- a/src/servers/app/drawing/AccelerantHWInterface.cpp +++ b/src/servers/app/drawing/AccelerantHWInterface.cpp @@ -343,26 +343,12 @@ AccelerantHWInterface::SetMode(const display_mode &mode) // prevent from doing the unnecessary if (fModeCount > 0 && fBackBuffer && fFrontBuffer && fDisplayMode == mode) { + // TODO: better comparison of display modes return B_OK; } - if (fModeCount <= 0 || !fModeList) { - if (_UpdateModeList() != B_OK || fModeCount <= 0) { - 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; + // just try to set the mode - we let the graphics driver + // approve or deny the request, as it should know best fDisplayMode = mode;