mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-02 16:53:17 +00:00
Use fs::path::native whenever possible, avoid unnecessary fs->string conversions in GUI code (#1064)
* Use filesystem::path whenever possible, remove fs::path::string * My hatred for Windows grows with every passing day * More Qt stuff * custom u8string formatter for fmt library * Use u8string for imgui * Fix toml errors hopefully * Fix not printing issue * Oh and on SDL * I hate Windows even more today * fix toml reading utf-8 paths also small fix for fmt::UTF * Formatting * Fix QT path to run games * Fix path logging in save data * Fix trophy path handling * Update game_list_frame.cpp fixed snd0path * Update main_window.cpp fix snd0path * Update main_window.cpp * paths finally fixed * git info in WIP versions title --------- Co-authored-by: Vinicius Rangel <me@viniciusrangel.dev> Co-authored-by: georgemoralis <giorgosmrls@gmail.com>
This commit is contained in:
parent
54e2179337
commit
6295d6c416
30 changed files with 271 additions and 125 deletions
|
@ -22,17 +22,19 @@ public:
|
|||
return a.name < b.name;
|
||||
}
|
||||
|
||||
static GameInfo readGameInfo(const std::string& filePath) {
|
||||
static GameInfo readGameInfo(const std::filesystem::path& filePath) {
|
||||
GameInfo game;
|
||||
game.path = filePath;
|
||||
|
||||
PSF psf;
|
||||
if (psf.Open(std::filesystem::path(game.path) / "sce_sys" / "param.sfo")) {
|
||||
game.icon_path = game.path + "/sce_sys/icon0.png";
|
||||
QString iconpath = QString::fromStdString(game.icon_path);
|
||||
if (psf.Open(game.path / "sce_sys" / "param.sfo")) {
|
||||
game.icon_path = game.path / "sce_sys" / "icon0.png";
|
||||
QString iconpath;
|
||||
Common::FS::PathToQString(iconpath, game.icon_path);
|
||||
game.icon = QImage(iconpath);
|
||||
game.pic_path = game.path + "/sce_sys/pic1.png";
|
||||
game.snd0_path = game.path + "/sce_sys/snd0.at9";
|
||||
game.pic_path = game.path / "sce_sys" / "pic1.png";
|
||||
game.snd0_path = game.path / "sce_sys" / "snd0.at9";
|
||||
|
||||
if (const auto title = psf.GetString("TITLE"); title.has_value()) {
|
||||
game.name = *title;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue