diff options
| author | 2021-07-08 14:46:31 -0400 | |
|---|---|---|
| committer | 2021-07-08 14:46:31 -0400 | |
| commit | 5edc96f4a47bff64cfd97f0c91e42b56ab58b2d7 (patch) | |
| tree | bd1e570a3f0594557e28516b0974aa07f67ad616 /src/core/hle | |
| parent | Out of bound blit (#6531) (diff) | |
| parent | general: Code formatting improvements (diff) | |
| download | yuzu-5edc96f4a47bff64cfd97f0c91e42b56ab58b2d7.tar.gz yuzu-5edc96f4a47bff64cfd97f0c91e42b56ab58b2d7.tar.xz yuzu-5edc96f4a47bff64cfd97f0c91e42b56ab58b2d7.zip | |
Merge pull request #6539 from lat9nq/default-setting
general: Move most settings' defaults and labels into their definition
Diffstat (limited to 'src/core/hle')
| -rw-r--r-- | src/core/hle/service/acc/profile_manager.cpp | 3 | ||||
| -rw-r--r-- | src/core/hle/service/am/am.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/service/bcat/module.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/service/nifm/nifm.cpp | 6 | ||||
| -rw-r--r-- | src/core/hle/service/set/set.cpp | 2 |
5 files changed, 8 insertions, 7 deletions
diff --git a/src/core/hle/service/acc/profile_manager.cpp b/src/core/hle/service/acc/profile_manager.cpp index f72d5d561..24a1c9157 100644 --- a/src/core/hle/service/acc/profile_manager.cpp +++ b/src/core/hle/service/acc/profile_manager.cpp | |||
| @@ -48,7 +48,8 @@ ProfileManager::ProfileManager() { | |||
| 48 | CreateNewUser(UUID::Generate(), "yuzu"); | 48 | CreateNewUser(UUID::Generate(), "yuzu"); |
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | auto current = std::clamp<int>(Settings::values.current_user, 0, MAX_USERS - 1); | 51 | auto current = |
| 52 | std::clamp<int>(static_cast<s32>(Settings::values.current_user), 0, MAX_USERS - 1); | ||
| 52 | 53 | ||
| 53 | // If user index don't exist. Load the first user and change the active user | 54 | // If user index don't exist. Load the first user and change the active user |
| 54 | if (!UserExistsIndex(current)) { | 55 | if (!UserExistsIndex(current)) { |
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index b578153d3..23ebc1138 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp | |||
| @@ -1443,7 +1443,7 @@ void IApplicationFunctions::PopLaunchParameter(Kernel::HLERequestContext& ctx) { | |||
| 1443 | params.is_account_selected = 1; | 1443 | params.is_account_selected = 1; |
| 1444 | 1444 | ||
| 1445 | Account::ProfileManager profile_manager{}; | 1445 | Account::ProfileManager profile_manager{}; |
| 1446 | const auto uuid = profile_manager.GetUser(Settings::values.current_user); | 1446 | const auto uuid = profile_manager.GetUser(static_cast<s32>(Settings::values.current_user)); |
| 1447 | ASSERT(uuid); | 1447 | ASSERT(uuid); |
| 1448 | params.current_user = uuid->uuid; | 1448 | params.current_user = uuid->uuid; |
| 1449 | 1449 | ||
diff --git a/src/core/hle/service/bcat/module.cpp b/src/core/hle/service/bcat/module.cpp index 44e4d0509..f85444da8 100644 --- a/src/core/hle/service/bcat/module.cpp +++ b/src/core/hle/service/bcat/module.cpp | |||
| @@ -579,7 +579,7 @@ void Module::Interface::CreateDeliveryCacheStorageServiceWithApplicationId( | |||
| 579 | std::unique_ptr<Backend> CreateBackendFromSettings([[maybe_unused]] Core::System& system, | 579 | std::unique_ptr<Backend> CreateBackendFromSettings([[maybe_unused]] Core::System& system, |
| 580 | DirectoryGetter getter) { | 580 | DirectoryGetter getter) { |
| 581 | #ifdef YUZU_ENABLE_BOXCAT | 581 | #ifdef YUZU_ENABLE_BOXCAT |
| 582 | if (Settings::values.bcat_backend == "boxcat") { | 582 | if (Settings::values.bcat_backend.GetValue() == "boxcat") { |
| 583 | return std::make_unique<Boxcat>(system.GetAppletManager(), std::move(getter)); | 583 | return std::make_unique<Boxcat>(system.GetAppletManager(), std::move(getter)); |
| 584 | } | 584 | } |
| 585 | #endif | 585 | #endif |
diff --git a/src/core/hle/service/nifm/nifm.cpp b/src/core/hle/service/nifm/nifm.cpp index f03b2666a..e742db48f 100644 --- a/src/core/hle/service/nifm/nifm.cpp +++ b/src/core/hle/service/nifm/nifm.cpp | |||
| @@ -179,7 +179,7 @@ private: | |||
| 179 | IPC::ResponseBuilder rb{ctx, 3}; | 179 | IPC::ResponseBuilder rb{ctx, 3}; |
| 180 | rb.Push(ResultSuccess); | 180 | rb.Push(ResultSuccess); |
| 181 | 181 | ||
| 182 | if (Settings::values.bcat_backend == "none") { | 182 | if (Settings::values.bcat_backend.GetValue() == "none") { |
| 183 | rb.PushEnum(RequestState::NotSubmitted); | 183 | rb.PushEnum(RequestState::NotSubmitted); |
| 184 | } else { | 184 | } else { |
| 185 | rb.PushEnum(RequestState::Connected); | 185 | rb.PushEnum(RequestState::Connected); |
| @@ -384,7 +384,7 @@ private: | |||
| 384 | 384 | ||
| 385 | IPC::ResponseBuilder rb{ctx, 3}; | 385 | IPC::ResponseBuilder rb{ctx, 3}; |
| 386 | rb.Push(ResultSuccess); | 386 | rb.Push(ResultSuccess); |
| 387 | if (Settings::values.bcat_backend == "none") { | 387 | if (Settings::values.bcat_backend.GetValue() == "none") { |
| 388 | rb.Push<u8>(0); | 388 | rb.Push<u8>(0); |
| 389 | } else { | 389 | } else { |
| 390 | rb.Push<u8>(1); | 390 | rb.Push<u8>(1); |
| @@ -395,7 +395,7 @@ private: | |||
| 395 | 395 | ||
| 396 | IPC::ResponseBuilder rb{ctx, 3}; | 396 | IPC::ResponseBuilder rb{ctx, 3}; |
| 397 | rb.Push(ResultSuccess); | 397 | rb.Push(ResultSuccess); |
| 398 | if (Settings::values.bcat_backend == "none") { | 398 | if (Settings::values.bcat_backend.GetValue() == "none") { |
| 399 | rb.Push<u8>(0); | 399 | rb.Push<u8>(0); |
| 400 | } else { | 400 | } else { |
| 401 | rb.Push<u8>(1); | 401 | rb.Push<u8>(1); |
diff --git a/src/core/hle/service/set/set.cpp b/src/core/hle/service/set/set.cpp index ece2a74c6..522a604a5 100644 --- a/src/core/hle/service/set/set.cpp +++ b/src/core/hle/service/set/set.cpp | |||
| @@ -160,7 +160,7 @@ void SET::GetQuestFlag(Kernel::HLERequestContext& ctx) { | |||
| 160 | 160 | ||
| 161 | IPC::ResponseBuilder rb{ctx, 3}; | 161 | IPC::ResponseBuilder rb{ctx, 3}; |
| 162 | rb.Push(ResultSuccess); | 162 | rb.Push(ResultSuccess); |
| 163 | rb.Push(static_cast<u32>(Settings::values.quest_flag)); | 163 | rb.Push(static_cast<u32>(Settings::values.quest_flag.GetValue())); |
| 164 | } | 164 | } |
| 165 | 165 | ||
| 166 | void SET::GetLanguageCode(Kernel::HLERequestContext& ctx) { | 166 | void SET::GetLanguageCode(Kernel::HLERequestContext& ctx) { |