mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-20 12:44:46 +00:00
again maintains fallbacks for folks that just don't want to use the lib (though if we do want to go that route, we'll likely want to re-review a few commits and put fallbacks, well, *back* at some point) includes sdl in torqueconfig.h if in use to kill duplication. adds a generic sdlPlatform.cpp for general methods, oneliners, and the like
32 lines
754 B
C++
32 lines
754 B
C++
#include "platform/platform.h"
|
|
#ifndef TORQUE_SDL
|
|
bool Platform::openWebBrowser(const char* webAddress)
|
|
{
|
|
String startingURL(webAddress);
|
|
String filteredURL;
|
|
|
|
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";
|
|
|
|
S32 statusCode;
|
|
statusCode = system(runCommand.c_str());
|
|
|
|
if(statusCode == 0)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
#endif
|
|
#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
|