mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-05 14:31:17 +12:00
Portable way of opening URLs and directories (#156)
Replaced every instance of ShellExecute with wxLaunchDefaultBrowser
This commit is contained in:
parent
f3c70e69b4
commit
1a1de370e4
5 changed files with 15 additions and 67 deletions
|
@ -1,9 +1,5 @@
|
|||
#include "gui/ChecksumTool.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <shellapi.h>
|
||||
#endif
|
||||
|
||||
#include "Cafe/TitleList/GameInfo.h"
|
||||
#include "gui/helpers/wxCustomEvents.h"
|
||||
#include "util/helpers/helpers.h"
|
||||
|
@ -521,11 +517,8 @@ void ChecksumTool::VerifyJsonEntry(const rapidjson::Document& doc)
|
|||
}
|
||||
file.flush();
|
||||
file.close();
|
||||
#ifdef _WIN32
|
||||
ShellExecuteA(GetHWND(), "open", path.c_str(), nullptr, nullptr, SW_SHOWNORMAL);
|
||||
#else
|
||||
assert_dbg();
|
||||
#endif
|
||||
|
||||
wxLaunchDefaultBrowser(fmt::format("file:{}", path));
|
||||
}
|
||||
else
|
||||
wxMessageBox(_("Can't open file to write!"), _("Error"), wxOK | wxCENTRE | wxICON_ERROR, this);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue