diff options
author | Ira Rice <irarice@gmail.com> | 2008-12-20 23:28:46 -0700 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2008-12-20 23:28:46 -0700 |
commit | 3f000858edfbca044a7d8168bd879ef80285e522 (patch) | |
tree | 50bb164102401954e6283ade3e8a3ebf75a21be8 /src/main.cpp | |
parent | 8e86b8c4d0f3d9be979b53689d35f8f0b1381060 (diff) | |
download | mana-3f000858edfbca044a7d8168bd879ef80285e522.tar.gz mana-3f000858edfbca044a7d8168bd879ef80285e522.tar.bz2 mana-3f000858edfbca044a7d8168bd879ef80285e522.tar.xz mana-3f000858edfbca044a7d8168bd879ef80285e522.zip |
Enabled video mode switching, as well as got rid of an old, unneeded
check in the ColorDB.
Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/main.cpp b/src/main.cpp index e9ec365f..b6d2b74f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -378,11 +378,11 @@ void init_engine(const Options &options) graphics = new Graphics(); #endif - int width = (int) config.getValue("screenwidth", defaultScreenWidth); - int height = (int) config.getValue("screenheight", defaultScreenHeight); - int bpp = 0; - bool fullscreen = ((int) config.getValue("screen", 0) == 1); - bool hwaccel = ((int) config.getValue("hwaccel", 0) == 1); + const int width = (int) config.getValue("screenwidth", defaultScreenWidth); + const int height = (int) config.getValue("screenheight", defaultScreenHeight); + const int bpp = 0; + const bool fullscreen = ((int) config.getValue("screen", 0) == 1); + const bool hwaccel = ((int) config.getValue("hwaccel", 0) == 1); // Try to set the desired video mode if (!graphics->setVideoMode(width, height, bpp, fullscreen, hwaccel)) @@ -759,15 +759,14 @@ int main(int argc, char *argv[]) defaultScreenHeight)); std::string wallpaperName; - if (screenWidth <= 800) - wallpaperName = "graphics/images/login_wallpaper.png"; - else if (screenWidth <= 1024) + wallpaperName = "graphics/images/login_wallpaper.png"; + if (screenWidth == 1024) wallpaperName = "graphics/images/login_wallpaper_1024x768.png"; - else if (screenWidth <= 1280) + else if (screenWidth == 1280) wallpaperName = "graphics/images/login_wallpaper_1280x960.png"; - else if (screenWidth <= 1440) + else if (screenWidth == 1440) wallpaperName = "graphics/images/login_wallpaper_1440x1080.png"; - else + else if (screenWidth >= 1600) wallpaperName = "graphics/images/login_wallpaper_1600x1200.png"; login_wallpaper = ResourceManager::getInstance()-> getImage(wallpaperName); |