Imported the check for updates code from StepMania AMX.
--- TODO: Move the code from NSMAN to a new class TODO: HOOKS->GetURL for Linux TODO: Do not run the check every time the game is launched, use: PREFSMAN->m_iUpdateCheckIntervalSeconds - Seconds to wait before running the next check PREFSMAN->m_iUpdateCheckLastCheckedSecond - Timestamp of the last check
This commit is contained in:
@@ -143,6 +143,10 @@ bool g_bAutoRestart = false;
|
||||
# define TRUE_IF_DEBUG false
|
||||
#endif
|
||||
|
||||
#if !defined(WITHOUT_NETWORKING) && defined(HAVE_VERSION_INFO)
|
||||
extern unsigned long version_num;
|
||||
#endif
|
||||
|
||||
void ValidateDisplayAspectRatio( float &val )
|
||||
{
|
||||
if( val < 0 )
|
||||
@@ -289,6 +293,19 @@ PrefsManager::PrefsManager() :
|
||||
#if !defined(WITHOUT_NETWORKING)
|
||||
,
|
||||
m_bEnableScoreboard ( "EnableScoreboard", true )
|
||||
|
||||
#if defined(HAVE_VERSION_INFO)
|
||||
,
|
||||
m_bUpdateCheckEnable ( "UpdateCheckEnable", true )
|
||||
// TODO - Aldo_MX: Use PREFSMAN->m_iUpdateCheckIntervalSeconds & PREFSMAN->m_iUpdateCheckLastCheckedSecond
|
||||
//,
|
||||
//m_iUpdateCheckIntervalSeconds ( "UpdateCheckIntervalSeconds", 86400 ), // 24 hours
|
||||
//m_iUpdateCheckLastCheckedSecond ( "UpdateCheckLastCheckSecond", 0 )
|
||||
|
||||
// TODO - Aldo_MX: Write helpers in LuaManager.cpp to treat unsigned int/long like LUA Numbers
|
||||
//,
|
||||
//m_uUpdateCheckLastCheckedBuild ( "UpdateCheckLastCheckedBuild", version_num )
|
||||
#endif
|
||||
#endif
|
||||
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user