summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar german2021-01-28 21:02:25 -0600
committerGravatar german2021-01-28 21:02:25 -0600
commit8ba0cac71c081f2c0ec7b16956a56f5489915df4 (patch)
tree1f5cd98d8e5c30252c09a54c8317873161dd592d /src
parentMerge pull request #5786 from ReinUsesLisp/glsl-cbuf (diff)
downloadyuzu-8ba0cac71c081f2c0ec7b16956a56f5489915df4.tar.gz
yuzu-8ba0cac71c081f2c0ec7b16956a56f5489915df4.tar.xz
yuzu-8ba0cac71c081f2c0ec7b16956a56f5489915df4.zip
Fix user changing to 0 if valid
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/acc/profile_manager.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/core/hle/service/acc/profile_manager.cpp b/src/core/hle/service/acc/profile_manager.cpp
index d9865d56f..50b2c58e2 100644
--- a/src/core/hle/service/acc/profile_manager.cpp
+++ b/src/core/hle/service/acc/profile_manager.cpp
@@ -41,12 +41,18 @@ constexpr char ACC_SAVE_AVATORS_BASE_PATH[] = "/system/save/8000000000000010/su/
41ProfileManager::ProfileManager() { 41ProfileManager::ProfileManager() {
42 ParseUserSaveFile(); 42 ParseUserSaveFile();
43 43
44 if (user_count == 0) 44 // Create an user if none are present
45 if (user_count == 0) {
45 CreateNewUser(UUID::Generate(), "yuzu"); 46 CreateNewUser(UUID::Generate(), "yuzu");
47 }
46 48
47 auto current = std::clamp<int>(Settings::values.current_user, 0, MAX_USERS - 1); 49 auto current = std::clamp<int>(Settings::values.current_user, 0, MAX_USERS - 1);
48 if (UserExistsIndex(current)) 50
51 // If user index don't exist. Load the first user and change the active user
52 if (!UserExistsIndex(current)) {
49 current = 0; 53 current = 0;
54 Settings::values.current_user = 0;
55 }
50 56
51 OpenUser(*GetUser(current)); 57 OpenUser(*GetUser(current));
52} 58}