wesnoth-cvs-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Wesnoth-cvs-commits] wesnoth/src game.cpp


From: Yann Dirson
Subject: [Wesnoth-cvs-commits] wesnoth/src game.cpp
Date: Thu, 21 Oct 2004 19:11:52 -0400

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     Yann Dirson <address@hidden>    04/10/21 23:05:56

Modified files:
        src            : game.cpp 

Log message:
        allow starting up at PDA resolutions in USE_TINY_GUI mode; made 
messages consistent

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/game.cpp.diff?tr1=1.148&tr2=1.149&r1=text&r2=text

Patches:
Index: wesnoth/src/game.cpp
diff -u wesnoth/src/game.cpp:1.148 wesnoth/src/game.cpp:1.149
--- wesnoth/src/game.cpp:1.148  Sat Oct 16 18:57:55 2004
+++ wesnoth/src/game.cpp        Thu Oct 21 23:05:55 2004
@@ -1,4 +1,4 @@
-/* $Id: game.cpp,v 1.148 2004/10/16 18:57:55 silene Exp $ */
+/* $Id: game.cpp,v 1.149 2004/10/21 23:05:55 ydirson Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -474,16 +474,17 @@
 
        std::pair<int,int> resolution = preferences::resolution();
 
-       std::cerr << "checking mode possible...\n";
+       std::cerr << "Checking video mode: " << resolution.first
+                 << "x" << resolution.second << "x16...\n";
        int bpp = 
video_.modePossible(resolution.first,resolution.second,16,video_flags);
 
        std::cerr << bpp << "\n";
 
        if(bpp == 0) {
                //Video mode not supported, maybe from bad prefs.
-               std::cerr << "The video mode, " << resolution.first
+               std::cerr << "Video mode " << resolution.first
                          << "x" << resolution.second << "x16 "
-                         << "is not supported\nAttempting 1024x768x16...\n";
+                         << "is not supported - attempting 1024x768x16...\n";
                
                //Attempt 1024x768.
                resolution.first = 1024;
@@ -492,10 +493,7 @@
                bpp = 
video_.modePossible(resolution.first,resolution.second,16,video_flags);
 
                if(bpp == 0) {
-                        //Attempt 1024x768.
-                       resolution.first = 1024;
-                       resolution.second = 768;
-                       std::cerr << "1024x768x16 is not possible.\nAttempting 
800x600x16...\n";
+                       std::cerr << "1024x768x16 not available - attempting 
800x600x16...\n";
 
                        resolution.first = 800;
                        resolution.second = 600;
@@ -503,6 +501,26 @@
                        bpp = 
video_.modePossible(resolution.first,resolution.second,16,video_flags);
                }
 
+#ifdef USE_TINY_GUI
+               if(bpp == 0) {
+                       std::cerr << "800x600x16 not available - attempting 
640x480x16...\n";
+
+                       resolution.first = 640;
+                       resolution.second = 480;
+
+                       bpp = 
video_.modePossible(resolution.first,resolution.second,16,video_flags);
+               }
+
+               if(bpp == 0) {
+                       std::cerr << "640x480x16 not available - attempting 
320x240x16...\n";
+
+                       resolution.first = 320;
+                       resolution.second = 240;
+
+                       bpp = 
video_.modePossible(resolution.first,resolution.second,16,video_flags);
+               }
+#endif
+
                if(bpp == 0) {
                        //couldn't do 1024x768 or 800x600
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]