summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2023-07-22 06:24:36 +0200
committerGitHub <noreply@github.com>2023-07-22 06:24:36 +0200
commit482c957f5d25779869b07f0ee1afece22f9123a2 (patch)
treebaa1ecb3db323f36c46446a0ace52ceb2474b9c4 /src
parentMerge pull request #11129 from liamwhite/dynamic_cast (diff)
parentnsd: add GetApplicationServerEnvironmentType (diff)
downloadyuzu-482c957f5d25779869b07f0ee1afece22f9123a2.tar
yuzu-482c957f5d25779869b07f0ee1afece22f9123a2.tar.gz
yuzu-482c957f5d25779869b07f0ee1afece22f9123a2.tar.bz2
yuzu-482c957f5d25779869b07f0ee1afece22f9123a2.tar.lz
yuzu-482c957f5d25779869b07f0ee1afece22f9123a2.tar.xz
yuzu-482c957f5d25779869b07f0ee1afece22f9123a2.tar.zst
yuzu-482c957f5d25779869b07f0ee1afece22f9123a2.zip
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/sockets/nsd.cpp17
-rw-r--r--src/core/hle/service/sockets/nsd.h1
2 files changed, 17 insertions, 1 deletions
diff --git a/src/core/hle/service/sockets/nsd.cpp b/src/core/hle/service/sockets/nsd.cpp
index 0dfb0f166..36c6cd05c 100644
--- a/src/core/hle/service/sockets/nsd.cpp
+++ b/src/core/hle/service/sockets/nsd.cpp
@@ -10,6 +10,15 @@ namespace Service::Sockets {
constexpr Result ResultOverflow{ErrorModule::NSD, 6};
+// This is nn::oe::ServerEnvironmentType
+enum class ServerEnvironmentType : u8 {
+ Dd,
+ Lp,
+ Sd,
+ Sp,
+ Dp,
+};
+
NSD::NSD(Core::System& system_, const char* name) : ServiceFramework{system_, name} {
// clang-format off
static const FunctionInfo functions[] = {
@@ -36,7 +45,7 @@ NSD::NSD(Core::System& system_, const char* name) : ServiceFramework{system_, na
{62, nullptr, "DeleteSaveDataOfFsForTest"},
{63, nullptr, "IsChangeEnvironmentIdentifierDisabled"},
{64, nullptr, "SetWithoutDomainExchangeFqdns"},
- {100, nullptr, "GetApplicationServerEnvironmentType"},
+ {100, &NSD::GetApplicationServerEnvironmentType, "GetApplicationServerEnvironmentType"},
{101, nullptr, "SetApplicationServerEnvironmentType"},
{102, nullptr, "DeleteApplicationServerEnvironmentType"},
};
@@ -94,6 +103,12 @@ void NSD::ResolveEx(HLERequestContext& ctx) {
rb.Push(ResultSuccess);
}
+void NSD::GetApplicationServerEnvironmentType(HLERequestContext& ctx) {
+ IPC::ResponseBuilder rb{ctx, 3};
+ rb.Push(ResultSuccess);
+ rb.Push(static_cast<u32>(ServerEnvironmentType::Lp));
+}
+
NSD::~NSD() = default;
} // namespace Service::Sockets
diff --git a/src/core/hle/service/sockets/nsd.h b/src/core/hle/service/sockets/nsd.h
index a7379a8a9..57760a0c8 100644
--- a/src/core/hle/service/sockets/nsd.h
+++ b/src/core/hle/service/sockets/nsd.h
@@ -19,6 +19,7 @@ public:
private:
void Resolve(HLERequestContext& ctx);
void ResolveEx(HLERequestContext& ctx);
+ void GetApplicationServerEnvironmentType(HLERequestContext& ctx);
};
} // namespace Service::Sockets