x86UNIXPlatform.cpp 754 B

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