x86UNIXPlatform.cpp 730 B

12345678910111213141516171819202122232425262728293031
  1. #include "platform/platform.h"
  2. bool Platform::openWebBrowser(const char* webAddress)
  3. {
  4. String startingURL(webAddress);
  5. String filteredURL;
  6. U32 length = startingURL.length();
  7. for(U32 i = 0; i < length; i++)
  8. {
  9. filteredURL = filteredURL + '\\' + startingURL[i];
  10. }
  11. String runCommand = "URL=" + filteredURL + "; xdg-open $URL > /dev/null 2> /dev/null";
  12. S32 statusCode;
  13. statusCode = system(runCommand.c_str());
  14. if(statusCode == 0)
  15. {
  16. return true;
  17. }
  18. return false;
  19. }
  20. #ifdef TORQUE_DEDICATED
  21. // XA: New class for the unix unicode font
  22. class PlatformFont;
  23. PlatformFont *createPlatformFont(const char *name, dsize_t size, U32 charset /* = TGE_ANSI_CHARSET */) { return NULL; }
  24. #endif