mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-13 13:15:59 +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
|
@ -75,7 +75,8 @@ public:
|
|||
}
|
||||
|
||||
if (selected == &openFolder) {
|
||||
QString folderPath = QString::fromStdString(m_games[itemID].path);
|
||||
QString folderPath;
|
||||
Common::FS::PathToQString(folderPath, m_games[itemID].path);
|
||||
QDesktopServices::openUrl(QUrl::fromLocalFile(folderPath));
|
||||
}
|
||||
|
||||
|
@ -158,7 +159,9 @@ public:
|
|||
QString gameSerial = QString::fromStdString(m_games[itemID].serial);
|
||||
QString gameVersion = QString::fromStdString(m_games[itemID].version);
|
||||
QString gameSize = QString::fromStdString(m_games[itemID].size);
|
||||
QPixmap gameImage(QString::fromStdString(m_games[itemID].icon_path));
|
||||
QString iconPath;
|
||||
Common::FS::PathToQString(iconPath, m_games[itemID].icon_path);
|
||||
QPixmap gameImage(iconPath);
|
||||
CheatsPatches* cheatsPatches =
|
||||
new CheatsPatches(gameName, gameSerial, gameVersion, gameSize, gameImage);
|
||||
cheatsPatches->show();
|
||||
|
@ -167,8 +170,9 @@ public:
|
|||
}
|
||||
|
||||
if (selected == &openTrophyViewer) {
|
||||
QString trophyPath = QString::fromStdString(m_games[itemID].serial);
|
||||
QString gameTrpPath = QString::fromStdString(m_games[itemID].path);
|
||||
QString trophyPath, gameTrpPath;
|
||||
Common::FS::PathToQString(trophyPath, m_games[itemID].serial);
|
||||
Common::FS::PathToQString(gameTrpPath, m_games[itemID].path);
|
||||
TrophyViewer* trophyViewer = new TrophyViewer(trophyPath, gameTrpPath);
|
||||
trophyViewer->show();
|
||||
connect(widget->parent(), &QWidget::destroyed, trophyViewer,
|
||||
|
@ -176,11 +180,13 @@ public:
|
|||
}
|
||||
|
||||
if (selected == &createShortcut) {
|
||||
QString targetPath = QString::fromStdString(m_games[itemID].path);
|
||||
QString targetPath;
|
||||
Common::FS::PathToQString(targetPath, m_games[itemID].path);
|
||||
QString ebootPath = targetPath + "/eboot.bin";
|
||||
|
||||
// Get the full path to the icon
|
||||
QString iconPath = QString::fromStdString(m_games[itemID].icon_path);
|
||||
QString iconPath;
|
||||
Common::FS::PathToQString(iconPath, m_games[itemID].icon_path);
|
||||
QFileInfo iconFileInfo(iconPath);
|
||||
QString icoPath = iconFileInfo.absolutePath() + "/" + iconFileInfo.baseName() + ".ico";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue