summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/set
diff options
context:
space:
mode:
authorChloe Marcec <dmarcecguzman@gmail.com>2022-12-13 23:21:04 +0100
committerLiam <byteslice@airmail.cc>2022-12-14 01:54:17 +0100
commitc5f519e1e4d850ed582b073aff94cbf511f6b931 (patch)
tree5ca4c486ab8b9c790642d03d30828344aa6cd73d /src/core/hle/service/set
parentMerge pull request #9425 from german77/german_unlimited (diff)
downloadyuzu-c5f519e1e4d850ed582b073aff94cbf511f6b931.tar
yuzu-c5f519e1e4d850ed582b073aff94cbf511f6b931.tar.gz
yuzu-c5f519e1e4d850ed582b073aff94cbf511f6b931.tar.bz2
yuzu-c5f519e1e4d850ed582b073aff94cbf511f6b931.tar.lz
yuzu-c5f519e1e4d850ed582b073aff94cbf511f6b931.tar.xz
yuzu-c5f519e1e4d850ed582b073aff94cbf511f6b931.tar.zst
yuzu-c5f519e1e4d850ed582b073aff94cbf511f6b931.zip
Diffstat (limited to 'src/core/hle/service/set')
-rw-r--r--src/core/hle/service/set/set.cpp9
-rw-r--r--src/core/hle/service/set/set.h1
-rw-r--r--src/core/hle/service/set/set_sys.cpp10
-rw-r--r--src/core/hle/service/set/set_sys.h1
4 files changed, 19 insertions, 2 deletions
diff --git a/src/core/hle/service/set/set.cpp b/src/core/hle/service/set/set.cpp
index 4f1a8d6b7..16c5eaf75 100644
--- a/src/core/hle/service/set/set.cpp
+++ b/src/core/hle/service/set/set.cpp
@@ -191,6 +191,13 @@ void SET::GetKeyCodeMap2(Kernel::HLERequestContext& ctx) {
GetKeyCodeMapImpl(ctx);
}
+void SET::GetDeviceNickName(Kernel::HLERequestContext& ctx) {
+ LOG_DEBUG(Service_SET, "called");
+ IPC::ResponseBuilder rb{ctx, 2};
+ rb.Push(ResultSuccess);
+ ctx.WriteBuffer(Settings::values.device_name.GetValue());
+}
+
SET::SET(Core::System& system_) : ServiceFramework{system_, "set"} {
// clang-format off
static const FunctionInfo functions[] = {
@@ -205,7 +212,7 @@ SET::SET(Core::System& system_) : ServiceFramework{system_, "set"} {
{8, &SET::GetQuestFlag, "GetQuestFlag"},
{9, &SET::GetKeyCodeMap2, "GetKeyCodeMap2"},
{10, nullptr, "GetFirmwareVersionForDebug"},
- {11, nullptr, "GetDeviceNickName"},
+ {11, &SET::GetDeviceNickName, "GetDeviceNickName"},
};
// clang-format on
diff --git a/src/core/hle/service/set/set.h b/src/core/hle/service/set/set.h
index 60cad3e6f..375975711 100644
--- a/src/core/hle/service/set/set.h
+++ b/src/core/hle/service/set/set.h
@@ -50,6 +50,7 @@ private:
void GetRegionCode(Kernel::HLERequestContext& ctx);
void GetKeyCodeMap(Kernel::HLERequestContext& ctx);
void GetKeyCodeMap2(Kernel::HLERequestContext& ctx);
+ void GetDeviceNickName(Kernel::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 d7cea6aac..94c20edda 100644
--- a/src/core/hle/service/set/set_sys.cpp
+++ b/src/core/hle/service/set/set_sys.cpp
@@ -3,6 +3,7 @@
#include "common/assert.h"
#include "common/logging/log.h"
+#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"
@@ -176,6 +177,13 @@ void SET_SYS::GetSettingsItemValue(Kernel::HLERequestContext& ctx) {
rb.Push(response);
}
+void SET_SYS::GetDeviceNickName(Kernel::HLERequestContext& ctx) {
+ LOG_DEBUG(Service_SET, "called");
+ IPC::ResponseBuilder rb{ctx, 2};
+ rb.Push(ResultSuccess);
+ ctx.WriteBuffer(::Settings::values.device_name.GetValue());
+}
+
SET_SYS::SET_SYS(Core::System& system_) : ServiceFramework{system_, "set:sys"} {
// clang-format off
static const FunctionInfo functions[] = {
@@ -253,7 +261,7 @@ SET_SYS::SET_SYS(Core::System& system_) : ServiceFramework{system_, "set:sys"} {
{74, nullptr, "SetWirelessLanEnableFlag"},
{75, nullptr, "GetInitialLaunchSettings"},
{76, nullptr, "SetInitialLaunchSettings"},
- {77, nullptr, "GetDeviceNickName"},
+ {77, &SET_SYS::GetDeviceNickName, "GetDeviceNickName"},
{78, nullptr, "SetDeviceNickName"},
{79, nullptr, "GetProductModel"},
{80, nullptr, "GetLdnChannel"},
diff --git a/src/core/hle/service/set/set_sys.h b/src/core/hle/service/set/set_sys.h
index 258ef8c57..464ac3da1 100644
--- a/src/core/hle/service/set/set_sys.h
+++ b/src/core/hle/service/set/set_sys.h
@@ -29,6 +29,7 @@ private:
void GetFirmwareVersion2(Kernel::HLERequestContext& ctx);
void GetColorSetId(Kernel::HLERequestContext& ctx);
void SetColorSetId(Kernel::HLERequestContext& ctx);
+ void GetDeviceNickName(Kernel::HLERequestContext& ctx);
ColorSet color_set = ColorSet::BasicWhite;
};