Skip to content

Commit e17d984

Browse files
committed
Fix opening URLs on Windows
1 parent 1b901d8 commit e17d984

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/gui/SystemBrowser.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#include "SystemBrowser.h"
22

3-
#ifdef __MSC_VER__
4-
#include <shellapi.h>
3+
#ifdef _WIN32
54
#include <windows.h>
5+
#include <shellapi.h>
66
#endif
77
#ifdef __linux__
88
#include <Poco/Process.h>
@@ -15,7 +15,7 @@
1515
void SystemBrowser::OpenURL(const std::string& url)
1616
{
1717
#ifdef __MSC_VER__
18-
ShellExecute(0, 0, url.c_str(), 0, 0, SW_SHOW);
18+
ShellExecuteA(nullptr, nullptr, url.c_str(), nullptr, nullptr, SW_SHOW);
1919
#endif
2020
#ifdef __linux__
2121
auto handle = Poco::Process::launch("xdg-open", {url});

0 commit comments

Comments
 (0)