summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/set
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2023-03-04 04:51:17 +0100
committerGitHub <noreply@github.com>2023-03-04 04:51:17 +0100
commitce8f4da63834be0179d98a7720dee47d65f3ec06 (patch)
treea9a9303a532d374db9ae8255e5f3f2487e370f84 /src/core/hle/service/set
parentMerge pull request #9855 from liamwhite/kern-16-support (diff)
parentnvnflinger: fix name (diff)
downloadyuzu-ce8f4da63834be0179d98a7720dee47d65f3ec06.tar
yuzu-ce8f4da63834be0179d98a7720dee47d65f3ec06.tar.gz
yuzu-ce8f4da63834be0179d98a7720dee47d65f3ec06.tar.bz2
yuzu-ce8f4da63834be0179d98a7720dee47d65f3ec06.tar.lz
yuzu-ce8f4da63834be0179d98a7720dee47d65f3ec06.tar.xz
yuzu-ce8f4da63834be0179d98a7720dee47d65f3ec06.tar.zst
yuzu-ce8f4da63834be0179d98a7720dee47d65f3ec06.zip
Diffstat (limited to 'src/core/hle/service/set')
-rw-r--r--src/core/hle/service/set/set.cpp30
-rw-r--r--src/core/hle/service/set/set.h22
-rw-r--r--src/core/hle/service/set/set_sys.cpp18
-rw-r--r--src/core/hle/service/set/set_sys.h14
4 files changed, 42 insertions, 42 deletions
diff --git a/src/core/hle/service/set/set.cpp b/src/core/hle/service/set/set.cpp
index 16c5eaf75..88df52331 100644
--- a/src/core/hle/service/set/set.cpp
+++ b/src/core/hle/service/set/set.cpp
@@ -6,7 +6,7 @@
#include <chrono>
#include "common/logging/log.h"
#include "common/settings.h"
-#include "core/hle/ipc_helpers.h"
+#include "core/hle/service/ipc_helpers.h"
#include "core/hle/service/set/set.h"
namespace Service::Set {
@@ -76,13 +76,13 @@ constexpr std::size_t POST_4_0_0_MAX_ENTRIES = 0x40;
constexpr Result ERR_INVALID_LANGUAGE{ErrorModule::Settings, 625};
-void PushResponseLanguageCode(Kernel::HLERequestContext& ctx, std::size_t num_language_codes) {
+void PushResponseLanguageCode(HLERequestContext& ctx, std::size_t num_language_codes) {
IPC::ResponseBuilder rb{ctx, 3};
rb.Push(ResultSuccess);
rb.Push(static_cast<u32>(num_language_codes));
}
-void GetAvailableLanguageCodesImpl(Kernel::HLERequestContext& ctx, std::size_t max_entries) {
+void GetAvailableLanguageCodesImpl(HLERequestContext& ctx, std::size_t max_entries) {
const std::size_t requested_amount = ctx.GetWriteBufferNumElements<LanguageCode>();
const std::size_t max_amount = std::min(requested_amount, max_entries);
const std::size_t copy_amount = std::min(available_language_codes.size(), max_amount);
@@ -92,7 +92,7 @@ void GetAvailableLanguageCodesImpl(Kernel::HLERequestContext& ctx, std::size_t m
PushResponseLanguageCode(ctx, copy_amount);
}
-void GetKeyCodeMapImpl(Kernel::HLERequestContext& ctx) {
+void GetKeyCodeMapImpl(HLERequestContext& ctx) {
const auto language_code = available_language_codes[Settings::values.language_index.GetValue()];
const auto key_code =
std::find_if(language_to_layout.cbegin(), language_to_layout.cend(),
@@ -117,13 +117,13 @@ LanguageCode GetLanguageCodeFromIndex(std::size_t index) {
return available_language_codes.at(index);
}
-void SET::GetAvailableLanguageCodes(Kernel::HLERequestContext& ctx) {
+void SET::GetAvailableLanguageCodes(HLERequestContext& ctx) {
LOG_DEBUG(Service_SET, "called");
GetAvailableLanguageCodesImpl(ctx, PRE_4_0_0_MAX_ENTRIES);
}
-void SET::MakeLanguageCode(Kernel::HLERequestContext& ctx) {
+void SET::MakeLanguageCode(HLERequestContext& ctx) {
IPC::RequestParser rp{ctx};
const auto index = rp.Pop<u32>();
@@ -139,25 +139,25 @@ void SET::MakeLanguageCode(Kernel::HLERequestContext& ctx) {
rb.PushEnum(available_language_codes[index]);
}
-void SET::GetAvailableLanguageCodes2(Kernel::HLERequestContext& ctx) {
+void SET::GetAvailableLanguageCodes2(HLERequestContext& ctx) {
LOG_DEBUG(Service_SET, "called");
GetAvailableLanguageCodesImpl(ctx, POST_4_0_0_MAX_ENTRIES);
}
-void SET::GetAvailableLanguageCodeCount(Kernel::HLERequestContext& ctx) {
+void SET::GetAvailableLanguageCodeCount(HLERequestContext& ctx) {
LOG_DEBUG(Service_SET, "called");
PushResponseLanguageCode(ctx, PRE_4_0_0_MAX_ENTRIES);
}
-void SET::GetAvailableLanguageCodeCount2(Kernel::HLERequestContext& ctx) {
+void SET::GetAvailableLanguageCodeCount2(HLERequestContext& ctx) {
LOG_DEBUG(Service_SET, "called");
PushResponseLanguageCode(ctx, POST_4_0_0_MAX_ENTRIES);
}
-void SET::GetQuestFlag(Kernel::HLERequestContext& ctx) {
+void SET::GetQuestFlag(HLERequestContext& ctx) {
LOG_DEBUG(Service_SET, "called");
IPC::ResponseBuilder rb{ctx, 3};
@@ -165,7 +165,7 @@ void SET::GetQuestFlag(Kernel::HLERequestContext& ctx) {
rb.Push(static_cast<u32>(Settings::values.quest_flag.GetValue()));
}
-void SET::GetLanguageCode(Kernel::HLERequestContext& ctx) {
+void SET::GetLanguageCode(HLERequestContext& ctx) {
LOG_DEBUG(Service_SET, "called {}", Settings::values.language_index.GetValue());
IPC::ResponseBuilder rb{ctx, 4};
@@ -173,7 +173,7 @@ void SET::GetLanguageCode(Kernel::HLERequestContext& ctx) {
rb.PushEnum(available_language_codes[Settings::values.language_index.GetValue()]);
}
-void SET::GetRegionCode(Kernel::HLERequestContext& ctx) {
+void SET::GetRegionCode(HLERequestContext& ctx) {
LOG_DEBUG(Service_SET, "called");
IPC::ResponseBuilder rb{ctx, 3};
@@ -181,17 +181,17 @@ void SET::GetRegionCode(Kernel::HLERequestContext& ctx) {
rb.Push(Settings::values.region_index.GetValue());
}
-void SET::GetKeyCodeMap(Kernel::HLERequestContext& ctx) {
+void SET::GetKeyCodeMap(HLERequestContext& ctx) {
LOG_DEBUG(Service_SET, "Called {}", ctx.Description());
GetKeyCodeMapImpl(ctx);
}
-void SET::GetKeyCodeMap2(Kernel::HLERequestContext& ctx) {
+void SET::GetKeyCodeMap2(HLERequestContext& ctx) {
LOG_DEBUG(Service_SET, "Called {}", ctx.Description());
GetKeyCodeMapImpl(ctx);
}
-void SET::GetDeviceNickName(Kernel::HLERequestContext& ctx) {
+void SET::GetDeviceNickName(HLERequestContext& ctx) {
LOG_DEBUG(Service_SET, "called");
IPC::ResponseBuilder rb{ctx, 2};
rb.Push(ResultSuccess);
diff --git a/src/core/hle/service/set/set.h b/src/core/hle/service/set/set.h
index 375975711..7fd3a7654 100644
--- a/src/core/hle/service/set/set.h
+++ b/src/core/hle/service/set/set.h
@@ -40,17 +40,17 @@ public:
~SET() override;
private:
- void GetLanguageCode(Kernel::HLERequestContext& ctx);
- void GetAvailableLanguageCodes(Kernel::HLERequestContext& ctx);
- void MakeLanguageCode(Kernel::HLERequestContext& ctx);
- void GetAvailableLanguageCodes2(Kernel::HLERequestContext& ctx);
- void GetAvailableLanguageCodeCount(Kernel::HLERequestContext& ctx);
- void GetAvailableLanguageCodeCount2(Kernel::HLERequestContext& ctx);
- void GetQuestFlag(Kernel::HLERequestContext& ctx);
- void GetRegionCode(Kernel::HLERequestContext& ctx);
- void GetKeyCodeMap(Kernel::HLERequestContext& ctx);
- void GetKeyCodeMap2(Kernel::HLERequestContext& ctx);
- void GetDeviceNickName(Kernel::HLERequestContext& ctx);
+ void GetLanguageCode(HLERequestContext& ctx);
+ void GetAvailableLanguageCodes(HLERequestContext& ctx);
+ void MakeLanguageCode(HLERequestContext& ctx);
+ void GetAvailableLanguageCodes2(HLERequestContext& ctx);
+ void GetAvailableLanguageCodeCount(HLERequestContext& ctx);
+ void GetAvailableLanguageCodeCount2(HLERequestContext& ctx);
+ void GetQuestFlag(HLERequestContext& ctx);
+ void GetRegionCode(HLERequestContext& ctx);
+ void GetKeyCodeMap(HLERequestContext& ctx);
+ void GetKeyCodeMap2(HLERequestContext& ctx);
+ void GetDeviceNickName(HLERequestContext& ctx);
};
} // namespace Service::Set
diff --git a/src/core/hle/service/set/set_sys.cpp b/src/core/hle/service/set/set_sys.cpp
index 94c20edda..2e38d1cfc 100644
--- a/src/core/hle/service/set/set_sys.cpp
+++ b/src/core/hle/service/set/set_sys.cpp
@@ -6,8 +6,8 @@
#include "common/settings.h"
#include "core/file_sys/errors.h"
#include "core/file_sys/system_archive/system_version.h"
-#include "core/hle/ipc_helpers.h"
#include "core/hle/service/filesystem/filesystem.h"
+#include "core/hle/service/ipc_helpers.h"
#include "core/hle/service/set/set_sys.h"
namespace Service::Set {
@@ -20,7 +20,7 @@ enum class GetFirmwareVersionType {
Version2,
};
-void GetFirmwareVersionImpl(Kernel::HLERequestContext& ctx, GetFirmwareVersionType type) {
+void GetFirmwareVersionImpl(HLERequestContext& ctx, GetFirmwareVersionType type) {
LOG_WARNING(Service_SET, "called - Using hardcoded firmware version '{}'",
FileSys::SystemArchive::GetLongDisplayVersion());
@@ -73,17 +73,17 @@ void GetFirmwareVersionImpl(Kernel::HLERequestContext& ctx, GetFirmwareVersionTy
}
} // Anonymous namespace
-void SET_SYS::GetFirmwareVersion(Kernel::HLERequestContext& ctx) {
+void SET_SYS::GetFirmwareVersion(HLERequestContext& ctx) {
LOG_DEBUG(Service_SET, "called");
GetFirmwareVersionImpl(ctx, GetFirmwareVersionType::Version1);
}
-void SET_SYS::GetFirmwareVersion2(Kernel::HLERequestContext& ctx) {
+void SET_SYS::GetFirmwareVersion2(HLERequestContext& ctx) {
LOG_DEBUG(Service_SET, "called");
GetFirmwareVersionImpl(ctx, GetFirmwareVersionType::Version2);
}
-void SET_SYS::GetColorSetId(Kernel::HLERequestContext& ctx) {
+void SET_SYS::GetColorSetId(HLERequestContext& ctx) {
LOG_DEBUG(Service_SET, "called");
IPC::ResponseBuilder rb{ctx, 3};
@@ -92,7 +92,7 @@ void SET_SYS::GetColorSetId(Kernel::HLERequestContext& ctx) {
rb.PushEnum(color_set);
}
-void SET_SYS::SetColorSetId(Kernel::HLERequestContext& ctx) {
+void SET_SYS::SetColorSetId(HLERequestContext& ctx) {
LOG_DEBUG(Service_SET, "called");
IPC::RequestParser rp{ctx};
@@ -126,7 +126,7 @@ static Settings GetSettings() {
return ret;
}
-void SET_SYS::GetSettingsItemValueSize(Kernel::HLERequestContext& ctx) {
+void SET_SYS::GetSettingsItemValueSize(HLERequestContext& ctx) {
LOG_DEBUG(Service_SET, "called");
// The category of the setting. This corresponds to the top-level keys of
@@ -151,7 +151,7 @@ void SET_SYS::GetSettingsItemValueSize(Kernel::HLERequestContext& ctx) {
rb.Push(response_size);
}
-void SET_SYS::GetSettingsItemValue(Kernel::HLERequestContext& ctx) {
+void SET_SYS::GetSettingsItemValue(HLERequestContext& ctx) {
LOG_DEBUG(Service_SET, "called");
// The category of the setting. This corresponds to the top-level keys of
@@ -177,7 +177,7 @@ void SET_SYS::GetSettingsItemValue(Kernel::HLERequestContext& ctx) {
rb.Push(response);
}
-void SET_SYS::GetDeviceNickName(Kernel::HLERequestContext& ctx) {
+void SET_SYS::GetDeviceNickName(HLERequestContext& ctx) {
LOG_DEBUG(Service_SET, "called");
IPC::ResponseBuilder rb{ctx, 2};
rb.Push(ResultSuccess);
diff --git a/src/core/hle/service/set/set_sys.h b/src/core/hle/service/set/set_sys.h
index 464ac3da1..1efbcc97a 100644
--- a/src/core/hle/service/set/set_sys.h
+++ b/src/core/hle/service/set/set_sys.h
@@ -23,13 +23,13 @@ private:
BasicBlack = 1,
};
- void GetSettingsItemValueSize(Kernel::HLERequestContext& ctx);
- void GetSettingsItemValue(Kernel::HLERequestContext& ctx);
- void GetFirmwareVersion(Kernel::HLERequestContext& ctx);
- void GetFirmwareVersion2(Kernel::HLERequestContext& ctx);
- void GetColorSetId(Kernel::HLERequestContext& ctx);
- void SetColorSetId(Kernel::HLERequestContext& ctx);
- void GetDeviceNickName(Kernel::HLERequestContext& ctx);
+ void GetSettingsItemValueSize(HLERequestContext& ctx);
+ void GetSettingsItemValue(HLERequestContext& ctx);
+ void GetFirmwareVersion(HLERequestContext& ctx);
+ void GetFirmwareVersion2(HLERequestContext& ctx);
+ void GetColorSetId(HLERequestContext& ctx);
+ void SetColorSetId(HLERequestContext& ctx);
+ void GetDeviceNickName(HLERequestContext& ctx);
ColorSet color_set = ColorSet::BasicWhite;
};