mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-11-14 11:03:19 +00:00
Merge pull request #1541 from LFsWang/path
Fix Qt string encode problem on Windows
This commit is contained in:
commit
e815e4a6aa
|
@ -16,7 +16,7 @@ Config::Config() {
|
|||
// TODO: Don't hardcode the path; let the frontend decide where to put the config files.
|
||||
qt_config_loc = FileUtil::GetUserPath(D_CONFIG_IDX) + "qt-config.ini";
|
||||
FileUtil::CreateFullPath(qt_config_loc);
|
||||
qt_config = new QSettings(QString::fromStdString(qt_config_loc), QSettings::IniFormat);
|
||||
qt_config = new QSettings(QString::fromLocal8Bit(qt_config_loc.c_str()), QSettings::IniFormat);
|
||||
|
||||
Reload();
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ void GameList::ValidateEntry(const QModelIndex& item)
|
|||
|
||||
if (file_path.isEmpty())
|
||||
return;
|
||||
std::string std_file_path = file_path.toStdString();
|
||||
std::string std_file_path = file_path.toLocal8Bit();
|
||||
if (!FileUtil::Exists(std_file_path) || FileUtil::IsDirectory(std_file_path))
|
||||
return;
|
||||
emit GameChosen(file_path);
|
||||
|
@ -148,7 +148,7 @@ void GameListWorker::AddFstEntriesToGameList(const std::string& dir_path, bool d
|
|||
|
||||
emit EntryReady({
|
||||
new GameListItem(QString::fromStdString(Loader::GetFileTypeString(filetype))),
|
||||
new GameListItemPath(QString::fromStdString(physical_name)),
|
||||
new GameListItemPath(QString::fromLocal8Bit(physical_name.c_str())),
|
||||
new GameListItemSize(FileUtil::GetSize(physical_name)),
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue