summaryrefslogtreecommitdiff
path: root/src/utils/process.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-03-14 17:09:53 +0300
committerAndrei Karas <akaras@inbox.ru>2017-03-14 17:09:53 +0300
commit1a5e7c2f37f1f3b9969c01e61ab9347dcd546bee (patch)
treebf0285e1c321689e2a6b6d015099d2edcb0c3d1f /src/utils/process.cpp
parent6045a08795de838f8f05ed86b8579288c4d8cbaf (diff)
downloadmanaverse-1a5e7c2f37f1f3b9969c01e61ab9347dcd546bee.tar.gz
manaverse-1a5e7c2f37f1f3b9969c01e61ab9347dcd546bee.tar.bz2
manaverse-1a5e7c2f37f1f3b9969c01e61ab9347dcd546bee.tar.xz
manaverse-1a5e7c2f37f1f3b9969c01e61ab9347dcd546bee.zip
Fix compilation for windows 64 with mingw.
Diffstat (limited to 'src/utils/process.cpp')
-rw-r--r--src/utils/process.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/utils/process.cpp b/src/utils/process.cpp
index 7aa1aa619..f84506024 100644
--- a/src/utils/process.cpp
+++ b/src/utils/process.cpp
@@ -241,10 +241,17 @@ bool execFile(const std::string &pathName A_UNUSED,
#endif // WIN32
-#ifdef WIN32
+#if defined WIN64
+bool openBrowser(std::string url)
+{
+ return reinterpret_cast<int64_t>(ShellExecute(nullptr, "open",
+ replaceAll(url, " ", "").c_str(),
+ nullptr, nullptr, SW_SHOWNORMAL)) > 32;
+}
+#elif defined WIN32
bool openBrowser(std::string url)
{
- return reinterpret_cast<int>(ShellExecute(nullptr, "open",
+ return reinterpret_cast<int32_t>(ShellExecute(nullptr, "open",
replaceAll(url, " ", "").c_str(),
nullptr, nullptr, SW_SHOWNORMAL)) > 32;
}