diff --git a/src/gui/ChecksumTool.cpp b/src/gui/ChecksumTool.cpp index 74422c9b..b8393330 100644 --- a/src/gui/ChecksumTool.cpp +++ b/src/gui/ChecksumTool.cpp @@ -4,6 +4,7 @@ #include "gui/helpers/wxCustomEvents.h" #include "util/helpers/helpers.h" #include "gui/helpers/wxHelpers.h" +#include "gui/wxHelper.h" #include "Cafe/Filesystem/WUD/wud.h" #include @@ -518,7 +519,7 @@ void ChecksumTool::VerifyJsonEntry(const rapidjson::Document& doc) file.flush(); file.close(); - wxLaunchDefaultBrowser(fmt::format("file:{}", path)); + wxLaunchDefaultBrowser(wxHelper::FromUtf8(fmt::format("file:{}", path))); } else wxMessageBox(_("Can't open file to write!"), _("Error"), wxOK | wxCENTRE | wxICON_ERROR, this); diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index 8f26f810..ec821ce5 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -1945,7 +1945,7 @@ public: "/*****************************************************************************/\r\n" ); delete fs; - wxLaunchDefaultBrowser(fmt::format("file:{}", _utf8Wrapper(tempPath))); + wxLaunchDefaultBrowser(wxHelper::FromUtf8(fmt::format("file:{}", _utf8Wrapper(tempPath)))); }); lineSizer->Add(noticeLink, 0); lineSizer->Add(new wxStaticText(parent, -1, ")"), 0); diff --git a/src/gui/TitleManager.cpp b/src/gui/TitleManager.cpp index 370786b6..b643ab8f 100644 --- a/src/gui/TitleManager.cpp +++ b/src/gui/TitleManager.cpp @@ -5,6 +5,7 @@ #include "Cafe/TitleList/GameInfo.h" #include "util/helpers/helpers.h" #include "gui/helpers/wxHelpers.h" +#include "gui/wxHelper.h" #include "gui/components/wxTitleManagerList.h" #include "gui/components/wxDownloadManagerList.h" #include "gui/GameUpdateWindow.h" @@ -479,7 +480,7 @@ void TitleManager::OnSaveOpenDirectory(wxCommandEvent& event) if (!fs::exists(target) || !fs::is_directory(target)) return; - wxLaunchDefaultBrowser(fmt::format("file:{}", _utf8Wrapper(target))); + wxLaunchDefaultBrowser(wxHelper::FromUtf8(fmt::format("file:{}", _utf8Wrapper(target)))); } void TitleManager::OnSaveDelete(wxCommandEvent& event) diff --git a/src/gui/components/wxGameList.cpp b/src/gui/components/wxGameList.cpp index 665e1d97..87eb5cdd 100644 --- a/src/gui/components/wxGameList.cpp +++ b/src/gui/components/wxGameList.cpp @@ -563,7 +563,7 @@ void wxGameList::OnContextMenuSelected(wxCommandEvent& event) { fs::path path(gameInfo.GetBase().GetPath()); _stripPathFilename(path); - wxLaunchDefaultBrowser(fmt::format("file:{}", _utf8Wrapper(path))); + wxLaunchDefaultBrowser(wxHelper::FromUtf8(fmt::format("file:{}", _utf8Wrapper(path)))); break; } case kWikiPage: @@ -577,28 +577,28 @@ void wxGameList::OnContextMenuSelected(wxCommandEvent& event) wxASSERT(!tokens.empty()); const std::string company_code = gameInfo.GetBase().GetMetaInfo()->GetCompanyCode(); wxASSERT(company_code.size() >= 2); - wxLaunchDefaultBrowser(fmt::format("https://wiki.cemu.info/wiki/{}{}", *tokens.rbegin(), company_code.substr(company_code.size() - 2).c_str())); + wxLaunchDefaultBrowser(wxHelper::FromUtf8(fmt::format("https://wiki.cemu.info/wiki/{}{}", *tokens.rbegin(), company_code.substr(company_code.size() - 2).c_str()))); } break; } case kContextMenuSaveFolder: { - wxLaunchDefaultBrowser(fmt::format("file:{}", _utf8Wrapper(gameInfo.GetSaveFolder()))); + wxLaunchDefaultBrowser(wxHelper::FromUtf8(fmt::format("file:{}", _utf8Wrapper(gameInfo.GetSaveFolder())))); break; } case kContextMenuUpdateFolder: { fs::path path(gameInfo.GetUpdate().GetPath()); _stripPathFilename(path); - wxLaunchDefaultBrowser(fmt::format("file:{}", _utf8Wrapper(path))); + wxLaunchDefaultBrowser(wxHelper::FromUtf8(fmt::format("file:{}", _utf8Wrapper(path)))); break; } case kContextMenuDLCFolder: { fs::path path(gameInfo.GetAOC().front().GetPath()); _stripPathFilename(path); - wxLaunchDefaultBrowser(fmt::format("file:{}", _utf8Wrapper(path))); + wxLaunchDefaultBrowser(wxHelper::FromUtf8(fmt::format("file:{}", _utf8Wrapper(path)))); break; } case kContextMenuEditGraphicPacks: diff --git a/src/gui/components/wxTitleManagerList.cpp b/src/gui/components/wxTitleManagerList.cpp index c8c1d6e4..99e6ed94 100644 --- a/src/gui/components/wxTitleManagerList.cpp +++ b/src/gui/components/wxTitleManagerList.cpp @@ -852,7 +852,7 @@ void wxTitleManagerList::OnContextMenuSelected(wxCommandEvent& event) case kContextMenuOpenDirectory: { const auto path = fs::is_directory(entry->path) ? entry->path : entry->path.parent_path(); - wxLaunchDefaultBrowser(fmt::format("file:{}", _utf8Wrapper(path))); + wxLaunchDefaultBrowser(wxHelper::FromUtf8(fmt::format("file:{}", _utf8Wrapper(path)))); } break; case kContextMenuDelete: