diff --git a/rpcs3/Crypto/unpkg.cpp b/rpcs3/Crypto/unpkg.cpp index 35e8edc4f6..92e34833e3 100644 --- a/rpcs3/Crypto/unpkg.cpp +++ b/rpcs3/Crypto/unpkg.cpp @@ -201,7 +201,7 @@ bool pkg_install(const std::string& path, atomic_t& sync) bool was_null = true; // Get full path and create the directory - const std::string dir = Emu.GetHddDir() + "game/" + install_id + '/'; + const std::string dir = Emulator::GetHddDir() + "game/" + install_id + '/'; if (!fs::create_dir(dir)) { diff --git a/rpcs3/Emu/Io/PadHandler.cpp b/rpcs3/Emu/Io/PadHandler.cpp index 65e54b23b4..596fd7d2d6 100644 --- a/rpcs3/Emu/Io/PadHandler.cpp +++ b/rpcs3/Emu/Io/PadHandler.cpp @@ -275,16 +275,16 @@ std::string PadHandlerBase::get_config_dir(pad_handler type, const std::string& { if (!title_id.empty()) { - return Emu.GetCustomInputConfigDir(title_id) + fmt::format("%s", type) + "/"; + return Emulator::GetCustomInputConfigDir(title_id) + fmt::format("%s", type) + "/"; } return fs::get_config_dir() + "/InputConfigs/" + fmt::format("%s", type) + "/"; } std::string PadHandlerBase::get_config_filename(int i, const std::string& title_id) { - if (!title_id.empty() && fs::is_file(Emu.GetCustomInputConfigPath(title_id))) + if (!title_id.empty() && fs::is_file(Emulator::GetCustomInputConfigPath(title_id))) { - const std::string path = Emu.GetCustomInputConfigDir(title_id) + g_cfg_input.player[i]->handler.to_string() + "/" + g_cfg_input.player[i]->profile.to_string() + ".yml"; + const std::string path = Emulator::GetCustomInputConfigDir(title_id) + g_cfg_input.player[i]->handler.to_string() + "/" + g_cfg_input.player[i]->profile.to_string() + ".yml"; if (fs::is_file(path)) { return path; diff --git a/rpcs3/Emu/Io/PadHandler.h b/rpcs3/Emu/Io/PadHandler.h index beee7cc3aa..843d726611 100644 --- a/rpcs3/Emu/Io/PadHandler.h +++ b/rpcs3/Emu/Io/PadHandler.h @@ -286,7 +286,7 @@ struct cfg_input final : cfg::node bool load(const std::string& title_id = "") { - cfg_name = Emu.GetCustomInputConfigPath(title_id); + cfg_name = Emulator::GetCustomInputConfigPath(title_id); if (!fs::is_file(cfg_name)) { @@ -308,7 +308,7 @@ struct cfg_input final : cfg::node } else { - cfg_name = Emu.GetCustomInputConfigPath(title_id); + cfg_name = Emulator::GetCustomInputConfigPath(title_id); } fs::file(cfg_name, fs::rewrite).write(to_string()); } diff --git a/rpcs3/main.cpp b/rpcs3/main.cpp index 78b6b3168c..5cbd1ee800 100644 --- a/rpcs3/main.cpp +++ b/rpcs3/main.cpp @@ -116,8 +116,8 @@ int main(int argc, char** argv) s_qt_mutex.lock(); rpcs3_app app(argc, argv); - app.setApplicationVersion(qstr(rpcs3::version.to_string())); - app.setApplicationName("RPCS3"); + QCoreApplication::setApplicationVersion(qstr(rpcs3::version.to_string())); + QCoreApplication::setApplicationName("RPCS3"); // Command line args QCommandLineParser parser; @@ -166,5 +166,5 @@ int main(int argc, char** argv) s_qt_init.unlock(); s_qt_mutex.unlock(); - return app.exec(); + return QCoreApplication::exec(); } diff --git a/rpcs3/rpcs3qt/emu_settings.cpp b/rpcs3/rpcs3qt/emu_settings.cpp index 43afad264e..75199e38fc 100644 --- a/rpcs3/rpcs3qt/emu_settings.cpp +++ b/rpcs3/rpcs3qt/emu_settings.cpp @@ -190,7 +190,7 @@ void emu_settings::LoadSettings(const std::string& title_id) m_title_id = title_id; // Create config path if necessary - fs::create_path(title_id.empty() ? fs::get_config_dir() : Emu.GetCustomConfigDir()); + fs::create_path(title_id.empty() ? fs::get_config_dir() : Emulator::GetCustomConfigDir()); // Load default config m_defaultSettings = YAML::Load(g_cfg_defaults); @@ -204,8 +204,8 @@ void emu_settings::LoadSettings(const std::string& title_id) // Add game config if (!title_id.empty()) { - const std::string config_path_new = Emu.GetCustomConfigPath(m_title_id); - const std::string config_path_old = Emu.GetCustomConfigPath(m_title_id, true); + const std::string config_path_new = Emulator::GetCustomConfigPath(m_title_id); + const std::string config_path_old = Emulator::GetCustomConfigPath(m_title_id, true); if (fs::is_file(config_path_new)) { @@ -230,7 +230,7 @@ void emu_settings::SaveSettings() if (!m_title_id.empty()) { - config = fs::file(Emu.GetCustomConfigPath(m_title_id), fs::read + fs::write + fs::create); + config = fs::file(Emulator::GetCustomConfigPath(m_title_id), fs::read + fs::write + fs::create); } else { diff --git a/rpcs3/rpcs3qt/game_list_frame.cpp b/rpcs3/rpcs3qt/game_list_frame.cpp index 29837dafbd..66277cfa3a 100644 --- a/rpcs3/rpcs3qt/game_list_frame.cpp +++ b/rpcs3/rpcs3qt/game_list_frame.cpp @@ -380,7 +380,7 @@ void game_list_frame::Refresh(const bool fromDrive, const bool scrollAfter) m_game_data.clear(); m_notes.clear(); - const std::string _hdd = Emu.GetHddDir(); + const std::string _hdd = Emulator::GetHddDir(); const std::string cat_DG = sstr(category::disc_game); const std::string cat_GD = sstr(category::ps3_data); const std::string cat_unknown = sstr(category::unknown); @@ -450,7 +450,7 @@ void game_list_frame::Refresh(const bool fromDrive, const bool scrollAfter) for (const auto& dir : path_list) { try { - const std::string sfo_dir = Emu.GetSfoDirFromGamePath(dir, Emu.GetUsr()); + const std::string sfo_dir = Emulator::GetSfoDirFromGamePath(dir, Emu.GetUsr()); const fs::file sfo_file(sfo_dir + "/PARAM.SFO"); if (!sfo_file) { @@ -514,8 +514,8 @@ void game_list_frame::Refresh(const bool fromDrive, const bool scrollAfter) const auto compat = m_game_compat->GetCompatibility(game.serial); - const bool hasCustomConfig = fs::is_file(Emu.GetCustomConfigPath(game.serial)) || fs::is_file(Emu.GetCustomConfigPath(game.serial, true)); - const bool hasCustomPadConfig = fs::is_file(Emu.GetCustomInputConfigPath(game.serial)); + const bool hasCustomConfig = fs::is_file(Emulator::GetCustomConfigPath(game.serial)) || fs::is_file(Emulator::GetCustomConfigPath(game.serial, true)); + const bool hasCustomPadConfig = fs::is_file(Emulator::GetCustomInputConfigPath(game.serial)); const QColor color = getGridCompatibilityColor(compat.color); const QPixmap pxmap = PaintedPixmap(img, hasCustomConfig, hasCustomPadConfig, color); @@ -796,10 +796,10 @@ void game_list_frame::ShowContextMenu(const QPoint &pos) QAction* open_config_dir = myMenu.addAction(tr("&Open Custom Config Folder")); connect(open_config_dir, &QAction::triggered, [=]() { - if (fs::is_file(Emu.GetCustomConfigPath(currGame.serial))) - open_dir(Emu.GetCustomConfigDir()); + if (fs::is_file(Emulator::GetCustomConfigPath(currGame.serial))) + open_dir(Emulator::GetCustomConfigDir()); - if (fs::is_file(Emu.GetCustomConfigPath(currGame.serial, true))) + if (fs::is_file(Emulator::GetCustomConfigPath(currGame.serial, true))) open_dir(data_base_dir); }); } @@ -1018,8 +1018,8 @@ bool game_list_frame::CreatePPUCache(const game_info& game) bool game_list_frame::RemoveCustomConfiguration(const std::string& title_id, game_info game, bool is_interactive) { - const std::string config_path_new = Emu.GetCustomConfigPath(title_id); - const std::string config_path_old = Emu.GetCustomConfigPath(title_id, true); + const std::string config_path_new = Emulator::GetCustomConfigPath(title_id); + const std::string config_path_old = Emulator::GetCustomConfigPath(title_id, true); if (!fs::is_file(config_path_new) && !fs::is_file(config_path_old)) return true; @@ -1060,7 +1060,7 @@ bool game_list_frame::RemoveCustomConfiguration(const std::string& title_id, gam bool game_list_frame::RemoveCustomPadConfiguration(const std::string& title_id, game_info game, bool is_interactive) { - const std::string config_dir = Emu.GetCustomInputConfigDir(title_id); + const std::string config_dir = Emulator::GetCustomConfigPath(title_id); if (!fs::is_dir(config_dir)) return true; diff --git a/rpcs3/rpcs3qt/main_window.cpp b/rpcs3/rpcs3qt/main_window.cpp index a9b9d32af0..babdccbc05 100644 --- a/rpcs3/rpcs3qt/main_window.cpp +++ b/rpcs3/rpcs3qt/main_window.cpp @@ -198,7 +198,7 @@ void main_window::SetAppIconFromPath(const std::string& path, const std::string& continue; } - const std::string sfo_dir = Emu.GetSfoDirFromGamePath(pth, Emu.GetUsr(), title_id); + const std::string sfo_dir = Emulator::GetSfoDirFromGamePath(pth, Emu.GetUsr(), title_id); const std::string ico = sfo_dir + "/ICON0.PNG"; if (fs::is_file(ico)) { @@ -1899,7 +1899,7 @@ void main_window::dropEvent(QDropEvent* event) { const std::string rapname = sstr(QFileInfo(rap).fileName()); - if (!fs::copy_file(sstr(rap), Emu.GetHddDir() + "/home/" + Emu.GetUsr() + "/exdata/" + rapname, false)) + if (!fs::copy_file(sstr(rap), Emulator::GetHddDir() + "/home/" + Emu.GetUsr() + "/exdata/" + rapname, false)) { LOG_WARNING(GENERAL, "Could not copy rap file by drop: %s", rapname); } diff --git a/rpcs3/rpcs3qt/save_manager_dialog.cpp b/rpcs3/rpcs3qt/save_manager_dialog.cpp index 5919a09242..d8603c2532 100644 --- a/rpcs3/rpcs3qt/save_manager_dialog.cpp +++ b/rpcs3/rpcs3qt/save_manager_dialog.cpp @@ -147,7 +147,7 @@ void save_manager_dialog::UpdateList() { if (m_dir == "") { - m_dir = Emu.GetHddDir() + "home/" + Emu.GetUsr() + "/savedata/"; + m_dir = Emulator::GetHddDir() + "home/" + Emu.GetUsr() + "/savedata/"; } m_save_entries = GetSaveEntries(m_dir); diff --git a/rpcs3/rpcs3qt/trophy_manager_dialog.cpp b/rpcs3/rpcs3qt/trophy_manager_dialog.cpp index 4e234d9b87..1b2fffe3f3 100644 --- a/rpcs3/rpcs3qt/trophy_manager_dialog.cpp +++ b/rpcs3/rpcs3qt/trophy_manager_dialog.cpp @@ -56,7 +56,7 @@ trophy_manager_dialog::trophy_manager_dialog(std::shared_ptr gui_s m_show_platinum_trophies = m_gui_settings->GetValue(gui::tr_show_platinum).toBool(); // HACK: dev_hdd0 must be mounted for vfs to work for loading trophies. - vfs::mount("/dev_hdd0", Emu.GetHddDir()); + vfs::mount("/dev_hdd0", Emulator::GetHddDir()); // Get the currently selected user's trophy path. m_trophy_dir = "/dev_hdd0/home/" + Emu.GetUsr() + "/trophy/"; diff --git a/rpcs3/rpcs3qt/user_account.cpp b/rpcs3/rpcs3qt/user_account.cpp index 52da4b9e09..d7a5e9459c 100644 --- a/rpcs3/rpcs3qt/user_account.cpp +++ b/rpcs3/rpcs3qt/user_account.cpp @@ -6,7 +6,7 @@ UserAccount::UserAccount(const std::string& user_id) m_user_id = user_id; // Setting userDir. - m_user_dir = Emu.GetHddDir() + "home/" + m_user_id + "/"; + m_user_dir = Emulator::GetHddDir() + "home/" + m_user_id + "/"; // Setting userName. fs::file file; diff --git a/rpcs3/rpcs3qt/user_manager_dialog.cpp b/rpcs3/rpcs3qt/user_manager_dialog.cpp index 759afab45e..58cbdb5e7b 100644 --- a/rpcs3/rpcs3qt/user_manager_dialog.cpp +++ b/rpcs3/rpcs3qt/user_manager_dialog.cpp @@ -173,7 +173,7 @@ void user_manager_dialog::UpdateTable(bool mark_only) // Get the user folders in the home directory and the currently logged in user. m_user_list.clear(); - m_user_list = GetUserAccounts(Emu.GetHddDir() + "home"); + m_user_list = GetUserAccounts(Emulator::GetHddDir() + "home"); // Clear and then repopulate the table with the list gathered above. m_table->setRowCount(static_cast(m_user_list.size())); @@ -239,7 +239,7 @@ void user_manager_dialog::OnUserRemove() void user_manager_dialog::GenerateUser(const std::string& user_id, const std::string& username) { // Create user folders and such. - const std::string home_dir = Emu.GetHddDir() + "home/"; + const std::string home_dir = Emulator::GetHddDir() + "home/"; const std::string user_dir = home_dir + user_id; fs::create_dir(home_dir); fs::create_dir(user_dir + "/"); @@ -289,7 +289,7 @@ void user_manager_dialog::OnUserRename() continue; } - const std::string username_file = Emu.GetHddDir() + "home/" + user_id + "/localusername"; + const std::string username_file = Emulator::GetHddDir() + "home/" + user_id + "/localusername"; const std::string new_username = text_to_validate.toStdString(); if (fs::write_file(username_file, fs::rewrite, new_username))