mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-04-20 03:24:49 +00:00
Fix support for unicode paths for game install directories (#2699)
Some checks are pending
Build and Release / reuse (push) Waiting to run
Build and Release / clang-format (push) Waiting to run
Build and Release / get-info (push) Waiting to run
Build and Release / windows-sdl (push) Blocked by required conditions
Build and Release / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / linux-sdl-gcc (push) Blocked by required conditions
Build and Release / linux-qt-gcc (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
Some checks are pending
Build and Release / reuse (push) Waiting to run
Build and Release / clang-format (push) Waiting to run
Build and Release / get-info (push) Waiting to run
Build and Release / windows-sdl (push) Blocked by required conditions
Build and Release / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / linux-sdl-gcc (push) Blocked by required conditions
Build and Release / linux-qt-gcc (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
* Slightly changed how allInstallDirsDisabled is determined * Show a dialog only if no game directories are set * Changed a comment * Fixed formatting * Support for unicode paths for game install directories * Fixed game picture path conversion
This commit is contained in:
parent
751a23af0f
commit
78c8bca2bb
3 changed files with 4 additions and 3 deletions
|
@ -850,7 +850,7 @@ void load(const std::filesystem::path& path) {
|
|||
m_window_size_H = toml::find_or<int>(gui, "mw_height", 0);
|
||||
|
||||
const auto install_dir_array =
|
||||
toml::find_or<std::vector<std::string>>(gui, "installDirs", {});
|
||||
toml::find_or<std::vector<std::u8string>>(gui, "installDirs", {});
|
||||
|
||||
try {
|
||||
install_dirs_enabled = toml::find<std::vector<bool>>(gui, "installDirsEnabled");
|
||||
|
|
|
@ -185,7 +185,8 @@ void GameListFrame::SetListBackgroundImage(QTableWidgetItem* item) {
|
|||
|
||||
// Recompute if opacity changed or we switched to a different game
|
||||
if (opacity != m_last_opacity || game.pic_path != m_current_game_path) {
|
||||
QImage original_image(QString::fromStdString(game.pic_path.string()));
|
||||
auto image_path = game.pic_path.u8string();
|
||||
QImage original_image(QString::fromStdString({image_path.begin(), image_path.end()}));
|
||||
if (!original_image.isNull()) {
|
||||
backgroundImage = m_game_list_utils.ChangeImageOpacity(
|
||||
original_image, original_image.rect(), opacity / 100.0f);
|
||||
|
|
|
@ -817,7 +817,7 @@ void SettingsDialog::ResetInstallFolders() {
|
|||
if (data.contains("GUI")) {
|
||||
const toml::value& gui = data.at("GUI");
|
||||
const auto install_dir_array =
|
||||
toml::find_or<std::vector<std::string>>(gui, "installDirs", {});
|
||||
toml::find_or<std::vector<std::u8string>>(gui, "installDirs", {});
|
||||
|
||||
std::vector<bool> install_dirs_enabled;
|
||||
try {
|
||||
|
|
Loading…
Add table
Reference in a new issue