diff options
author | Lioncash <mathew1800@gmail.com> | 2019-05-29 06:23:46 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2019-05-29 06:29:09 +0200 |
commit | 139301c5a12b769d5a13dec55589ed7fb5dc7bdf (patch) | |
tree | 7988b954c2cb870185c29a9b247bb8058b87d217 /src | |
parent | Merge pull request #2516 from lioncash/label (diff) | |
download | yuzu-139301c5a12b769d5a13dec55589ed7fb5dc7bdf.tar yuzu-139301c5a12b769d5a13dec55589ed7fb5dc7bdf.tar.gz yuzu-139301c5a12b769d5a13dec55589ed7fb5dc7bdf.tar.bz2 yuzu-139301c5a12b769d5a13dec55589ed7fb5dc7bdf.tar.lz yuzu-139301c5a12b769d5a13dec55589ed7fb5dc7bdf.tar.xz yuzu-139301c5a12b769d5a13dec55589ed7fb5dc7bdf.tar.zst yuzu-139301c5a12b769d5a13dec55589ed7fb5dc7bdf.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/yuzu/applets/profile_select.cpp | 2 | ||||
-rw-r--r-- | src/yuzu/applets/profile_select.h | 4 | ||||
-rw-r--r-- | src/yuzu/main.cpp | 11 |
3 files changed, 9 insertions, 8 deletions
diff --git a/src/yuzu/applets/profile_select.cpp b/src/yuzu/applets/profile_select.cpp index 7fbc9deeb..6696cb532 100644 --- a/src/yuzu/applets/profile_select.cpp +++ b/src/yuzu/applets/profile_select.cpp @@ -136,7 +136,7 @@ bool QtProfileSelectionDialog::GetStatus() const { return ok; } -u32 QtProfileSelectionDialog::GetIndex() const { +int QtProfileSelectionDialog::GetIndex() const { return user_index; } diff --git a/src/yuzu/applets/profile_select.h b/src/yuzu/applets/profile_select.h index 1c2922e54..ff02df93b 100644 --- a/src/yuzu/applets/profile_select.h +++ b/src/yuzu/applets/profile_select.h @@ -30,11 +30,11 @@ public: void reject() override; bool GetStatus() const; - u32 GetIndex() const; + int GetIndex() const; private: bool ok = false; - u32 user_index = 0; + int user_index = 0; void SelectUser(const QModelIndex& index); diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index cef2cc1ae..1e24b9028 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -246,7 +246,7 @@ void GMainWindow::ProfileSelectorSelectProfile() { } Service::Account::ProfileManager manager; - const auto uuid = manager.GetUser(dialog.GetIndex()); + const auto uuid = manager.GetUser(static_cast<std::size_t>(dialog.GetIndex())); if (!uuid.has_value()) { emit ProfileSelectorFinishedSelection(std::nullopt); return; @@ -904,7 +904,7 @@ void GMainWindow::SelectAndSetCurrentUser() { dialog.exec(); if (dialog.GetStatus()) { - Settings::values.current_user = static_cast<s32>(dialog.GetIndex()); + Settings::values.current_user = dialog.GetIndex(); } } @@ -1055,7 +1055,7 @@ void GMainWindow::OnGameListOpenFolder(u64 program_id, GameListOpenTarget target const std::string nand_dir = FileUtil::GetUserPath(FileUtil::UserPath::NANDDir); ASSERT(program_id != 0); - const auto select_profile = [this]() -> s32 { + const auto select_profile = [this] { QtProfileSelectionDialog dialog(this); dialog.setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint); @@ -1070,11 +1070,12 @@ void GMainWindow::OnGameListOpenFolder(u64 program_id, GameListOpenTarget target }; const auto index = select_profile(); - if (index == -1) + if (index == -1) { return; + } Service::Account::ProfileManager manager; - const auto user_id = manager.GetUser(index); + const auto user_id = manager.GetUser(static_cast<std::size_t>(index)); ASSERT(user_id); path = nand_dir + FileSys::SaveDataFactory::GetFullPath(FileSys::SaveDataSpaceId::NandUser, FileSys::SaveDataType::SaveData, |