[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth/src game.cpp
From: |
David White |
Subject: |
[Wesnoth-cvs-commits] wesnoth/src game.cpp |
Date: |
Sun, 10 Jul 2005 16:46:35 -0400 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: David White <address@hidden> 05/07/10 20:46:35
Modified files:
src : game.cpp
Log message:
made default colour depth 24bpp instead of 16bpp
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/game.cpp.diff?tr1=1.262&tr2=1.263&r1=text&r2=text
Patches:
Index: wesnoth/src/game.cpp
diff -u wesnoth/src/game.cpp:1.262 wesnoth/src/game.cpp:1.263
--- wesnoth/src/game.cpp:1.262 Mon Jul 4 20:49:37 2005
+++ wesnoth/src/game.cpp Sun Jul 10 20:46:35 2005
@@ -1,4 +1,4 @@
-/* $Id: game.cpp,v 1.262 2005/07/04 20:49:37 Sirp Exp $ */
+/* $Id: game.cpp,v 1.263 2005/07/10 20:46:35 Sirp Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://www.wesnoth.org/
@@ -263,52 +263,54 @@
int video_flags = preferences::fullscreen() ? FULL_SCREEN : 0;
- std::pair<int,int> resolution = preferences::resolution();
+ std::pair<int,int> resolution = preferences::resolution();
+
+ const int DefaultBPP = 24;
std::cerr << "Checking video mode: " << resolution.first
- << "x" << resolution.second << "x16...\n";
- int bpp =
video_.modePossible(resolution.first,resolution.second,16,video_flags);
+ << "x" << resolution.second << "x" << DefaultBPP << "...\n";
+ int bpp =
video_.modePossible(resolution.first,resolution.second,DefaultBPP,video_flags);
std::cerr << bpp << "\n";
if(bpp == 0) {
//Video mode not supported, maybe from bad prefs.
std::cerr << "Video mode " << resolution.first
- << "x" << resolution.second << "x16 "
- << "is not supported - attempting 1024x768x16...\n";
+ << "x" << resolution.second << "x" << DefaultBPP << "
"
+ << "is not supported - attempting 1024x768x" <<
DefaultBPP << "...\n";
//Attempt 1024x768.
resolution.first = 1024;
resolution.second = 768;
- bpp =
video_.modePossible(resolution.first,resolution.second,16,video_flags);
+ bpp =
video_.modePossible(resolution.first,resolution.second,DefaultBPP,video_flags);
if(bpp == 0) {
- std::cerr << "1024x768x16 not available - attempting
800x600x16...\n";
+ std::cerr << "1024x768x" << DefaultBPP << " not
available - attempting 800x600x" << DefaultBPP << "...\n";
resolution.first = 800;
resolution.second = 600;
- bpp =
video_.modePossible(resolution.first,resolution.second,16,video_flags);
+ bpp =
video_.modePossible(resolution.first,resolution.second,DefaultBPP,video_flags);
}
#ifdef USE_TINY_GUI
if(bpp == 0) {
- std::cerr << "800x600x16 not available - attempting
640x480x16...\n";
+ std::cerr << "800x600x" << DefaultBPP << " not
available - attempting 640x480x" << DefaultBPP << "...\n";
resolution.first = 640;
resolution.second = 480;
- bpp =
video_.modePossible(resolution.first,resolution.second,16,video_flags);
+ bpp =
video_.modePossible(resolution.first,resolution.second,DefaultBPP,video_flags);
}
if(bpp == 0) {
- std::cerr << "640x480x16 not available - attempting
320x240x16...\n";
+ std::cerr << "640x480x" << DefaultBPP << " not
available - attempting 320x240x" << DefaultBPP << "...\n";
resolution.first = 320;
resolution.second = 240;
- bpp =
video_.modePossible(resolution.first,resolution.second,16,video_flags);
+ bpp =
video_.modePossible(resolution.first,resolution.second,DefaultBPP,video_flags);
}
#endif
@@ -316,12 +318,12 @@
//couldn't do 1024x768 or 800x600
std::cerr << "The required video mode, " <<
resolution.first
- << "x" << resolution.second << "x16 "
+ << "x" << resolution.second << "x" <<
DefaultBPP << " "
<< "is not supported\n";
if((video_flags&FULL_SCREEN) != 0) {
std::cerr << "Try running the program with the
--windowed option "
- << "using a 16bpp X windows
setting\n";
+ << "using a " << DefaultBPP << "bpp X
windows setting\n";
}
if((video_flags&FULL_SCREEN) == 0) {