x86UNIXPlatform.cpp 797 B

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