summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/nwm/nwm_uds.cpp
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2017-03-26 14:02:45 +0200
committerSubv <subv2112@gmail.com>2017-03-26 15:17:57 +0200
commitf8f3b27eb397e348a80137aee075c19ac37e1f48 (patch)
treef4bdfa488c643cb344ffcf4c8f44b15e985fb938 /src/core/hle/service/nwm/nwm_uds.cpp
parentServices/UDS: Signal the connection event when closing down the network. (diff)
downloadyuzu-f8f3b27eb397e348a80137aee075c19ac37e1f48.tar
yuzu-f8f3b27eb397e348a80137aee075c19ac37e1f48.tar.gz
yuzu-f8f3b27eb397e348a80137aee075c19ac37e1f48.tar.bz2
yuzu-f8f3b27eb397e348a80137aee075c19ac37e1f48.tar.lz
yuzu-f8f3b27eb397e348a80137aee075c19ac37e1f48.tar.xz
yuzu-f8f3b27eb397e348a80137aee075c19ac37e1f48.tar.zst
yuzu-f8f3b27eb397e348a80137aee075c19ac37e1f48.zip
Diffstat (limited to 'src/core/hle/service/nwm/nwm_uds.cpp')
-rw-r--r--src/core/hle/service/nwm/nwm_uds.cpp8
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;
// Mapping of bind node ids to their respective events.
static std::unordered_map<u32, Kernel::SharedPtr<Kernel::Event>> bind_node_events;
-// The wifi network channel that the network is currently on.
+// The WiFi network channel that the network is currently on.
// Since we're not actually interacting with physical radio waves, this is just a dummy value.
static u8 network_channel = DefaultNetworkChannel;
@@ -320,10 +320,10 @@ static void GetChannel(Interface* self) {
IPC::RequestParser rp(Kernel::GetCommandBuffer(), 0x1A, 0, 0);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
- u8 channel = network_channel;
+ bool is_connected = connection_status.status !=
+ static_cast<u32>(NetworkStatus::NotConnected);
- if (connection_status.status == static_cast<u32>(NetworkStatus::NotConnected))
- channel = 0;
+ u8 channel = is_connected ? network_channel : 0;
rb.Push(RESULT_SUCCESS);
rb.PushRaw(channel);