summaryrefslogtreecommitdiffstats
path: root/src/app
diff options
context:
space:
mode:
authorPiotr Dziwinski <piotrdz@gmail.com>2014-10-07 22:15:40 +0200
committerPiotr Dziwinski <piotrdz@gmail.com>2014-10-07 22:15:40 +0200
commit5274acd624c3a5ad60592cee2ebc869b10a96fda (patch)
tree04836157b8c3aa9553d5e67e8ed248220ff1661a /src/app
parent3ef2f976df56817d2a23d4fe88a1917798beaacd (diff)
parent2770ee8927cb91419b1918f46228435026790cf6 (diff)
downloadcolobot-5274acd624c3a5ad60592cee2ebc869b10a96fda.tar.gz
colobot-5274acd624c3a5ad60592cee2ebc869b10a96fda.tar.bz2
colobot-5274acd624c3a5ad60592cee2ebc869b10a96fda.zip
Merge with dev
Diffstat (limited to 'src/app')
-rw-r--r--src/app/app.cpp29
1 files changed, 10 insertions, 19 deletions
diff --git a/src/app/app.cpp b/src/app/app.cpp
index b07c3e8..fad7a32 100644
--- a/src/app/app.cpp
+++ b/src/app/app.cpp
@@ -415,13 +415,13 @@ bool CApplication::Create()
CResourceManager::SetSaveLocation(m_savePath);
CResourceManager::AddLocation(m_savePath, true);
- if (!GetProfile().InitCurrentDirectory())
+ if (!GetProfile().Init())
{
GetLogger()->Warn("Config not found. Default values will be used!\n");
defaultValues = true;
}
- if (GetProfile().GetLocalProfileString("Language", "Lang", path)) {
+ if (GetProfile().GetStringProperty("Language", "Lang", path)) {
Language language;
if (ParseLanguage(path, language)) {
m_language = language;
@@ -482,7 +482,7 @@ bool CApplication::Create()
// load settings from profile
int iValue;
- if ( GetProfile().GetLocalProfileInt("Setup", "Resolution", iValue) )
+ if ( GetProfile().GetIntProperty("Setup", "Resolution", iValue) )
{
std::vector<Math::IntPoint> modes;
GetVideoResolutionList(modes, true, true);
@@ -490,7 +490,7 @@ bool CApplication::Create()
m_deviceConfig.size = modes.at(iValue);
}
- if ( GetProfile().GetLocalProfileInt("Setup", "Fullscreen", iValue) )
+ if ( GetProfile().GetIntProperty("Setup", "Fullscreen", iValue) )
{
m_deviceConfig.fullScreen = (iValue == 1);
}
@@ -625,23 +625,14 @@ void CApplication::Destroy()
{
m_joystickEnabled = false;
- if (m_robotMain != nullptr)
- {
- delete m_robotMain;
- m_robotMain = nullptr;
- }
+ delete m_robotMain;
+ m_robotMain = nullptr;
- if (m_sound != nullptr)
- {
- delete m_sound;
- m_sound = nullptr;
- }
+ delete m_sound;
+ m_sound = nullptr;
- if (m_modelManager != nullptr)
- {
- delete m_modelManager;
- m_modelManager = nullptr;
- }
+ delete m_modelManager;
+ m_modelManager = nullptr;
if (m_engine != nullptr)
{