- Gui rewrite.

- Gui: Bug fixes and cleanup.
- Gui: Performance improvement (loading, resizing...etc)
- Added a simple PKG Viewer(Settings-> Utils -> PKG Viewer), added pkg folders will be saved.
- PKG Viewer: Shows game info(name, id, region...etc)
- PKG Viewer: Right click -> Install PKG to install/extract a game. Patch installation is also possible.
- Added option to dump game list  (Settings -> Utils -> Dump Game List), will be dumped to emu folder GameList.txt
This commit is contained in:
raziel1000 2024-03-28 23:43:46 -06:00 committed by Jonah
parent 2d0414c365
commit ca6f582ea8
28 changed files with 1315 additions and 1744 deletions

24
src/qt_gui/game_info.cpp Normal file
View file

@ -0,0 +1,24 @@
#include <future>
#include <thread>
#include "game_info.h"
void GameInfoClass::GetGameInfo() {
QString installDir = m_gui_settings->GetValue(gui::settings_install_dir).toString();
std::filesystem::path parent_folder(installDir.toStdString());
std::vector<std::string> filePaths;
for (const auto& dir : std::filesystem::directory_iterator(parent_folder)) {
if (dir.is_directory()) {
filePaths.push_back(dir.path().string());
}
}
std::vector<std::future<GameInfo>> futures;
for (const auto& filePath : filePaths) {
futures.emplace_back(std::async(std::launch::async, readGameInfo, filePath));
}
for (auto& future : futures) {
m_games.push_back(future.get());
}
std::sort(m_games.begin(), m_games.end(), CompareStrings);
}