diff --git a/3rdparty/libusb/libusb b/3rdparty/libusb/libusb index d52e355daa..a61afe5f75 160000 --- a/3rdparty/libusb/libusb +++ b/3rdparty/libusb/libusb @@ -1 +1 @@ -Subproject commit d52e355daa09f17ce64819122cb067b8a2ee0d4b +Subproject commit a61afe5f75d969c4561a1d0ad753aa23cee6329a diff --git a/rpcs3/rpcs3qt/about_dialog.cpp b/rpcs3/rpcs3qt/about_dialog.cpp index 8b5eecef13..095c65dc8d 100644 --- a/rpcs3/rpcs3qt/about_dialog.cpp +++ b/rpcs3/rpcs3qt/about_dialog.cpp @@ -18,7 +18,7 @@ about_dialog::about_dialog(QWidget* parent) : QDialog(parent), ui(new Ui::about_ ui->version->setText(tr("RPCS3 Version: %1").arg(QString::fromStdString(rpcs3::get_verbose_version()))); ui->description->setText(gui::utils::make_paragraph(tr( "RPCS3 is an open-source Sony PlayStation 3 emulator and debugger.\n" - "It is written in C++ for Windows, Linux, FreeBSD and MacOS funded with %0.\n" + "It is written in C++ for Windows, Linux, FreeBSD and MacOS, funded with %0.\n" "Our developers and contributors are always working hard to ensure this project is the best that it can be.\n" "There are still plenty of implementations to make and optimizations to do.") .arg(gui::utils::make_link(tr("Patreon"), "https://rpcs3.net/patreon")))); diff --git a/rpcs3/rpcs3qt/about_dialog.ui b/rpcs3/rpcs3qt/about_dialog.ui index 4c7d841d8a..67bb5762f4 100644 --- a/rpcs3/rpcs3qt/about_dialog.ui +++ b/rpcs3/rpcs3qt/about_dialog.ui @@ -76,10 +76,10 @@ - Qt::Vertical + Qt::Orientation::Vertical - QSizePolicy::MinimumExpanding + QSizePolicy::Policy::MinimumExpanding @@ -100,7 +100,6 @@ Arial 14 - 50 false @@ -108,10 +107,10 @@ RPCS3 PlayStation 3 Emulator - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignTop - Qt::TextSelectableByMouse + Qt::TextInteractionFlag::TextSelectableByMouse @@ -124,10 +123,10 @@ - Qt::RichText + Qt::TextFormat::RichText - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignTop false @@ -136,7 +135,7 @@ true - Qt::TextBrowserInteraction + Qt::TextInteractionFlag::TextBrowserInteraction @@ -152,16 +151,16 @@ - Qt::RichText + Qt::TextFormat::RichText - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignTop true - Qt::TextBrowserInteraction + Qt::TextInteractionFlag::TextBrowserInteraction @@ -185,13 +184,13 @@ - QFrame::NoFrame + QFrame::Shape::NoFrame - Qt::ScrollBarAlwaysOn + Qt::ScrollBarPolicy::ScrollBarAlwaysOn - QAbstractScrollArea::AdjustToContents + QAbstractScrollArea::SizeAdjustPolicy::AdjustToContents true @@ -201,50 +200,105 @@ 0 0 - 788 - 2076 + 793 + 2638 - QLayout::SetMinimumSize + QLayout::SizeConstraint::SetMinimumSize 24 - - - <p><b>Developers:</b><br><br>¬DH<br>¬AlexAltea<br>¬Hykem<br>¬Oil<br>Nekotekina<br>¬Bigpet<br>¬gopalsr83<br>¬tambry<br>¬vlj<br>kd-11<br>¬jarveson<br>¬raven02<br>AniLeo<br>¬cornytrace<br>¬ssshadow<br>¬Numan<br>hcorion<br>Megamouse<br>¬flash-fire<br>DAGINATSUKO<br>GalCiv<br>eladash</p> + + + 10 - - false - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - Qt::TextSelectableByMouse - - + + + + + true + + + + Developers: + + + + + + + <p>¬DH<br>¬AlexAltea<br>¬Hykem<br>¬Oil<br>Nekotekina<br>¬Bigpet<br>¬gopalsr83<br>¬tambry<br>¬vlj<br>kd-11<br>¬jarveson<br>¬raven02<br>AniLeo<br>¬cornytrace<br>¬ssshadow<br>¬Numan<br>hcorion<br>Megamouse<br>¬flash-fire<br>DAGINATSUKO<br>GalCiv<br>eladash</p> + + + false + + + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignTop + + + Qt::TextInteractionFlag::TextSelectableByMouse + + + + - - - <p><b>Contributors:</b><br><br>BlackDaemon<br>elisha464<br>Aishou<br>krofna<br>xsacha<br>danilaml<br>unknownbrackets<br>Zangetsu38<br>lioncash<br>achurch<br>darkf<br>Syphurith<br>Blaypeg<br>Survanium90<br>georgemoralis<br>ikki84<br>scribam<br>TGE<br>velocity<br>Farseer<br>Dangles<br>ruipin<br>jbeich<br>CookiePLMonster<br>Whatcookie<br>rajkosto<br>Admiral Thrawn<br>FlexBy<br>Dunastique<br>Jonathan44062<br>yurinator557<br>Satan<br>HoldTheMourning<br>illusion0001</p> + + + 10 - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - Qt::TextSelectableByMouse - - + + + + + true + + + + Contributors: + + + + + + + <p>BlackDaemon<br>elisha464<br>Aishou<br>krofna<br>xsacha<br>danilaml<br>unknownbrackets<br>Zangetsu38<br>lioncash<br>achurch<br>darkf<br>Syphurith<br>Blaypeg<br>Survanium90<br>georgemoralis<br>ikki84<br>scribam<br>TGE<br>velocity<br>Farseer<br>Dangles<br>ruipin<br>jbeich<br>CookiePLMonster<br>Whatcookie<br>rajkosto<br>Admiral Thrawn<br>FlexBy<br>Dunastique<br>Jonathan44062<br>yurinator557<br>Satan<br>HoldTheMourning<br>illusion0001</p> + + + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignTop + + + Qt::TextInteractionFlag::TextSelectableByMouse + + + + - - - <p><b>Supporters:</b><br><br>Howard Garrison<br>EXPotemkin<br>Marko V.<br>danhp<br>Jake (5315825)<br>Ian Reid<br>Tad Sherlock<br>Tyler Friesen<br>Folzar<br>Payton Williams<br>RedPill Australia<br>yanghong<br>Mohammed El-Serougi<br>Дима ~Ximer13~ Кулин<br>James Reed<br>BaroqueSonata<br>Bonzay0<br>Henrijs Kons<br>eoiz<br>Lena Stöffler<br>Michael Holder<br>Max Bosse<br>Tyler Whisinnand<br>Gato Harvey<br>cain4355<br>Thomas Peltier<br>Loli Co.<br>MapleLoonie<br>Travis McEwen<br>Scott Singratsomboune<br>T.E<br>Lukas Rieger<br>Dane Madsen<br>JMS<br>Jonatan R<br>Luke Johnson<br>Thomas Zaorski<br>MyOwnFan<br>Alexandros Mandravillis<br>Socker Bopper<br>Faris Leonhart<br>Fabien Net<br>Raves<br>Barrowsx<br>kilsuton<br>Max Mason<br>Ethan Condon<br>jfidone<br>iaDRM<br>Kazer2.0<br>Bryce Quintin<br>Yuri Kunde Schlesner<br>Abdulla Altayer<br>Nicolas Jallamion<br>Vorvek<br>Ian Faddis<br>Leon<br>Mohammad Taleb<br>Jokez<br>crashX<br>Raveskirza<br>Grant Deacon<br>michael<br>David Zech<br>Ben Manoochehri<br>Adnan Kovacevic<br>Mighty J<br>Sam Shan Jiang<br>TheAnig<br>Rodney Coleman<br>FiniteAce<br>Kian Soon Alex Chiam<br>yukkuri<br>Justin Chadwick<br>toxic Itzi<br>Templerror<br>Myles Wesley Carlson<br>Max Bosse<br>Ethan Clark<br>LupineDream<br>CheatCodesOfLife<br>Jan Zykmund<br>Francesco Cinquemani<br>Andylg<br>Julia H de Camargos<br>Suvodip Mitra<br>Goh<br>Dmitry<br>Steel Brain<br>VarieZ<br>William Swango<br>Matthew Messersmith<br>Duane Locsin<br>Shuddertrix<br>Loweys Litsman<br>Shuddertrix<br>Mason Ferrie<br>Richard Kaplan<br>Hugues Valois<br>richard(lath..ch@)<br>Johnathan (Virtuous John)<br>eoiz<br>Dany Huguenin<br>doobieashtray<br>dean(mag..94@)<br>Pommier Jean-Philippe<br>Douglas Alan Albino<br>Ryan Mull<br>Thor-Erling Engen<br>Nick Carpenter<br>curryking3<br>Jared Tracton<br>alex(koo..oh@)<br>Jason O'Brien<br>Skeletal Charizard<br>Ace00<br>Brandon Corujo<br>HyperBitHero<br>佳文 李<br>sorryboi + + + 10 + + + + + + true + + + + Supporters: + + + + + + + <p>Howard Garrison<br>EXPotemkin<br>Marko V.<br>danhp<br>Jake (5315825)<br>Ian Reid<br>Tad Sherlock<br>Tyler Friesen<br>Folzar<br>Payton Williams<br>RedPill Australia<br>yanghong<br>Mohammed El-Serougi<br>Дима ~Ximer13~ Кулин<br>James Reed<br>BaroqueSonata<br>Bonzay0<br>Henrijs Kons<br>eoiz<br>Lena Stöffler<br>Michael Holder<br>Max Bosse<br>Tyler Whisinnand<br>Gato Harvey<br>cain4355<br>Thomas Peltier<br>Loli Co.<br>MapleLoonie<br>Travis McEwen<br>Scott Singratsomboune<br>T.E<br>Lukas Rieger<br>Dane Madsen<br>JMS<br>Jonatan R<br>Luke Johnson<br>Thomas Zaorski<br>MyOwnFan<br>Alexandros Mandravillis<br>Socker Bopper<br>Faris Leonhart<br>Fabien Net<br>Raves<br>Barrowsx<br>kilsuton<br>Max Mason<br>Ethan Condon<br>jfidone<br>iaDRM<br>Kazer2.0<br>Bryce Quintin<br>Yuri Kunde Schlesner<br>Abdulla Altayer<br>Nicolas Jallamion<br>Vorvek<br>Ian Faddis<br>Leon<br>Mohammad Taleb<br>Jokez<br>crashX<br>Raveskirza<br>Grant Deacon<br>michael<br>David Zech<br>Ben Manoochehri<br>Adnan Kovacevic<br>Mighty J<br>Sam Shan Jiang<br>TheAnig<br>Rodney Coleman<br>FiniteAce<br>Kian Soon Alex Chiam<br>yukkuri<br>Justin Chadwick<br>toxic Itzi<br>Templerror<br>Myles Wesley Carlson<br>Max Bosse<br>Ethan Clark<br>LupineDream<br>CheatCodesOfLife<br>Jan Zykmund<br>Francesco Cinquemani<br>Andylg<br>Julia H de Camargos<br>Suvodip Mitra<br>Goh<br>Dmitry<br>Steel Brain<br>VarieZ<br>William Swango<br>Matthew Messersmith<br>Duane Locsin<br>Shuddertrix<br>Loweys Litsman<br>Shuddertrix<br>Mason Ferrie<br>Richard Kaplan<br>Hugues Valois<br>richard(lath..ch@)<br>Johnathan (Virtuous John)<br>eoiz<br>Dany Huguenin<br>doobieashtray<br>dean(mag..94@)<br>Pommier Jean-Philippe<br>Douglas Alan Albino<br>Ryan Mull<br>Thor-Erling Engen<br>Nick Carpenter<br>curryking3<br>Jared Tracton<br>alex(koo..oh@)<br>Jason O'Brien<br>Skeletal Charizard<br>Ace00<br>Brandon Corujo<br>HyperBitHero<br>佳文 李<br>sorryboi <br>Johnson Bui <br>itachi1986 <br>Mortano @@ -288,22 +342,24 @@ <br>Vekkar <br>Jackson Abney </p> - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - Qt::TextSelectableByMouse - - + + + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignTop + + + Qt::TextInteractionFlag::TextSelectableByMouse + + + + - Qt::Horizontal + Qt::Orientation::Horizontal - QSizePolicy::MinimumExpanding + QSizePolicy::Policy::MinimumExpanding @@ -376,7 +432,7 @@ - Qt::Horizontal + Qt::Orientation::Horizontal diff --git a/rpcs3/rpcs3qt/cheat_manager.cpp b/rpcs3/rpcs3qt/cheat_manager.cpp index 8f1f1cb049..5724999771 100644 --- a/rpcs3/rpcs3qt/cheat_manager.cpp +++ b/rpcs3/rpcs3qt/cheat_manager.cpp @@ -990,7 +990,7 @@ void cheat_manager_dialog::do_the_search() { for (u32 row = 0; row < size; row++) { - lst_search->insertItem(row, tr("0x%0").arg(offsets_found[row], 1, 16).toUpper()); + lst_search->insertItem(row, QString("0x%0").arg(offsets_found[row], 1, 16).toUpper()); } } @@ -1024,7 +1024,7 @@ void cheat_manager_dialog::update_cheat_list() item_type->setFlags(item_type->flags() & ~Qt::ItemIsEditable); tbl_cheats->setItem(row, cheat_table_columns::type, item_type); - QTableWidgetItem* item_offset = new QTableWidgetItem(tr("0x%1").arg(offset.second.offset, 1, 16).toUpper()); + QTableWidgetItem* item_offset = new QTableWidgetItem(QString("0x%0").arg(offset.second.offset, 1, 16).toUpper()); item_offset->setData(Qt::UserRole, QVariant(offset.second.offset)); item_offset->setFlags(item_offset->flags() & ~Qt::ItemIsEditable); tbl_cheats->setItem(row, cheat_table_columns::offset, item_offset); diff --git a/rpcs3/rpcs3qt/debugger_frame.cpp b/rpcs3/rpcs3qt/debugger_frame.cpp index 606b491bf8..f98c7fbdd5 100644 --- a/rpcs3/rpcs3qt/debugger_frame.cpp +++ b/rpcs3/rpcs3qt/debugger_frame.cpp @@ -1207,7 +1207,7 @@ void debugger_frame::OnSelectSPUDisassembler() } m_spu_disasm_dialog = new QDialog(this); - m_spu_disasm_dialog->setWindowTitle(tr("SPU Disassmebler Properties")); + m_spu_disasm_dialog->setWindowTitle(tr("SPU Disassembler Properties")); // Panels QVBoxLayout* vbox_panel(new QVBoxLayout()); diff --git a/rpcs3/rpcs3qt/dimensions_dialog.cpp b/rpcs3/rpcs3qt/dimensions_dialog.cpp index 378f887f22..a6eb07018e 100644 --- a/rpcs3/rpcs3qt/dimensions_dialog.cpp +++ b/rpcs3/rpcs3qt/dimensions_dialog.cpp @@ -773,7 +773,7 @@ void dimensions_dialog::load_figure_path(u8 pad, u8 index, const QString& path) } else { - m_edit_figures[index]->setText(tr("Blank Tag")); + m_edit_figures[index]->setText("Blank Tag"); } } } diff --git a/rpcs3/rpcs3qt/game_list_frame.cpp b/rpcs3/rpcs3qt/game_list_frame.cpp index b46ef985dd..b9d7da471c 100644 --- a/rpcs3/rpcs3qt/game_list_frame.cpp +++ b/rpcs3/rpcs3qt/game_list_frame.cpp @@ -1031,108 +1031,120 @@ void game_list_frame::ItemSelectionChangedSlot() Q_EMIT NotifyGameSelection(game); } -void game_list_frame::CreateShortcuts(const game_info& gameinfo, const std::set& locations) +void game_list_frame::CreateShortcuts(const std::vector& games, const std::set& locations) { - if (locations.empty()) + if (games.empty()) { - game_list_log.error("Failed to create shortcuts for %s. No locations selected.", qstr(gameinfo->info.name).simplified()); + game_list_log.notice("Skip creating shortcuts. No games selected."); return; } - std::string gameid_token_value; - - const std::string dev_flash = g_cfg_vfs.get_dev_flash(); - - if (gameinfo->info.category == "DG" && !fs::is_file(rpcs3::utils::get_hdd0_dir() + "/game/" + gameinfo->info.serial + "/USRDIR/EBOOT.BIN")) + if (locations.empty()) { - const usz ps3_game_dir_pos = fs::get_parent_dir(gameinfo->info.path).size(); - std::string relative_boot_dir = gameinfo->info.path.substr(ps3_game_dir_pos); - - if (usz char_pos = relative_boot_dir.find_first_not_of(fs::delim); char_pos != umax) - { - relative_boot_dir = relative_boot_dir.substr(char_pos); - } - else - { - relative_boot_dir.clear(); - } - - if (!relative_boot_dir.empty()) - { - if (relative_boot_dir != "PS3_GAME") - { - gameid_token_value = gameinfo->info.serial + "/" + relative_boot_dir; - } - else - { - gameid_token_value = gameinfo->info.serial; - } - } - } - else - { - gameid_token_value = gameinfo->info.serial; - } - -#ifdef __linux__ - const std::string target_cli_args = gameinfo->info.path.starts_with(dev_flash) ? fmt::format("--no-gui \"%%%%RPCS3_VFS%%%%:dev_flash/%s\"", gameinfo->info.path.substr(dev_flash.size())) - : fmt::format("--no-gui \"%%%%RPCS3_GAMEID%%%%:%s\"", gameid_token_value); -#else - const std::string target_cli_args = gameinfo->info.path.starts_with(dev_flash) ? fmt::format("--no-gui \"%%RPCS3_VFS%%:dev_flash/%s\"", gameinfo->info.path.substr(dev_flash.size())) - : fmt::format("--no-gui \"%%RPCS3_GAMEID%%:%s\"", gameid_token_value); -#endif - const std::string target_icon_dir = fmt::format("%sIcons/game_icons/%s/", fs::get_config_dir(), gameinfo->info.serial); - - if (!fs::create_path(target_icon_dir)) - { - game_list_log.error("Failed to create shortcut path %s (%s)", qstr(gameinfo->info.name).simplified(), target_icon_dir, fs::g_tls_error); + game_list_log.error("Failed to create shortcuts. No locations selected."); return; } bool success = true; - for (const gui::utils::shortcut_location& location : locations) + for (const game_info& gameinfo : games) { - std::string destination; + std::string gameid_token_value; - switch (location) - { - case gui::utils::shortcut_location::desktop: - destination = "desktop"; - break; - case gui::utils::shortcut_location::applications: - destination = "application menu"; - break; -#ifdef _WIN32 - case gui::utils::shortcut_location::rpcs3_shortcuts: - destination = "/games/shortcuts/"; - break; -#endif - } + const std::string dev_flash = g_cfg_vfs.get_dev_flash(); - if (!gameid_token_value.empty() && gui::utils::create_shortcut(gameinfo->info.name, gameinfo->info.serial, target_cli_args, gameinfo->info.name, gameinfo->info.icon_path, target_icon_dir, location)) + if (gameinfo->info.category == "DG" && !fs::is_file(rpcs3::utils::get_hdd0_dir() + "/game/" + gameinfo->info.serial + "/USRDIR/EBOOT.BIN")) { - game_list_log.success("Created %s shortcut for %s", destination, qstr(gameinfo->info.name).simplified()); + const usz ps3_game_dir_pos = fs::get_parent_dir(gameinfo->info.path).size(); + std::string relative_boot_dir = gameinfo->info.path.substr(ps3_game_dir_pos); + + if (usz char_pos = relative_boot_dir.find_first_not_of(fs::delim); char_pos != umax) + { + relative_boot_dir = relative_boot_dir.substr(char_pos); + } + else + { + relative_boot_dir.clear(); + } + + if (!relative_boot_dir.empty()) + { + if (relative_boot_dir != "PS3_GAME") + { + gameid_token_value = gameinfo->info.serial + "/" + relative_boot_dir; + } + else + { + gameid_token_value = gameinfo->info.serial; + } + } } else { - game_list_log.error("Failed to create %s shortcut for %s", destination, qstr(gameinfo->info.name).simplified()); + gameid_token_value = gameinfo->info.serial; + } + +#ifdef __linux__ + const std::string target_cli_args = gameinfo->info.path.starts_with(dev_flash) ? fmt::format("--no-gui \"%%%%RPCS3_VFS%%%%:dev_flash/%s\"", gameinfo->info.path.substr(dev_flash.size())) + : fmt::format("--no-gui \"%%%%RPCS3_GAMEID%%%%:%s\"", gameid_token_value); +#else + const std::string target_cli_args = gameinfo->info.path.starts_with(dev_flash) ? fmt::format("--no-gui \"%%RPCS3_VFS%%:dev_flash/%s\"", gameinfo->info.path.substr(dev_flash.size())) + : fmt::format("--no-gui \"%%RPCS3_GAMEID%%:%s\"", gameid_token_value); +#endif + const std::string target_icon_dir = fmt::format("%sIcons/game_icons/%s/", fs::get_config_dir(), gameinfo->info.serial); + + if (!fs::create_path(target_icon_dir)) + { + game_list_log.error("Failed to create shortcut path %s (%s)", qstr(gameinfo->info.name).simplified(), target_icon_dir, fs::g_tls_error); success = false; + continue; + } + + for (const gui::utils::shortcut_location& location : locations) + { + std::string destination; + + switch (location) + { + case gui::utils::shortcut_location::desktop: + destination = "desktop"; + break; + case gui::utils::shortcut_location::applications: + destination = "application menu"; + break; +#ifdef _WIN32 + case gui::utils::shortcut_location::rpcs3_shortcuts: + destination = "/games/shortcuts/"; + break; +#endif + } + + if (!gameid_token_value.empty() && gui::utils::create_shortcut(gameinfo->info.name, gameinfo->info.serial, target_cli_args, gameinfo->info.name, gameinfo->info.icon_path, target_icon_dir, location)) + { + game_list_log.success("Created %s shortcut for %s", destination, qstr(gameinfo->info.name).simplified()); + } + else + { + game_list_log.error("Failed to create %s shortcut for %s", destination, qstr(gameinfo->info.name).simplified()); + success = false; + } } } #ifdef _WIN32 - if (locations.size() > 1 || !locations.contains(gui::utils::shortcut_location::rpcs3_shortcuts)) -#endif + if (locations.size() == 1 && locations.contains(gui::utils::shortcut_location::rpcs3_shortcuts)) { - if (success) - { - QMessageBox::information(this, tr("Success!"), tr("Successfully created shortcut(s).")); - } - else - { - QMessageBox::warning(this, tr("Warning!"), tr("Failed to create shortcut(s)!")); - } + return; + } +#endif + + if (success) + { + QMessageBox::information(this, tr("Success!"), tr("Successfully created shortcut(s).")); + } + else + { + QMessageBox::warning(this, tr("Warning!"), tr("Failed to create one or more shortcuts!")); } } @@ -1378,7 +1390,7 @@ void game_list_frame::ShowContextMenu(const QPoint &pos) QAction* create_desktop_shortcut = manage_game_menu->addAction(tr("&Create Desktop Shortcut")); connect(create_desktop_shortcut, &QAction::triggered, this, [this, gameinfo]() { - CreateShortcuts(gameinfo, {gui::utils::shortcut_location::desktop}); + CreateShortcuts({gameinfo}, {gui::utils::shortcut_location::desktop}); }); #ifdef _WIN32 QAction* create_start_menu_shortcut = manage_game_menu->addAction(tr("&Create Start Menu Shortcut")); @@ -1389,7 +1401,7 @@ void game_list_frame::ShowContextMenu(const QPoint &pos) #endif connect(create_start_menu_shortcut, &QAction::triggered, this, [this, gameinfo]() { - CreateShortcuts(gameinfo, {gui::utils::shortcut_location::applications}); + CreateShortcuts({gameinfo}, {gui::utils::shortcut_location::applications}); }); manage_game_menu->addSeparator(); diff --git a/rpcs3/rpcs3qt/game_list_frame.h b/rpcs3/rpcs3qt/game_list_frame.h index bbef37e377..7282f1b745 100644 --- a/rpcs3/rpcs3qt/game_list_frame.h +++ b/rpcs3/rpcs3qt/game_list_frame.h @@ -59,7 +59,7 @@ public: const std::vector& GetGameInfo() const; - void CreateShortcuts(const game_info& gameinfo, const std::set& locations); + void CreateShortcuts(const std::vector& games, const std::set& locations); bool IsEntryVisible(const game_info& game, bool search_fallback = false) const; diff --git a/rpcs3/rpcs3qt/log_frame.cpp b/rpcs3/rpcs3qt/log_frame.cpp index d01bd1bf4f..50ddb13f1c 100644 --- a/rpcs3/rpcs3qt/log_frame.cpp +++ b/rpcs3/rpcs3qt/log_frame.cpp @@ -360,7 +360,7 @@ void log_frame::CreateAndConnectActions() m_perform_goto_on_debugger->setEnabled(m_log->textCursor().hasSelection() && *goto_signal_accepted); m_perform_goto_thread_on_debugger->setEnabled(m_log->textCursor().hasSelection() && *goto_signal_accepted); m_perform_goto_on_debugger->setToolTip(tr("Jump to the selected hexadecimal address from the log text on the debugger.")); - m_perform_goto_thread_on_debugger->setToolTip(tr("Show the thread that corresponds to the thread ID from lthe log text on the debugger.")); + m_perform_goto_thread_on_debugger->setToolTip(tr("Show the thread that corresponds to the thread ID from the log text on the debugger.")); menu->addSeparator(); menu->addActions(m_log_level_acts->actions()); diff --git a/rpcs3/rpcs3qt/main_window.cpp b/rpcs3/rpcs3qt/main_window.cpp index 42301d2f42..47c6a5be68 100644 --- a/rpcs3/rpcs3qt/main_window.cpp +++ b/rpcs3/rpcs3qt/main_window.cpp @@ -917,7 +917,7 @@ bool main_window::InstallPackages(QStringList file_paths, bool from_boot) if (!info.changelog.isEmpty()) { mb.setInformativeText(tr("To see the changelog, please click \"Show Details\".")); - mb.setDetailedText(tr("%0").arg(info.changelog)); + mb.setDetailedText(info.changelog); // Smartass hack to make the unresizeable message box wide enough for the changelog const int log_width = QLabel(info.changelog).sizeHint().width(); @@ -2497,7 +2497,13 @@ void main_window::ShowOptionalGamePreparations(const QString& title, const QStri locations.insert(gui::utils::shortcut_location::applications); } + if (locations.empty() && !create_caches) + { + return; + } + std::vector game_data; + std::vector game_data_shortcuts; for (const auto& [boot_path, title_id] : paths) { @@ -2507,7 +2513,10 @@ void main_window::ShowOptionalGamePreparations(const QString& title, const QStri { if (Emu.IsPathInsideDir(boot_path, gameinfo->info.path)) { - m_game_list_frame->CreateShortcuts(gameinfo, locations); + if (!locations.empty()) + { + game_data_shortcuts.push_back(gameinfo); + } if (create_caches) { @@ -2519,6 +2528,11 @@ void main_window::ShowOptionalGamePreparations(const QString& title, const QStri } } } + + if (!game_data_shortcuts.empty() && !locations.empty()) + { + m_game_list_frame->CreateShortcuts(game_data_shortcuts, locations); + } if (!game_data.empty()) { diff --git a/rpcs3/rpcs3qt/memory_viewer_panel.cpp b/rpcs3/rpcs3qt/memory_viewer_panel.cpp index c1ae7a0a0e..bd8fc91727 100644 --- a/rpcs3/rpcs3qt/memory_viewer_panel.cpp +++ b/rpcs3/rpcs3qt/memory_viewer_panel.cpp @@ -119,7 +119,7 @@ memory_viewer_panel::memory_viewer_panel(QWidget* parent, std::shared_ptr gui_setti if (game) { m_title_id = game->serial; - setWindowTitle(tr("Gamepad Settings: [%0] %1").arg(qstr(game->serial)).arg(qstr(game->name).simplified())); + setWindowTitle(tr("Gamepad Settings: [%0] %1").arg(QString::fromStdString(game->serial)).arg(QString::fromStdString(game->name).simplified())); } else { @@ -89,13 +88,13 @@ pad_settings_dialog::pad_settings_dialog(std::shared_ptr gui_setti if (m_title_id.empty()) { - const QString input_config_dir = qstr(rpcs3::utils::get_input_config_dir(m_title_id)); + const QString input_config_dir = QString::fromStdString(rpcs3::utils::get_input_config_dir(m_title_id)); QStringList config_files = gui::utils::get_dir_entries(QDir(input_config_dir), QStringList() << "*.yml"); - QString active_config_file = qstr(g_cfg_input_configs.active_configs.get_value(g_cfg_input_configs.global_key)); + QString active_config_file = QString::fromStdString(g_cfg_input_configs.active_configs.get_value(g_cfg_input_configs.global_key)); if (!config_files.contains(active_config_file)) { - const QString default_config_file = qstr(g_cfg_input_configs.default_config); + const QString default_config_file = QString::fromStdString(g_cfg_input_configs.default_config); if (!config_files.contains(default_config_file) && CreateConfigFile(input_config_dir, default_config_file)) { @@ -114,7 +113,7 @@ pad_settings_dialog::pad_settings_dialog(std::shared_ptr gui_setti } else { - ui->chooseConfig->addItem(qstr(m_title_id)); + ui->chooseConfig->addItem(QString::fromStdString(m_title_id)); ui->gb_config_files->setEnabled(false); } @@ -673,7 +672,7 @@ void pad_settings_dialog::ReloadButtons() auto updateButton = [this](int id, QPushButton* button, cfg::string* cfg_text) { - const QString text = qstr(*cfg_text); + const QString text = QString::fromStdString(*cfg_text); m_cfg_entries.insert(std::make_pair(id, pad_button{cfg_text, *cfg_text, text})); button->setText(text); }; @@ -1228,7 +1227,7 @@ void pad_settings_dialog::UpdateLabels(bool is_reset) if (is_reset) { button.keys = *button.cfg_text; - button.text = qstr(button.keys); + button.text = QString::fromStdString(button.keys); } // The button has to contain at least one character, because it would be square'ish otherwise @@ -1493,7 +1492,7 @@ void pad_settings_dialog::ChangeHandler() case pad_handler::skateboard: case pad_handler::move: { - const QString name_string = qstr(m_handler->name_string()); + const QString name_string = QString::fromStdString(m_handler->name_string()); for (usz i = 1; i <= m_handler->max_devices(); i++) // Controllers 1-n in GUI { const QString device_name = name_string + QString::number(i); @@ -1628,15 +1627,15 @@ void pad_settings_dialog::ChangeConfig(const QString& config_file) } const u32 player_id = GetPlayerIndex(); - const std::string handler = fmt::format("%s", g_cfg_input.player[player_id]->handler.get()); + const QString q_handler = QString::fromStdString(g_cfg_input.player[player_id]->handler.to_string()); - if (const QString q_handler = qstr(handler); ui->chooseHandler->findText(q_handler) >= 0) + if (const int index = ui->chooseHandler->findData(q_handler); index >= 0) { - ui->chooseHandler->setCurrentText(q_handler); + ui->chooseHandler->setCurrentIndex(index); } else { - cfg_log.error("Handler '%s' not found in handler dropdown.", handler); + cfg_log.error("Handler '%s' not found in handler dropdown.", q_handler); } // Force Refresh @@ -1773,7 +1772,7 @@ void pad_settings_dialog::AddConfigFile() QMessageBox::warning(this, tr("Error"), tr("Please choose a non-existing name")); continue; } - if (CreateConfigFile(qstr(rpcs3::utils::get_input_config_dir(m_title_id)), config_name)) + if (CreateConfigFile(QString::fromStdString(rpcs3::utils::get_input_config_dir(m_title_id)), config_name)) { ui->chooseConfig->addItem(config_name); ui->chooseConfig->setCurrentText(config_name); @@ -1799,12 +1798,12 @@ void pad_settings_dialog::RefreshHandlers() const std::vector str_inputs = g_cfg_input.player[0]->handler.to_list(); for (usz i = 0; i < str_inputs.size(); i++) { - const QString item_data = qstr(str_inputs[i]); + const QString item_data = QString::fromStdString(str_inputs[i]); ui->chooseHandler->addItem(GetLocalizedPadHandler(item_data, static_cast(i)), QVariant(item_data)); } - const auto& handler = g_cfg_input.player[player_id]->handler; - ui->chooseHandler->setCurrentText(GetLocalizedPadHandler(qstr(handler.to_string()), handler)); + const QString item_data = QString::fromStdString(g_cfg_input.player[player_id]->handler.to_string()); + ui->chooseHandler->setCurrentIndex(ui->chooseHandler->findData(QVariant(item_data))); } ui->chooseHandler->blockSignals(false); @@ -1932,7 +1931,9 @@ void pad_settings_dialog::SaveExit() m_gui_settings->ShowConfirmationBox( tr("Warning!"), tr("The %0 button %1 of Player %2 was assigned at least twice.
Please consider adjusting the configuration.

Continue anyway?
") - .arg(qstr(g_cfg_input.player[player_id]->handler.to_string())).arg(qstr(key)).arg(player_id + 1), + .arg(QString::fromStdString(g_cfg_input.player[player_id]->handler.to_string())) + .arg(QString::fromStdString(key)) + .arg(player_id + 1), gui::ib_same_buttons, &result, this); if (result == QMessageBox::No) diff --git a/rpcs3/rpcs3qt/patch_manager_dialog.cpp b/rpcs3/rpcs3qt/patch_manager_dialog.cpp index 21264e35bc..8ece486aee 100644 --- a/rpcs3/rpcs3qt/patch_manager_dialog.cpp +++ b/rpcs3/rpcs3qt/patch_manager_dialog.cpp @@ -1082,7 +1082,7 @@ void patch_manager_dialog::dropEvent(QDropEvent* event) QString message = tr("Errors were found in the patch file."); QMessageBox* mb = new QMessageBox(QMessageBox::Icon::Critical, tr("Validation failed"), message, QMessageBox::Ok, this); mb->setInformativeText(tr("To see the error log, please click \"Show Details\".")); - mb->setDetailedText(tr("%0").arg(summary)); + mb->setDetailedText(summary); mb->setAttribute(Qt::WA_DeleteOnClose); // Smartass hack to make the unresizeable message box wide enough for the changelog @@ -1304,7 +1304,7 @@ bool patch_manager_dialog::handle_json(const QByteArray& data) QString message = tr("Errors were found in the downloaded patch file."); QMessageBox* mb = new QMessageBox(QMessageBox::Icon::Critical, tr("Validation failed"), message, QMessageBox::Ok, this); mb->setInformativeText(tr("To see the error log, please click \"Show Details\".")); - mb->setDetailedText(tr("%0").arg(summary)); + mb->setDetailedText(summary); mb->setAttribute(Qt::WA_DeleteOnClose); // Smartass hack to make the unresizeable message box wide enough for the changelog diff --git a/rpcs3/rpcs3qt/pkg_install_dialog.cpp b/rpcs3/rpcs3qt/pkg_install_dialog.cpp index 185bf4d6fc..11431b2ad4 100644 --- a/rpcs3/rpcs3qt/pkg_install_dialog.cpp +++ b/rpcs3/rpcs3qt/pkg_install_dialog.cpp @@ -68,7 +68,7 @@ pkg_install_dialog::pkg_install_dialog(const QStringList& paths, game_compatibil else if (!info.local_cat.isEmpty()) { append_comma(); - accumulated_info += tr("%0", "Package type info").arg(info.local_cat); + accumulated_info += info.local_cat; } if (!info.version.isEmpty())