diff options
Diffstat (limited to 'src/os/windows/win32.cpp')
-rw-r--r-- | src/os/windows/win32.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/os/windows/win32.cpp b/src/os/windows/win32.cpp index 6c7a3ec68..07227222a 100644 --- a/src/os/windows/win32.cpp +++ b/src/os/windows/win32.cpp @@ -18,6 +18,7 @@ #include <windows.h> #include <fcntl.h> #include <shlobj.h> /* SHGetFolderPath */ +#include <Shellapi.h> #include "win32.h" #include "../../core/alloc_func.hpp" #include "../../openttd.h" @@ -79,6 +80,11 @@ void ShowOSErrorBox(const char *buf, bool system) MessageBox(GetActiveWindow(), MB_TO_WIDE(buf), _T("Error!"), MB_ICONSTOP); } +void OSOpenBrowser(const char *url) +{ + ShellExecute(GetActiveWindow(), _T("open"), MB_TO_WIDE(url), NULL, NULL, SW_SHOWNORMAL); +} + /* Code below for windows version of opendir/readdir/closedir copied and * modified from Jan Wassenberg's GPL implementation posted over at * http://www.gamedev.net/community/forums/topic.asp?topic_id=364584&whichpage=1� */ |