Followup commit to switch to engine conventions

This commit is contained in:
Pecon 2020-08-11 15:13:56 -07:00
parent a03e0c9284
commit 90dc11410b
No known key found for this signature in database
GPG key ID: 6763E1DE51014F18

View file

@ -1,26 +1,27 @@
#include "platform/platform.h"
#include <string>
bool Platform::openWebBrowser( const char* webAddress )
bool Platform::openWebBrowser(const char* webAddress)
{
std::string startingURL(webAddress);
std::string filteredURL;
String startingURL(webAddress);
String filteredURL;
unsigned short length = startingURL.length();
for(unsigned short i = 0; i < length; i++)
{
filteredURL = filteredURL + '\\' + startingURL.at(i);
}
U16 length = startingURL.length();
for(U16 i = 0; i < length; i++)
{
filteredURL = filteredURL + '\\' + startingURL[i];
}
std::string runCommand = "URL=" + filteredURL + "; xdg-open $URL > /dev/null 2> /dev/null";
String runCommand = "URL=" + filteredURL + "; xdg-open $URL > /dev/null 2> /dev/null";
short statusCode;
statusCode = system(runCommand.c_str());
S16 statusCode;
statusCode = system(runCommand.c_str());
if(statusCode == 0)
return true;
if(statusCode == 0)
{
return true;
}
return false;
return false;
}
#ifdef TORQUE_DEDICATED