2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

change file path encoding to Local8bit()

to support non-latin characters
This commit is contained in:
wwylele 2015-10-20 20:58:23 +03:00
parent 7411aed5c7
commit 6e57389172
2 changed files with 5 additions and 5 deletions

View file

@ -80,7 +80,7 @@ void GameList::DonePopulating()
void GameList::PopulateAsync(const QString& dir_path, bool deep_scan) void GameList::PopulateAsync(const QString& dir_path, bool deep_scan)
{ {
if (!FileUtil::Exists(dir_path.toStdString()) || !FileUtil::IsDirectory(dir_path.toStdString())) { if (!FileUtil::Exists(dir_path.toStdString()) || !FileUtil::IsDirectory(dir_path.toStdString())) {
LOG_ERROR(Frontend, "Could not find game list folder at %s", dir_path.toLatin1().data()); LOG_ERROR(Frontend, "Could not find game list folder at %s", dir_path.toLocal8Bit().data());
return; return;
} }

View file

@ -355,7 +355,7 @@ void GMainWindow::UpdateRecentFiles() {
} }
void GMainWindow::OnGameListLoadFile(QString game_path) { void GMainWindow::OnGameListLoadFile(QString game_path) {
BootGame(game_path.toLatin1().data()); BootGame(game_path.toLocal8Bit().data());
} }
void GMainWindow::OnMenuLoadFile() { void GMainWindow::OnMenuLoadFile() {
@ -367,7 +367,7 @@ void GMainWindow::OnMenuLoadFile() {
settings.setValue("romsPath", QFileInfo(filename).path()); settings.setValue("romsPath", QFileInfo(filename).path());
StoreRecentFile(filename); StoreRecentFile(filename);
BootGame(filename.toLatin1().data()); BootGame(filename.toLocal8Bit().data());
} }
} }
@ -379,7 +379,7 @@ void GMainWindow::OnMenuLoadSymbolMap() {
if (!filename.isEmpty()) { if (!filename.isEmpty()) {
settings.setValue("symbolsPath", QFileInfo(filename).path()); settings.setValue("symbolsPath", QFileInfo(filename).path());
LoadSymbolMap(filename.toLatin1().data()); LoadSymbolMap(filename.toLocal8Bit().data());
} }
} }
@ -400,7 +400,7 @@ void GMainWindow::OnMenuRecentFile() {
QString filename = action->data().toString(); QString filename = action->data().toString();
QFileInfo file_info(filename); QFileInfo file_info(filename);
if (file_info.exists()) { if (file_info.exists()) {
BootGame(filename.toLatin1().data()); BootGame(filename.toLocal8Bit().data());
StoreRecentFile(filename); // Put the filename on top of the list StoreRecentFile(filename); // Put the filename on top of the list
} else { } else {
// Display an error message and remove the file from the list. // Display an error message and remove the file from the list.