diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/nifm/nifm.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/core/hle/service/nifm/nifm.cpp b/src/core/hle/service/nifm/nifm.cpp index ed4f5f539..b6075f256 100644 --- a/src/core/hle/service/nifm/nifm.cpp +++ b/src/core/hle/service/nifm/nifm.cpp | |||
| @@ -65,7 +65,7 @@ private: | |||
| 65 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); | 65 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); |
| 66 | IPC::ResponseBuilder rb{ctx, 3}; | 66 | IPC::ResponseBuilder rb{ctx, 3}; |
| 67 | rb.Push(RESULT_SUCCESS); | 67 | rb.Push(RESULT_SUCCESS); |
| 68 | rb.Push<u32>(0); | 68 | rb.Push<u32>(3); |
| 69 | } | 69 | } |
| 70 | 70 | ||
| 71 | void GetResult(Kernel::HLERequestContext& ctx) { | 71 | void GetResult(Kernel::HLERequestContext& ctx) { |
| @@ -114,10 +114,11 @@ public: | |||
| 114 | 114 | ||
| 115 | private: | 115 | private: |
| 116 | void GetClientId(Kernel::HLERequestContext& ctx) { | 116 | void GetClientId(Kernel::HLERequestContext& ctx) { |
| 117 | static constexpr u32 client_id = 1; | ||
| 117 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); | 118 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); |
| 118 | IPC::ResponseBuilder rb{ctx, 4}; | 119 | IPC::ResponseBuilder rb{ctx, 4}; |
| 119 | rb.Push(RESULT_SUCCESS); | 120 | rb.Push(RESULT_SUCCESS); |
| 120 | rb.Push<u64>(0); | 121 | rb.Push<u64>(client_id); // Client ID needs to be non zero otherwise it's considered invalid |
| 121 | } | 122 | } |
| 122 | void CreateScanRequest(Kernel::HLERequestContext& ctx) { | 123 | void CreateScanRequest(Kernel::HLERequestContext& ctx) { |
| 123 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 124 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -141,10 +142,16 @@ private: | |||
| 141 | rb.Push(RESULT_SUCCESS); | 142 | rb.Push(RESULT_SUCCESS); |
| 142 | } | 143 | } |
| 143 | void CreateTemporaryNetworkProfile(Kernel::HLERequestContext& ctx) { | 144 | void CreateTemporaryNetworkProfile(Kernel::HLERequestContext& ctx) { |
| 144 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 145 | ASSERT_MSG(ctx.GetReadBufferSize() == 0x17c, "NetworkProfileData is not the correct size"); |
| 146 | u128 uuid{}; | ||
| 147 | auto buffer = ctx.ReadBuffer(); | ||
| 148 | std::memcpy(&uuid, buffer.data() + 8, sizeof(u128)); | ||
| 149 | |||
| 150 | IPC::ResponseBuilder rb{ctx, 6, 0, 1}; | ||
| 145 | 151 | ||
| 146 | rb.Push(RESULT_SUCCESS); | 152 | rb.Push(RESULT_SUCCESS); |
| 147 | rb.PushIpcInterface<INetworkProfile>(); | 153 | rb.PushIpcInterface<INetworkProfile>(); |
| 154 | rb.PushRaw<u128>(uuid); | ||
| 148 | 155 | ||
| 149 | LOG_DEBUG(Service_NIFM, "called"); | 156 | LOG_DEBUG(Service_NIFM, "called"); |
| 150 | } | 157 | } |