Restore --without-network.
This commit is contained in:
@@ -126,6 +126,7 @@ struct FileCopyResult
|
|||||||
RString sFile, sComment;
|
RString sFile, sComment;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if !defined(WITHOUT_NETWORKING)
|
||||||
Preference<RString> g_sCookie( "Cookie", "" );
|
Preference<RString> g_sCookie( "Cookie", "" );
|
||||||
|
|
||||||
class DownloadTask
|
class DownloadTask
|
||||||
@@ -273,6 +274,7 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
static vector<DownloadTask*> g_pDownloadTasks;
|
static vector<DownloadTask*> g_pDownloadTasks;
|
||||||
|
#endif
|
||||||
|
|
||||||
static bool IsStepManiaProtocol(const RString &arg)
|
static bool IsStepManiaProtocol(const RString &arg)
|
||||||
{
|
{
|
||||||
@@ -294,7 +296,13 @@ PlayAfterLaunchInfo DoInstalls( CommandLineActions::CommandLineArgs args )
|
|||||||
{
|
{
|
||||||
RString s = args.argv[i];
|
RString s = args.argv[i];
|
||||||
if( IsStepManiaProtocol(s) )
|
if( IsStepManiaProtocol(s) )
|
||||||
|
{
|
||||||
|
#if !defined(WITHOUT_NETWORKING)
|
||||||
g_pDownloadTasks.push_back( new DownloadTask(s) );
|
g_pDownloadTasks.push_back( new DownloadTask(s) );
|
||||||
|
#else
|
||||||
|
// TODO: Figure out a meaningful log message.
|
||||||
|
#endif
|
||||||
|
}
|
||||||
else if( IsPackageFile(s) )
|
else if( IsPackageFile(s) )
|
||||||
InstallSmzipOsArg(s, ret);
|
InstallSmzipOsArg(s, ret);
|
||||||
}
|
}
|
||||||
@@ -340,7 +348,7 @@ void ScreenInstallOverlay::Update( float fDeltaTime )
|
|||||||
PlayAfterLaunchInfo pali2 = DoInstalls( args );
|
PlayAfterLaunchInfo pali2 = DoInstalls( args );
|
||||||
playAfterLaunchInfo.OverlayWith( pali2 );
|
playAfterLaunchInfo.OverlayWith( pali2 );
|
||||||
}
|
}
|
||||||
|
#if !defined(WITHOUT_NETWORKING)
|
||||||
for(int i=g_pDownloadTasks.size()-1; i>=0; --i)
|
for(int i=g_pDownloadTasks.size()-1; i>=0; --i)
|
||||||
{
|
{
|
||||||
DownloadTask *p = g_pDownloadTasks[i];
|
DownloadTask *p = g_pDownloadTasks[i];
|
||||||
@@ -361,7 +369,7 @@ void ScreenInstallOverlay::Update( float fDeltaTime )
|
|||||||
}
|
}
|
||||||
m_textStatus.SetText( join("\n", vsMessages) );
|
m_textStatus.SetText( join("\n", vsMessages) );
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if( playAfterLaunchInfo.bAnySongChanged )
|
if( playAfterLaunchInfo.bAnySongChanged )
|
||||||
SONGMAN->Reload( false, NULL );
|
SONGMAN->Reload( false, NULL );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user