Torque3D/Engine/source/platformX86UNIX/x86UNIXPlatform.cpp

32 lines
754 B
C++
Raw Normal View History

2015-01-16 19:37:16 +00:00
#include "platform/platform.h"
#ifndef TORQUE_SDL
bool Platform::openWebBrowser(const char* webAddress)
2015-01-16 19:37:16 +00:00
{
String startingURL(webAddress);
String filteredURL;
2020-08-11 22:27:52 +00:00
U32 length = startingURL.length();
for(U32 i = 0; i < length; i++)
{
filteredURL = filteredURL + '\\' + startingURL[i];
}
String runCommand = "URL=" + filteredURL + "; xdg-open $URL > /dev/null 2> /dev/null";
2020-08-11 22:27:52 +00:00
S32 statusCode;
statusCode = system(runCommand.c_str());
if(statusCode == 0)
{
return true;
}
return false;
2015-01-16 19:37:16 +00:00
}
#endif
2015-01-16 19:37:16 +00:00
#ifdef TORQUE_DEDICATED
// XA: New class for the unix unicode font
class PlatformFont;
PlatformFont *createPlatformFont(const char *name, dsize_t size, U32 charset /* = TGE_ANSI_CHARSET */) { return NULL; }
#endif