diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2022-05-20 23:35:10 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-20 23:35:10 -0400 |
commit | 4eb7f6c04473e3f90e2622ee00b822febe1ccef9 (patch) | |
tree | b037dccee6a4b1a0b4228bef5d2af2f38526fb90 /src/yuzu/main.cpp | |
parent | b57df1dcb9a3300b882f8993907b73c339b47356 (diff) | |
parent | 5035df27c357d5807432aa0056cc4e428884d988 (diff) |
Merge pull request #8342 from lat9nq/clang-latest-stdc++
general: Use Common::U16StringFromBuffer in place of QString::toStdU16String
Diffstat (limited to 'src/yuzu/main.cpp')
-rw-r--r-- | src/yuzu/main.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index f607f464a..f4a9a7171 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -1401,7 +1401,8 @@ void GMainWindow::BootGame(const QString& filename, u64 program_id, std::size_t if (loader != nullptr && loader->ReadProgramId(title_id) == Loader::ResultStatus::Success && type == StartGameType::Normal) { // Load per game settings - const auto file_path = std::filesystem::path{filename.toStdU16String()}; + const auto file_path = + std::filesystem::path{Common::U16StringFromBuffer(filename.utf16(), filename.size())}; const auto config_file_name = title_id == 0 ? Common::FS::PathToUTF8String(file_path.filename()) : fmt::format("{:016X}", title_id); @@ -1482,7 +1483,8 @@ void GMainWindow::BootGame(const QString& filename, u64 program_id, std::size_t } if (res != Loader::ResultStatus::Success || title_name.empty()) { title_name = Common::FS::PathToUTF8String( - std::filesystem::path{filename.toStdU16String()}.filename()); + std::filesystem::path{Common::U16StringFromBuffer(filename.utf16(), filename.size())} + .filename()); } const bool is_64bit = system->Kernel().CurrentProcess()->Is64BitProcess(); const auto instruction_set_suffix = is_64bit ? tr("(64-bit)") : tr("(32-bit)"); |