* (html5) - Tweaked the build parms, runs much faster now on Chrome, it was sort of laggy before
* (html5) Can now pass in a url to "auto-download" and play a dmod. Example: http://www.rtsoft.com/web/dink?dmod=rtsoft.com/web/srchmili.dmod - in theory, you can now do dink.exe -game http://www.rtsoft.com/web/dink?dmod=rtsoft.com/web/srchmili.dmod from windows as well and it should download git-svn-id: svn://rtsoft.com/rtsvn/projects/RTDink@1610 353e56fe-9613-0410-8469-b96ad8e6f29c
This commit is contained in:
parent
8e575535ed
commit
880e0ec2f3
6 changed files with 45 additions and 7 deletions
|
@ -233,7 +233,7 @@ string GetNextDMODToInstall(bool &bIsCommandLineInstall, const bool bDeleteComma
|
|||
bIsCommandLineInstall = false;
|
||||
//if (!GetApp()->CanDownloadDMODS()) return ""; //ignore it
|
||||
|
||||
if (IsDesktop())
|
||||
if (IsDesktop() || GetEmulatedPlatformID() == PLATFORM_ID_HTML5)
|
||||
{
|
||||
vector<string> parms = GetApp()->GetCommandLineParms();
|
||||
|
||||
|
@ -284,6 +284,18 @@ void MainOnStartLoading(VariantList *pVList)
|
|||
|
||||
string fName = GetNextDMODToInstall(bIsCommandLineInstall, true);
|
||||
|
||||
if (IsInString(fName, "http:") || IsInString(fName, "https:")
|
||||
||
|
||||
(GetEmulatedPlatformID() == PLATFORM_ID_HTML5 && IsInString(fName, ".dmod"))
|
||||
)
|
||||
{
|
||||
//we should download and install this
|
||||
StringReplace("-game ", "", fName);
|
||||
StringReplace("dmod=", "", fName);
|
||||
DMODInstallMenuCreate(pBG->GetParent(), fName, GetDMODRootPath(), "", true, fName);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!fName.empty())
|
||||
{
|
||||
DMODInstallMenuCreate(pBG->GetParent(), "", GetDMODRootPath(), GetSavePath()+fName, false, "", !bIsCommandLineInstall);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue