diff options
| author | 2016-04-04 21:55:08 -0400 | |
|---|---|---|
| committer | 2016-04-04 21:55:08 -0400 | |
| commit | b39340849631f565cf5c32bfdbab9fdc0bd4db9d (patch) | |
| tree | 8112be75d7f65ced275221040231a0ca1ae4f415 /src/citra_qt | |
| parent | Merge pull request #1640 from lioncash/cpp14 (diff) | |
| parent | remove debug code (diff) | |
| download | yuzu-b39340849631f565cf5c32bfdbab9fdc0bd4db9d.tar.gz yuzu-b39340849631f565cf5c32bfdbab9fdc0bd4db9d.tar.xz yuzu-b39340849631f565cf5c32bfdbab9fdc0bd4db9d.zip | |
Merge pull request #1620 from LFsWang/path
Fix filename&path encode problem on Windows
Diffstat (limited to 'src/citra_qt')
| -rw-r--r-- | src/citra_qt/config.cpp | 2 | ||||
| -rw-r--r-- | src/citra_qt/game_list.cpp | 4 | ||||
| -rw-r--r-- | src/citra_qt/main.cpp | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/citra_qt/config.cpp b/src/citra_qt/config.cpp index d1a19ade9..8e247ff5c 100644 --- a/src/citra_qt/config.cpp +++ b/src/citra_qt/config.cpp | |||
| @@ -16,7 +16,7 @@ Config::Config() { | |||
| 16 | // TODO: Don't hardcode the path; let the frontend decide where to put the config files. | 16 | // TODO: Don't hardcode the path; let the frontend decide where to put the config files. |
| 17 | qt_config_loc = FileUtil::GetUserPath(D_CONFIG_IDX) + "qt-config.ini"; | 17 | qt_config_loc = FileUtil::GetUserPath(D_CONFIG_IDX) + "qt-config.ini"; |
| 18 | FileUtil::CreateFullPath(qt_config_loc); | 18 | FileUtil::CreateFullPath(qt_config_loc); |
| 19 | qt_config = new QSettings(QString::fromLocal8Bit(qt_config_loc.c_str()), QSettings::IniFormat); | 19 | qt_config = new QSettings(QString::fromStdString(qt_config_loc), QSettings::IniFormat); |
| 20 | 20 | ||
| 21 | Reload(); | 21 | Reload(); |
| 22 | } | 22 | } |
diff --git a/src/citra_qt/game_list.cpp b/src/citra_qt/game_list.cpp index a0b216b0a..ffcab1f03 100644 --- a/src/citra_qt/game_list.cpp +++ b/src/citra_qt/game_list.cpp | |||
| @@ -66,7 +66,7 @@ void GameList::ValidateEntry(const QModelIndex& item) | |||
| 66 | 66 | ||
| 67 | if (file_path.isEmpty()) | 67 | if (file_path.isEmpty()) |
| 68 | return; | 68 | return; |
| 69 | std::string std_file_path(file_path.toLocal8Bit()); | 69 | std::string std_file_path(file_path.toStdString()); |
| 70 | if (!FileUtil::Exists(std_file_path) || FileUtil::IsDirectory(std_file_path)) | 70 | if (!FileUtil::Exists(std_file_path) || FileUtil::IsDirectory(std_file_path)) |
| 71 | return; | 71 | return; |
| 72 | emit GameChosen(file_path); | 72 | emit GameChosen(file_path); |
| @@ -148,7 +148,7 @@ void GameListWorker::AddFstEntriesToGameList(const std::string& dir_path, bool d | |||
| 148 | 148 | ||
| 149 | emit EntryReady({ | 149 | emit EntryReady({ |
| 150 | new GameListItem(QString::fromStdString(Loader::GetFileTypeString(filetype))), | 150 | new GameListItem(QString::fromStdString(Loader::GetFileTypeString(filetype))), |
| 151 | new GameListItemPath(QString::fromLocal8Bit(physical_name.c_str())), | 151 | new GameListItemPath(QString::fromStdString(physical_name)), |
| 152 | new GameListItemSize(FileUtil::GetSize(physical_name)), | 152 | new GameListItemSize(FileUtil::GetSize(physical_name)), |
| 153 | }); | 153 | }); |
| 154 | } | 154 | } |
diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp index 32cceaf7e..f621f5d66 100644 --- a/src/citra_qt/main.cpp +++ b/src/citra_qt/main.cpp | |||
| @@ -417,7 +417,7 @@ void GMainWindow::UpdateRecentFiles() { | |||
| 417 | } | 417 | } |
| 418 | 418 | ||
| 419 | void GMainWindow::OnGameListLoadFile(QString game_path) { | 419 | void GMainWindow::OnGameListLoadFile(QString game_path) { |
| 420 | BootGame(game_path.toLocal8Bit().data()); | 420 | BootGame(game_path.toStdString()); |
| 421 | } | 421 | } |
| 422 | 422 | ||
| 423 | void GMainWindow::OnMenuLoadFile() { | 423 | void GMainWindow::OnMenuLoadFile() { |
| @@ -428,7 +428,7 @@ void GMainWindow::OnMenuLoadFile() { | |||
| 428 | if (!filename.isEmpty()) { | 428 | if (!filename.isEmpty()) { |
| 429 | settings.setValue("romsPath", QFileInfo(filename).path()); | 429 | settings.setValue("romsPath", QFileInfo(filename).path()); |
| 430 | 430 | ||
| 431 | BootGame(filename.toLocal8Bit().data()); | 431 | BootGame(filename.toStdString()); |
| 432 | } | 432 | } |
| 433 | } | 433 | } |
| 434 | 434 | ||
| @@ -440,7 +440,7 @@ void GMainWindow::OnMenuLoadSymbolMap() { | |||
| 440 | if (!filename.isEmpty()) { | 440 | if (!filename.isEmpty()) { |
| 441 | settings.setValue("symbolsPath", QFileInfo(filename).path()); | 441 | settings.setValue("symbolsPath", QFileInfo(filename).path()); |
| 442 | 442 | ||
| 443 | LoadSymbolMap(filename.toLocal8Bit().data()); | 443 | LoadSymbolMap(filename.toStdString()); |
| 444 | } | 444 | } |
| 445 | } | 445 | } |
| 446 | 446 | ||
| @@ -461,7 +461,7 @@ void GMainWindow::OnMenuRecentFile() { | |||
| 461 | QString filename = action->data().toString(); | 461 | QString filename = action->data().toString(); |
| 462 | QFileInfo file_info(filename); | 462 | QFileInfo file_info(filename); |
| 463 | if (file_info.exists()) { | 463 | if (file_info.exists()) { |
| 464 | BootGame(filename.toLocal8Bit().data()); | 464 | BootGame(filename.toStdString()); |
| 465 | } else { | 465 | } else { |
| 466 | // Display an error message and remove the file from the list. | 466 | // Display an error message and remove the file from the list. |
| 467 | QMessageBox::information(this, tr("File not found"), tr("File \"%1\" not found").arg(filename)); | 467 | QMessageBox::information(this, tr("File not found"), tr("File \"%1\" not found").arg(filename)); |