summaryrefslogtreecommitdiff
path: root/src/utils/process.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-02-06 02:07:54 +0300
committerAndrei Karas <akaras@inbox.ru>2013-02-06 02:07:54 +0300
commit31dac3b40a1523007324512ead8e66e68e6f816a (patch)
tree305db68722ba1b2397b7a7c1ef373331f3a16afc /src/utils/process.cpp
parent16bc04769d0fdd319be5bcebddb49ddd87f76d94 (diff)
downloadplus-31dac3b40a1523007324512ead8e66e68e6f816a.tar.gz
plus-31dac3b40a1523007324512ead8e66e68e6f816a.tar.bz2
plus-31dac3b40a1523007324512ead8e66e68e6f816a.tar.xz
plus-31dac3b40a1523007324512ead8e66e68e6f816a.zip
Allow open browser on Android.
Diffstat (limited to 'src/utils/process.cpp')
-rw-r--r--src/utils/process.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/utils/process.cpp b/src/utils/process.cpp
index 822121e9b..3d667e457 100644
--- a/src/utils/process.cpp
+++ b/src/utils/process.cpp
@@ -233,18 +233,22 @@ bool openBrowser(std::string url)
return (int)ShellExecute(nullptr, "open", url.c_str(), nullptr,
nullptr, SW_SHOWNORMAL) > 32;
}
-
-#elif defined __linux__ || defined __linux
+#elif defined ANDROID
+#include <SDL_screenkeyboard.h>
bool openBrowser(std::string url)
{
- return execFile("/usr/bin/xdg-open", "/usr/bin/xdg-open", url, "");
+ SDL_ANDROID_OpenBrowser(url.c_str());
}
#elif defined __APPLE__
bool openBrowser(std::string url)
{
return execFile("/usr/bin/open", "/usr/bin/open", url, "");
}
-
+#elif defined __linux__ || defined __linux
+bool openBrowser(std::string url)
+{
+ return execFile("/usr/bin/xdg-open", "/usr/bin/xdg-open", url, "");
+}
#else
bool openBrowser(std::string url)
{