diff options
Diffstat (limited to 'src/yuzu')
-rw-r--r-- | src/yuzu/configuration/config.cpp | 4 | ||||
-rw-r--r-- | src/yuzu/debugger/graphics/graphics_breakpoints.cpp | 1 | ||||
-rw-r--r-- | src/yuzu/debugger/graphics/graphics_surface.cpp | 3 | ||||
-rw-r--r-- | src/yuzu/game_list.cpp | 22 | ||||
-rw-r--r-- | src/yuzu/game_list_p.h | 2 | ||||
-rw-r--r-- | src/yuzu/main.cpp | 14 |
6 files changed, 29 insertions, 17 deletions
diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp index 76c4cb165..60b6d6d44 100644 --- a/src/yuzu/configuration/config.cpp +++ b/src/yuzu/configuration/config.cpp @@ -126,8 +126,8 @@ void Config::ReadValues() { qt_config->beginGroup("UIGameList"); UISettings::values.show_unknown = qt_config->value("show_unknown", true).toBool(); UISettings::values.icon_size = qt_config->value("icon_size", 64).toUInt(); - UISettings::values.row_1_text_id = qt_config->value("row_1_text_id", 0).toUInt(); - UISettings::values.row_2_text_id = qt_config->value("row_2_text_id", 3).toUInt(); + UISettings::values.row_1_text_id = qt_config->value("row_1_text_id", 3).toUInt(); + UISettings::values.row_2_text_id = qt_config->value("row_2_text_id", 2).toUInt(); qt_config->endGroup(); qt_config->beginGroup("UILayout"); diff --git a/src/yuzu/debugger/graphics/graphics_breakpoints.cpp b/src/yuzu/debugger/graphics/graphics_breakpoints.cpp index eb16a38a0..fe682b3b8 100644 --- a/src/yuzu/debugger/graphics/graphics_breakpoints.cpp +++ b/src/yuzu/debugger/graphics/graphics_breakpoints.cpp @@ -2,6 +2,7 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#include <map> #include <QLabel> #include <QMetaType> #include <QPushButton> diff --git a/src/yuzu/debugger/graphics/graphics_surface.cpp b/src/yuzu/debugger/graphics/graphics_surface.cpp index e037223c2..2b20cf5b9 100644 --- a/src/yuzu/debugger/graphics/graphics_surface.cpp +++ b/src/yuzu/debugger/graphics/graphics_surface.cpp @@ -11,12 +11,13 @@ #include <QPushButton> #include <QScrollArea> #include <QSpinBox> +#include "common/vector_math.h" #include "core/core.h" +#include "core/memory.h" #include "video_core/engines/maxwell_3d.h" #include "video_core/gpu.h" #include "video_core/textures/decoders.h" #include "video_core/textures/texture.h" -#include "video_core/utils.h" #include "yuzu/debugger/graphics/graphics_surface.h" #include "yuzu/util/spinbox.h" diff --git a/src/yuzu/game_list.cpp b/src/yuzu/game_list.cpp index d5726b8b3..867a3c6f1 100644 --- a/src/yuzu/game_list.cpp +++ b/src/yuzu/game_list.cpp @@ -426,13 +426,12 @@ static void GetMetadataFromControlNCA(const std::shared_ptr<FileSys::NCA>& nca, } } -void GameListWorker::AddInstalledTitlesToGameList() { - const auto usernand = Service::FileSystem::GetUserNANDContents(); - const auto installed_games = usernand->ListEntriesFilter(FileSys::TitleType::Application, - FileSys::ContentRecordType::Program); +void GameListWorker::AddInstalledTitlesToGameList(std::shared_ptr<FileSys::RegisteredCache> cache) { + const auto installed_games = cache->ListEntriesFilter(FileSys::TitleType::Application, + FileSys::ContentRecordType::Program); for (const auto& game : installed_games) { - const auto& file = usernand->GetEntryRaw(game); + const auto& file = cache->GetEntryUnparsed(game); std::unique_ptr<Loader::AppLoader> loader = Loader::GetLoader(file); if (!loader) continue; @@ -442,8 +441,7 @@ void GameListWorker::AddInstalledTitlesToGameList() { u64 program_id = 0; loader->ReadProgramId(program_id); - const auto& control = - usernand->GetEntry(game.title_id, FileSys::ContentRecordType::Control); + const auto& control = cache->GetEntry(game.title_id, FileSys::ContentRecordType::Control); if (control != nullptr) GetMetadataFromControlNCA(control, icon, name); emit EntryReady({ @@ -457,11 +455,11 @@ void GameListWorker::AddInstalledTitlesToGameList() { }); } - const auto control_data = usernand->ListEntriesFilter(FileSys::TitleType::Application, - FileSys::ContentRecordType::Control); + const auto control_data = cache->ListEntriesFilter(FileSys::TitleType::Application, + FileSys::ContentRecordType::Control); for (const auto& entry : control_data) { - const auto nca = usernand->GetEntry(entry); + const auto nca = cache->GetEntry(entry); if (nca != nullptr) nca_control_map.insert_or_assign(entry.title_id, nca); } @@ -549,7 +547,9 @@ void GameListWorker::run() { stop_processing = false; watch_list.append(dir_path); FillControlMap(dir_path.toStdString()); - AddInstalledTitlesToGameList(); + AddInstalledTitlesToGameList(Service::FileSystem::GetUserNANDContents()); + AddInstalledTitlesToGameList(Service::FileSystem::GetSystemNANDContents()); + AddInstalledTitlesToGameList(Service::FileSystem::GetSDMCContents()); AddFstEntriesToGameList(dir_path.toStdString(), deep_scan ? 256 : 0); nca_control_map.clear(); emit Finished(watch_list); diff --git a/src/yuzu/game_list_p.h b/src/yuzu/game_list_p.h index c59613769..1d6c85400 100644 --- a/src/yuzu/game_list_p.h +++ b/src/yuzu/game_list_p.h @@ -172,7 +172,7 @@ private: bool deep_scan; std::atomic_bool stop_processing; - void AddInstalledTitlesToGameList(); + void AddInstalledTitlesToGameList(std::shared_ptr<FileSys::RegisteredCache> cache); void FillControlMap(const std::string& dir_path); void AddFstEntriesToGameList(const std::string& dir_path, unsigned int recursion = 0); }; diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 98a41a725..9ca1626d1 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -133,8 +133,7 @@ GMainWindow::GMainWindow() show(); // Necessary to load titles from nand in gamelist. - Service::FileSystem::RegisterBIS(std::make_unique<FileSys::BISFactory>(vfs->OpenDirectory( - FileUtil::GetUserPath(FileUtil::UserPath::NANDDir), FileSys::Mode::ReadWrite))); + Service::FileSystem::CreateFactories(vfs); game_list->PopulateAsync(UISettings::values.gamedir, UISettings::values.gamedir_deepscan); // Show one-time "callout" messages to the user @@ -556,6 +555,15 @@ void GMainWindow::BootGame(const QString& filename) { } status_bar_update_timer.start(2000); + std::string title_name; + const auto res = Core::System::GetInstance().GetGameName(title_name); + if (res != Loader::ResultStatus::Success) + title_name = FileUtil::GetFilename(filename.toStdString()); + + setWindowTitle(QString("yuzu %1| %4 | %2-%3") + .arg(Common::g_build_name, Common::g_scm_branch, Common::g_scm_desc, + QString::fromStdString(title_name))); + render_window->show(); render_window->setFocus(); @@ -587,6 +595,8 @@ void GMainWindow::ShutdownGame() { render_window->hide(); game_list->show(); game_list->setFilterFocus(); + setWindowTitle(QString("yuzu %1| %2-%3") + .arg(Common::g_build_name, Common::g_scm_branch, Common::g_scm_desc)); // Disable status bar updates status_bar_update_timer.stop(); |