diff options
| author | liamwhite <liamwhite@users.noreply.github.com> | 2023-08-29 09:27:32 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-29 09:27:32 -0400 |
| commit | 1f04a3dd5520694e9160038a129c9154de79eeb0 (patch) | |
| tree | 2f8f69375f93e5cb429adad8b3e5ec2012085f8d /src/core/hle/service/sockets/nsd.cpp | |
| parent | d360abadba9b8d3c1748f1e55ea3421cd1be4a53 (diff) | |
| parent | 6c68b07a673e307eb44a9442fa93c5e6d79f3b52 (diff) | |
Merge pull request #11409 from liamwhite/splatoon-nsd-v2
sfdnsres: ensure lp1 is not resolved
Diffstat (limited to 'src/core/hle/service/sockets/nsd.cpp')
| -rw-r--r-- | src/core/hle/service/sockets/nsd.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/core/hle/service/sockets/nsd.cpp b/src/core/hle/service/sockets/nsd.cpp index bac21752a..491b76d48 100644 --- a/src/core/hle/service/sockets/nsd.cpp +++ b/src/core/hle/service/sockets/nsd.cpp @@ -19,6 +19,12 @@ enum class ServerEnvironmentType : u8 { Dp, }; +// This is nn::nsd::EnvironmentIdentifier +struct EnvironmentIdentifier { + std::array<u8, 8> identifier; +}; +static_assert(sizeof(EnvironmentIdentifier) == 0x8); + NSD::NSD(Core::System& system_, const char* name) : ServiceFramework{system_, name} { // clang-format off static const FunctionInfo functions[] = { @@ -101,8 +107,9 @@ void NSD::ResolveEx(HLERequestContext& ctx) { } void NSD::GetEnvironmentIdentifier(HLERequestContext& ctx) { - const std::string environment_identifier = "lp1"; - ctx.WriteBuffer(environment_identifier); + constexpr EnvironmentIdentifier lp1 = { + .identifier = {'l', 'p', '1', '\0', '\0', '\0', '\0', '\0'}}; + ctx.WriteBuffer(lp1); IPC::ResponseBuilder rb{ctx, 2}; rb.Push(ResultSuccess); |
