diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-02-06 02:07:54 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-02-06 02:07:54 +0300 |
commit | 31dac3b40a1523007324512ead8e66e68e6f816a (patch) | |
tree | 305db68722ba1b2397b7a7c1ef373331f3a16afc /src | |
parent | 16bc04769d0fdd319be5bcebddb49ddd87f76d94 (diff) | |
download | manaverse-31dac3b40a1523007324512ead8e66e68e6f816a.tar.gz manaverse-31dac3b40a1523007324512ead8e66e68e6f816a.tar.bz2 manaverse-31dac3b40a1523007324512ead8e66e68e6f816a.tar.xz manaverse-31dac3b40a1523007324512ead8e66e68e6f816a.zip |
Allow open browser on Android.
Diffstat (limited to 'src')
-rw-r--r-- | src/utils/process.cpp | 12 |
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) { |