diff --git a/src/servers/app/Screen.cpp b/src/servers/app/Screen.cpp index 6b3b081129..0fc58008bd 100644 --- a/src/servers/app/Screen.cpp +++ b/src/servers/app/Screen.cpp @@ -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); } } diff --git a/src/servers/app/VirtualScreen.cpp b/src/servers/app/VirtualScreen.cpp index eb12a1abf0..94a9e1e1f2 100644 --- a/src/servers/app/VirtualScreen.cpp +++ b/src/servers/app/VirtualScreen.cpp @@ -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