summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/core.cpp6
-rw-r--r--src/core/frontend/applets/profile_select.cpp2
-rw-r--r--src/core/hle/service/acc/profile_manager.cpp3
-rw-r--r--src/core/hle/service/am/am.cpp2
-rw-r--r--src/core/hle/service/bcat/module.cpp2
-rw-r--r--src/core/hle/service/nifm/nifm.cpp6
-rw-r--r--src/core/hle/service/set/set.cpp2
-rw-r--r--src/core/loader/nro.cpp4
-rw-r--r--src/core/loader/nso.cpp4
-rw-r--r--src/core/reporter.cpp2
-rw-r--r--src/core/telemetry_session.cpp10
11 files changed, 23 insertions, 20 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp
index e6f1aa0e7..891f1cb49 100644
--- a/src/core/core.cpp
+++ b/src/core/core.cpp
@@ -263,9 +263,9 @@ struct System::Impl {
263 if (Settings::values.gamecard_inserted) { 263 if (Settings::values.gamecard_inserted) {
264 if (Settings::values.gamecard_current_game) { 264 if (Settings::values.gamecard_current_game) {
265 fs_controller.SetGameCard(GetGameFileFromPath(virtual_filesystem, filepath)); 265 fs_controller.SetGameCard(GetGameFileFromPath(virtual_filesystem, filepath));
266 } else if (!Settings::values.gamecard_path.empty()) { 266 } else if (!Settings::values.gamecard_path.GetValue().empty()) {
267 fs_controller.SetGameCard( 267 const auto gamecard_path = Settings::values.gamecard_path.GetValue();
268 GetGameFileFromPath(virtual_filesystem, Settings::values.gamecard_path)); 268 fs_controller.SetGameCard(GetGameFileFromPath(virtual_filesystem, gamecard_path));
269 } 269 }
270 } 270 }
271 271
diff --git a/src/core/frontend/applets/profile_select.cpp b/src/core/frontend/applets/profile_select.cpp
index 8d960d1ca..4c58c310f 100644
--- a/src/core/frontend/applets/profile_select.cpp
+++ b/src/core/frontend/applets/profile_select.cpp
@@ -13,7 +13,7 @@ ProfileSelectApplet::~ProfileSelectApplet() = default;
13void DefaultProfileSelectApplet::SelectProfile( 13void DefaultProfileSelectApplet::SelectProfile(
14 std::function<void(std::optional<Common::UUID>)> callback) const { 14 std::function<void(std::optional<Common::UUID>)> callback) const {
15 Service::Account::ProfileManager manager; 15 Service::Account::ProfileManager manager;
16 callback(manager.GetUser(Settings::values.current_user).value_or(Common::UUID{})); 16 callback(manager.GetUser(Settings::values.current_user.GetValue()).value_or(Common::UUID{}));
17 LOG_INFO(Service_ACC, "called, selecting current user instead of prompting..."); 17 LOG_INFO(Service_ACC, "called, selecting current user instead of prompting...");
18} 18}
19 19
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(
579std::unique_ptr<Backend> CreateBackendFromSettings([[maybe_unused]] Core::System& system, 579std::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
166void SET::GetLanguageCode(Kernel::HLERequestContext& ctx) { 166void SET::GetLanguageCode(Kernel::HLERequestContext& ctx) {
diff --git a/src/core/loader/nro.cpp b/src/core/loader/nro.cpp
index 618555202..951ea966e 100644
--- a/src/core/loader/nro.cpp
+++ b/src/core/loader/nro.cpp
@@ -155,8 +155,8 @@ static bool LoadNroImpl(Kernel::KProcess& process, const std::vector<u8>& data)
155 codeset.segments[i].size = PageAlignSize(nro_header.segments[i].size); 155 codeset.segments[i].size = PageAlignSize(nro_header.segments[i].size);
156 } 156 }
157 157
158 if (!Settings::values.program_args.empty()) { 158 if (!Settings::values.program_args.GetValue().empty()) {
159 const auto arg_data = Settings::values.program_args; 159 const auto arg_data = Settings::values.program_args.GetValue();
160 codeset.DataSegment().size += NSO_ARGUMENT_DATA_ALLOCATION_SIZE; 160 codeset.DataSegment().size += NSO_ARGUMENT_DATA_ALLOCATION_SIZE;
161 NSOArgumentHeader args_header{ 161 NSOArgumentHeader args_header{
162 NSO_ARGUMENT_DATA_ALLOCATION_SIZE, static_cast<u32_le>(arg_data.size()), {}}; 162 NSO_ARGUMENT_DATA_ALLOCATION_SIZE, static_cast<u32_le>(arg_data.size()), {}};
diff --git a/src/core/loader/nso.cpp b/src/core/loader/nso.cpp
index 0f5cfda68..4a2224c02 100644
--- a/src/core/loader/nso.cpp
+++ b/src/core/loader/nso.cpp
@@ -104,8 +104,8 @@ std::optional<VAddr> AppLoader_NSO::LoadModule(Kernel::KProcess& process, Core::
104 codeset.segments[i].size = nso_header.segments[i].size; 104 codeset.segments[i].size = nso_header.segments[i].size;
105 } 105 }
106 106
107 if (should_pass_arguments && !Settings::values.program_args.empty()) { 107 if (should_pass_arguments && !Settings::values.program_args.GetValue().empty()) {
108 const auto arg_data{Settings::values.program_args}; 108 const auto arg_data{Settings::values.program_args.GetValue()};
109 109
110 codeset.DataSegment().size += NSO_ARGUMENT_DATA_ALLOCATION_SIZE; 110 codeset.DataSegment().size += NSO_ARGUMENT_DATA_ALLOCATION_SIZE;
111 NSOArgumentHeader args_header{ 111 NSOArgumentHeader args_header{
diff --git a/src/core/reporter.cpp b/src/core/reporter.cpp
index 82b0f535a..cfaf50105 100644
--- a/src/core/reporter.cpp
+++ b/src/core/reporter.cpp
@@ -397,7 +397,7 @@ void Reporter::ClearFSAccessLog() const {
397} 397}
398 398
399bool Reporter::IsReportingEnabled() const { 399bool Reporter::IsReportingEnabled() const {
400 return Settings::values.reporting_services; 400 return Settings::values.reporting_services.GetValue();
401} 401}
402 402
403} // namespace Core 403} // namespace Core
diff --git a/src/core/telemetry_session.cpp b/src/core/telemetry_session.cpp
index d4c23ced2..066cb23e4 100644
--- a/src/core/telemetry_session.cpp
+++ b/src/core/telemetry_session.cpp
@@ -135,7 +135,7 @@ u64 RegenerateTelemetryId() {
135 135
136bool VerifyLogin(const std::string& username, const std::string& token) { 136bool VerifyLogin(const std::string& username, const std::string& token) {
137#ifdef ENABLE_WEB_SERVICE 137#ifdef ENABLE_WEB_SERVICE
138 return WebService::VerifyLogin(Settings::values.web_api_url, username, token); 138 return WebService::VerifyLogin(Settings::values.web_api_url.GetValue(), username, token);
139#else 139#else
140 return false; 140 return false;
141#endif 141#endif
@@ -152,7 +152,8 @@ TelemetrySession::~TelemetrySession() {
152 152
153#ifdef ENABLE_WEB_SERVICE 153#ifdef ENABLE_WEB_SERVICE
154 auto backend = std::make_unique<WebService::TelemetryJson>( 154 auto backend = std::make_unique<WebService::TelemetryJson>(
155 Settings::values.web_api_url, Settings::values.yuzu_username, Settings::values.yuzu_token); 155 Settings::values.web_api_url.GetValue(), Settings::values.yuzu_username.GetValue(),
156 Settings::values.yuzu_token.GetValue());
156#else 157#else
157 auto backend = std::make_unique<Telemetry::NullVisitor>(); 158 auto backend = std::make_unique<Telemetry::NullVisitor>();
158#endif 159#endif
@@ -212,7 +213,7 @@ void TelemetrySession::AddInitialInfo(Loader::AppLoader& app_loader,
212 213
213 // Log user configuration information 214 // Log user configuration information
214 constexpr auto field_type = Telemetry::FieldType::UserConfig; 215 constexpr auto field_type = Telemetry::FieldType::UserConfig;
215 AddField(field_type, "Audio_SinkId", Settings::values.sink_id); 216 AddField(field_type, "Audio_SinkId", Settings::values.sink_id.GetValue());
216 AddField(field_type, "Audio_EnableAudioStretching", 217 AddField(field_type, "Audio_EnableAudioStretching",
217 Settings::values.enable_audio_stretching.GetValue()); 218 Settings::values.enable_audio_stretching.GetValue());
218 AddField(field_type, "Core_UseMultiCore", Settings::values.use_multi_core.GetValue()); 219 AddField(field_type, "Core_UseMultiCore", Settings::values.use_multi_core.GetValue());
@@ -242,7 +243,8 @@ void TelemetrySession::AddInitialInfo(Loader::AppLoader& app_loader,
242bool TelemetrySession::SubmitTestcase() { 243bool TelemetrySession::SubmitTestcase() {
243#ifdef ENABLE_WEB_SERVICE 244#ifdef ENABLE_WEB_SERVICE
244 auto backend = std::make_unique<WebService::TelemetryJson>( 245 auto backend = std::make_unique<WebService::TelemetryJson>(
245 Settings::values.web_api_url, Settings::values.yuzu_username, Settings::values.yuzu_token); 246 Settings::values.web_api_url.GetValue(), Settings::values.yuzu_username.GetValue(),
247 Settings::values.yuzu_token.GetValue());
246 field_collection.Accept(*backend); 248 field_collection.Accept(*backend);
247 return backend->SubmitTestcase(); 249 return backend->SubmitTestcase();
248#else 250#else