* (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
|
@ -24,6 +24,7 @@
|
|||
|
||||
#ifdef PLATFORM_HTML5
|
||||
#include "html5/HTML5Utils.h"
|
||||
#include "html5/SharedJSLIB.h"
|
||||
#endif
|
||||
|
||||
#ifdef WINAPI
|
||||
|
@ -357,6 +358,31 @@ bool App::Init()
|
|||
|
||||
LogMsg("Initializing Dink HD %s", GetVersionString().c_str());
|
||||
|
||||
//add fake parms
|
||||
|
||||
|
||||
#ifdef PLATFORM_HTML5
|
||||
string crap = JLIB_GetURL();
|
||||
|
||||
int n = crap.find_last_of('?');
|
||||
if (n == string::npos)
|
||||
{
|
||||
//I thought maybe this would be useful later to use # instead of ? to prevent caching? Dunno, doesn't hurt to add though
|
||||
n = crap.find_last_of('#');
|
||||
}
|
||||
if (n != string::npos)
|
||||
{
|
||||
//we should fake add whatever this command is
|
||||
string final = crap.substr(n + 1, crap.length() - n);
|
||||
GetBaseApp()->AddCommandLineParm(final);
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
//string crap = "http://www.rtsoft.com/web/dink/?-game http://www.rtsoft.com/web/srchmili.dmod";
|
||||
|
||||
|
||||
|
||||
vector<string> parm = GetBaseApp()->GetCommandLineParms();
|
||||
|
||||
string parms;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue