[Base] Widen LaunchBrowser.
This commit is contained in:
parent
3b421f0811
commit
2c3207e5cc
|
@ -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
|
||||
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue