app_server: added more debug output on screen change problems.

This commit is contained in:
Axel Dörfler
2013-05-27 21:54:14 +00:00
parent e6373bb39d
commit 0c9bc63e5c
2 changed files with 13 additions and 4 deletions
+7 -2
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2001-2009, Haiku, Inc.
* Copyright 2001-2013, Haiku, Inc.
* Distributed under the terms of the MIT license.
*
* Authors:
@@ -140,13 +140,18 @@ Screen::SetBestMode(uint16 width, uint16 height, uint32 colorSpace,
int32 index = _FindBestMode(modes, count, width, height, colorSpace,
frequency);
if (index < 0) {
debug_printf("app_server: Finding best mode for %ux%u (%" B_PRIu32
", %g Hz%s) failed\n", width, height, colorSpace, frequency,
strict ? ", strict" : "");
if (strict) {
debug_printf("Finding best mode failed\n");
delete[] modes;
return B_ERROR;
} else {
index = 0;
// Just use the first mode in the list
debug_printf("app_server: Use %ux%u (%" B_PRIu32 ") instead.\n",
modes[0].timing.h_total, modes[0].timing.v_total, modes[0].space);
}
}
+6 -2
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2005-2009, Haiku.
* Copyright 2005-2013, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
@@ -129,7 +129,11 @@ VirtualScreen::AddScreen(Screen* screen, ScreenConfigurations& configurations)
if (status != B_OK)
status = screen->SetBestMode(1024, 768, B_RGB32, 60.f);
if (status != B_OK)
screen->SetBestMode(800, 600, B_RGB32, 60.f, false);
status = screen->SetBestMode(800, 600, B_RGB32, 60.f, false);
if (status != B_OK) {
debug_printf("app_server: Failed to set mode: %s\n",
strerror(status));
}
}
// TODO: this works only for single screen configurations