diff options
| -rw-r--r-- | src/core/hle/service/nwm/nwm_uds.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/hle/service/nwm/nwm_uds.cpp b/src/core/hle/service/nwm/nwm_uds.cpp index e1bf49393..f56925fee 100644 --- a/src/core/hle/service/nwm/nwm_uds.cpp +++ b/src/core/hle/service/nwm/nwm_uds.cpp | |||
| @@ -35,7 +35,7 @@ static NodeInfo node_info; | |||
| 35 | // Mapping of bind node ids to their respective events. | 35 | // Mapping of bind node ids to their respective events. |
| 36 | static std::unordered_map<u32, Kernel::SharedPtr<Kernel::Event>> bind_node_events; | 36 | static std::unordered_map<u32, Kernel::SharedPtr<Kernel::Event>> bind_node_events; |
| 37 | 37 | ||
| 38 | // The wifi network channel that the network is currently on. | 38 | // The WiFi network channel that the network is currently on. |
| 39 | // Since we're not actually interacting with physical radio waves, this is just a dummy value. | 39 | // Since we're not actually interacting with physical radio waves, this is just a dummy value. |
| 40 | static u8 network_channel = DefaultNetworkChannel; | 40 | static u8 network_channel = DefaultNetworkChannel; |
| 41 | 41 | ||
| @@ -320,10 +320,10 @@ static void GetChannel(Interface* self) { | |||
| 320 | IPC::RequestParser rp(Kernel::GetCommandBuffer(), 0x1A, 0, 0); | 320 | IPC::RequestParser rp(Kernel::GetCommandBuffer(), 0x1A, 0, 0); |
| 321 | IPC::RequestBuilder rb = rp.MakeBuilder(2, 0); | 321 | IPC::RequestBuilder rb = rp.MakeBuilder(2, 0); |
| 322 | 322 | ||
| 323 | u8 channel = network_channel; | 323 | bool is_connected = connection_status.status != |
| 324 | static_cast<u32>(NetworkStatus::NotConnected); | ||
| 324 | 325 | ||
| 325 | if (connection_status.status == static_cast<u32>(NetworkStatus::NotConnected)) | 326 | u8 channel = is_connected ? network_channel : 0; |
| 326 | channel = 0; | ||
| 327 | 327 | ||
| 328 | rb.Push(RESULT_SUCCESS); | 328 | rb.Push(RESULT_SUCCESS); |
| 329 | rb.PushRaw(channel); | 329 | rb.PushRaw(channel); |