From c5f519e1e4d850ed582b073aff94cbf511f6b931 Mon Sep 17 00:00:00 2001 From: Chloe Marcec Date: Tue, 13 Dec 2022 17:21:04 -0500 Subject: Set: Allow setting device nickname --- src/core/hle/service/set/set.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/core/hle/service/set/set.cpp') 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 -- cgit v1.2.3