[Base] Widen LaunchBrowser.

This commit is contained in:
gibbed 2019-04-30 16:30:17 -05:00
parent 3b421f0811
commit 2c3207e5cc
3 changed files with 5 additions and 5 deletions

View File

@ -103,7 +103,7 @@ const size_t kMaxPath = 1024; // PATH_MAX
#endif // XE_PLATFORM_WIN32
// Launches a web browser to the given URL.
void LaunchBrowser(const char* url);
void LaunchBrowser(const wchar_t* url);
} // namespace xe

View File

@ -13,8 +13,8 @@
namespace xe {
void LaunchBrowser(const char* url) {
auto cmd = std::string("xdg-open " + std::string(url));
void LaunchBrowser(const wchar_t* url) {
auto cmd = std::string("xdg-open " + xe::to_string(url));
system(cmd.c_str());
}

View File

@ -11,8 +11,8 @@
namespace xe {
void LaunchBrowser(const char* url) {
ShellExecuteA(NULL, "open", url, NULL, NULL, SW_SHOWNORMAL);
void LaunchBrowser(const wchar_t* url) {
ShellExecuteW(NULL, L"open", url, NULL, NULL, SW_SHOWNORMAL);
}
} // namespace xe