Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Try windowed mode if fullscreen doesn't work (bug #20193)

  • Loading branch information...
commit 38df70d25ff0ac6aec3a6387e80901ba9570d50c 1 parent a5a4518
Alexander van Gessel AI0867 authored
Showing with 8 additions and 7 deletions.
  1. +8 −7 src/game_controller.cpp
15 src/game_controller.cpp
View
@@ -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;
}
Please sign in to comment.
Something went wrong with that request. Please try again.