forked from Mirrors/openclonk
Add openclonk:// protocol handler (#1657)
parent
d7ea9acfea
commit
3a59c15250
|
@ -56,7 +56,7 @@
|
||||||
<dd>
|
<dd>
|
||||||
<text>Searches for a network game on the specified address and joins it. No local scenario (*.ocs) should be specified. Implies --network.</text>
|
<text>Searches for a network game on the specified address and joins it. No local scenario (*.ocs) should be specified. Implies --network.</text>
|
||||||
</dd>
|
</dd>
|
||||||
<dt id="clonkp">clonk://<<em>Address</em>>/</dt>
|
<dt id="clonkp">[open]clonk://<<em>Address</em>>/</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<text>Same as --join if an address is specified. If "update" is specified as an address, this will cause the engine to perform an update check instead.</text>
|
<text>Same as --join if an address is specified. If "update" is specified as an address, this will cause the engine to perform an update check instead.</text>
|
||||||
</dd>
|
</dd>
|
||||||
|
|
|
@ -9,4 +9,4 @@ Icon=openclonk
|
||||||
Exec=openclonk
|
Exec=openclonk
|
||||||
Categories=Game;ActionGame;StrategyGame;ArcadeGame;
|
Categories=Game;ActionGame;StrategyGame;ArcadeGame;
|
||||||
StartupNotify=true
|
StartupNotify=true
|
||||||
MimeType=x-scheme-handler/clonk;
|
MimeType=x-scheme-handler/clonk;x-scheme-handler/openclonk;
|
||||||
|
|
|
@ -428,10 +428,10 @@ void C4Application::ParseCommandLine(int argc, char * argv[])
|
||||||
Game.RecordStream.Copy(szParameter);
|
Game.RecordStream.Copy(szParameter);
|
||||||
}
|
}
|
||||||
// Direct join by URL
|
// Direct join by URL
|
||||||
if (SEqual2NoCase(szParameter, "clonk:"))
|
if (SEqual2NoCase(szParameter, "clonk:") || SEqual2NoCase(szParameter, "openclonk:"))
|
||||||
{
|
{
|
||||||
// Store address
|
// Store address
|
||||||
SCopy(szParameter + 6, Game.DirectJoinAddress, _MAX_PATH);
|
SCopy(SAdvancePast(szParameter, ':'), Game.DirectJoinAddress, _MAX_PATH);
|
||||||
SClearFrontBack(Game.DirectJoinAddress, '/');
|
SClearFrontBack(Game.DirectJoinAddress, '/');
|
||||||
// Special case: if the target address is "update" then this is used for update initiation by url
|
// Special case: if the target address is "update" then this is used for update initiation by url
|
||||||
if (SEqualNoCase(Game.DirectJoinAddress, "update"))
|
if (SEqualNoCase(Game.DirectJoinAddress, "update"))
|
||||||
|
|
Loading…
Reference in New Issue