From 43e1786613c3774d1b0bd2af3ec269c9c0e9cd20 Mon Sep 17 00:00:00 2001 From: titiger Date: Thu, 1 Oct 2015 01:26:18 +0200 Subject: [PATCH] Window Title can be set in ini file " WindowTitle" is an option in ini file now. Default window name is MegaGlest --- source/glest_game/main/program.cpp | 5 +++-- source/glest_game/menu/menu_state_options_graphics.cpp | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/source/glest_game/main/program.cpp b/source/glest_game/main/program.cpp index 87db9aa5..bdc4edc0 100644 --- a/source/glest_game/main/program.cpp +++ b/source/glest_game/main/program.cpp @@ -754,7 +754,7 @@ void Program::init(WindowGl *window, bool initSound, bool toggleFullScreen){ if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); //window - window->setText("MegaGlest"); + //window->setText("MegaGlest"); window->setStyle(config.getBool("Windowed")? wsWindowedFixed: wsFullscreen); window->setPos(0, 0); window->setSize(config.getInt("ScreenWidth"), config.getInt("ScreenHeight")); @@ -805,7 +805,7 @@ void Program::init(WindowGl *window, bool initSound, bool toggleFullScreen){ config.getBool("HardwareAcceleration","false"), config.getBool("FullScreenAntiAliasing","false"), config.getFloat("GammaValue","0.0")); - + window->setText(config.getString("WindowTitle","MegaGlest")); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); window->makeCurrentGl(); @@ -947,6 +947,7 @@ void Program::reInitGl() { config.getBool("HardwareAcceleration","false"), config.getBool("FullScreenAntiAliasing","false"), config.getFloat("GammaValue","0.0")); + window->setText(config.getString("WindowTitle","MegaGlest")); } } diff --git a/source/glest_game/menu/menu_state_options_graphics.cpp b/source/glest_game/menu/menu_state_options_graphics.cpp index 6b5fc17c..9e3c521e 100644 --- a/source/glest_game/menu/menu_state_options_graphics.cpp +++ b/source/glest_game/menu/menu_state_options_graphics.cpp @@ -523,7 +523,7 @@ void MenuStateOptionsGraphics::revertScreenMode(){ config.getBool("HardwareAcceleration","false"), config.getBool("FullScreenAntiAliasing","false"), config.getFloat("GammaValue","0.0")); - + window->setText(config.getString("WindowTitle","MegaGlest")); Metrics::reload(); this->mainMenu->init(); }