Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Try windowed mode if fullscreen doesn't work (bug #20193)
  • Loading branch information
AI0867 committed Jan 20, 2014
1 parent a5a4518 commit 38df70d
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/game_controller.cpp
Expand Up @@ -373,18 +373,19 @@ bool game_controller::init_video()
bpp = 32;
}

if(!found_matching && (video_flags & FULL_SCREEN)) {
video_flags ^= FULL_SCREEN;
found_matching = preferences::detect_video_settings(video_, resolution, bpp, video_flags);
if (found_matching) {
std::cerr << "Failed to set " << resolution.first << 'x' << resolution.second << 'x' << bpp << " in fullscreen mode. Using windowed instead.\n";
}
}

if(!found_matching) {
std::cerr << "Video mode " << resolution.first << 'x'
<< resolution.second << 'x' << bpp
<< " is not supported.\n";

if ((video_flags & FULL_SCREEN)) {
std::cerr << "Try running the program with the --windowed option "
<< "using a " << bpp << "bpp setting for your display adapter.\n";
} else {
std::cerr << "Try running the program with the --fullscreen option.\n";
}

return false;
}

Expand Down

0 comments on commit 38df70d

Please sign in to comment.