Permalink
Browse files

libxbmc: add Initialized() to advancedsettings

xbmc app initializes advancedsettings, but an app using the lib may not.
We need to be able to init if the app hasn't already.
  • Loading branch information...
1 parent bf0a52c commit f9f942ced8087201a8f6f3a0566c2f751473503b theuni committed Jun 6, 2012
Showing with 4 additions and 0 deletions.
  1. +2 −0 xbmc/settings/AdvancedSettings.cpp
  2. +2 −0 xbmc/settings/AdvancedSettings.h
@@ -41,6 +41,7 @@ using namespace XFILE;
CAdvancedSettings::CAdvancedSettings()
{
+ m_initialized = false;
}
void CAdvancedSettings::Initialize()
@@ -296,6 +297,7 @@ void CAdvancedSettings::Initialize()
m_logEnableAirtunes = false;
m_airTunesPort = 36666;
m_airPlayPort = 36667;
+ m_initialized = true;
}
bool CAdvancedSettings::Load()
@@ -80,6 +80,7 @@ class CAdvancedSettings
static CAdvancedSettings* getInstance();
void Initialize();
+ bool Initialized() { return m_initialized; };
void AddSettingsFile(const CStdString &filename);
bool Load();
void Clear();
@@ -326,6 +327,7 @@ class CAdvancedSettings
void ParseSettingsFile(const CStdString &file);
float GetDisplayLatency(float refreshrate);
+ bool m_initialized;
};
XBMC_GLOBAL(CAdvancedSettings,g_advancedSettings);

0 comments on commit f9f942c

Please sign in to comment.