summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasily <danilka.pro@gmail.com>2015-12-02 02:43:05 +0300
committerAndrei Karas <akaras@inbox.ru>2015-12-02 02:47:59 +0300
commitbf82ec299224ad7990300a0874e80b5f4feed48b (patch)
tree97b2d62daf81f2010ab26409de160cdbbb9b26e3
parent4d31830cd1852f017fdaa5f4047339204cb62c71 (diff)
downloadManaVerse-bf82ec299224ad7990300a0874e80b5f4feed48b.tar.gz
ManaVerse-bf82ec299224ad7990300a0874e80b5f4feed48b.tar.bz2
ManaVerse-bf82ec299224ad7990300a0874e80b5f4feed48b.tar.xz
ManaVerse-bf82ec299224ad7990300a0874e80b5f4feed48b.zip
Added NaCl openBrowser function implementation
-rw-r--r--src/utils/process.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/utils/process.cpp b/src/utils/process.cpp
index ced374d49..74ac20b53 100644
--- a/src/utils/process.cpp
+++ b/src/utils/process.cpp
@@ -268,6 +268,16 @@ bool openBrowser(std::string url)
{
return execFile("/usr/bin/xdg-open", "/usr/bin/xdg-open", url, "");
}
+#elif defined __native_client__
+#include <ppapi_simple/ps.h>
+#include <ppapi/cpp/instance.h>
+#include <ppapi/cpp/var.h>
+bool openBrowser(std::string url)
+{
+ pp::Var msgVar = pp::Var(std::string("open-browser: ").append(url));
+ pp::Instance(PSGetInstanceId()).PostMessage(msgVar);
+ return true;
+}
#else
bool openBrowser(std::string url)
{