From dc8479928c5aee4c6ad6fe4f59006fb604cee701 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sun, 18 Sep 2016 09:38:01 +0900 Subject: Sources: Run clang-format on everything. --- src/core/hle/service/nwm_uds.cpp | 82 ++++++++++++++++++++-------------------- 1 file changed, 42 insertions(+), 40 deletions(-) (limited to 'src/core/hle/service/nwm_uds.cpp') diff --git a/src/core/hle/service/nwm_uds.cpp b/src/core/hle/service/nwm_uds.cpp index ae4640409..ed417fa9a 100644 --- a/src/core/hle/service/nwm_uds.cpp +++ b/src/core/hle/service/nwm_uds.cpp @@ -54,22 +54,23 @@ static void Shutdown(Service::Interface* self) { static void RecvBeaconBroadcastData(Service::Interface* self) { u32* cmd_buff = Kernel::GetCommandBuffer(); u32 out_buffer_size = cmd_buff[1]; - u32 unk1 = cmd_buff[2]; - u32 unk2 = cmd_buff[3]; - u32 mac_address = cmd_buff[4]; + u32 unk1 = cmd_buff[2]; + u32 unk2 = cmd_buff[3]; + u32 mac_address = cmd_buff[4]; - u32 unk3 = cmd_buff[6]; + u32 unk3 = cmd_buff[6]; - u32 wlan_comm_id = cmd_buff[15]; - u32 ctr_gen_id = cmd_buff[16]; - u32 value = cmd_buff[17]; - u32 input_handle = cmd_buff[18]; + u32 wlan_comm_id = cmd_buff[15]; + u32 ctr_gen_id = cmd_buff[16]; + u32 value = cmd_buff[17]; + u32 input_handle = cmd_buff[18]; u32 new_buffer_size = cmd_buff[19]; - u32 out_buffer_ptr = cmd_buff[20]; + u32 out_buffer_ptr = cmd_buff[20]; cmd_buff[1] = RESULT_SUCCESS.raw; - LOG_WARNING(Service_NWM, "(STUBBED) called out_buffer_size=0x%08X, unk1=0x%08X, unk2=0x%08X," + LOG_WARNING(Service_NWM, + "(STUBBED) called out_buffer_size=0x%08X, unk1=0x%08X, unk2=0x%08X," "mac_address=0x%08X, unk3=0x%08X, wlan_comm_id=0x%08X, ctr_gen_id=0x%08X," "value=%u, input_handle=0x%08X, new_buffer_size=0x%08X, out_buffer_ptr=0x%08X", out_buffer_size, unk1, unk2, mac_address, unk3, wlan_comm_id, ctr_gen_id, value, @@ -92,46 +93,47 @@ static void RecvBeaconBroadcastData(Service::Interface* self) { */ static void Initialize(Service::Interface* self) { u32* cmd_buff = Kernel::GetCommandBuffer(); - u32 unk1 = cmd_buff[1]; - u32 unk2 = cmd_buff[12]; - u32 value = cmd_buff[13]; + u32 unk1 = cmd_buff[1]; + u32 unk2 = cmd_buff[12]; + u32 value = cmd_buff[13]; u32 handle = cmd_buff[14]; cmd_buff[1] = RESULT_SUCCESS.raw; cmd_buff[2] = 0; - cmd_buff[3] = Kernel::g_handle_table.Create(handle_event).MoveFrom(); //TODO(purpasmart): Verify if this is a event handle + cmd_buff[3] = Kernel::g_handle_table.Create(handle_event) + .MoveFrom(); // TODO(purpasmart): Verify if this is a event handle LOG_WARNING(Service_NWM, "(STUBBED) called unk1=0x%08X, unk2=0x%08X, value=%u, handle=0x%08X", unk1, unk2, value, handle); } const Interface::FunctionInfo FunctionTable[] = { - {0x00020000, nullptr, "Scrap"}, - {0x00030000, Shutdown, "Shutdown"}, - {0x00040402, nullptr, "CreateNetwork"}, - {0x00050040, nullptr, "EjectClient"}, - {0x00060000, nullptr, "EjectSpectator"}, - {0x00070080, nullptr, "UpdateNetworkAttribute"}, - {0x00080000, nullptr, "DestroyNetwork"}, - {0x000A0000, nullptr, "DisconnectNetwork"}, - {0x000B0000, nullptr, "GetConnectionStatus"}, - {0x000D0040, nullptr, "GetNodeInformation"}, - {0x000F0404, RecvBeaconBroadcastData, "RecvBeaconBroadcastData"}, - {0x00100042, nullptr, "SetBeaconAdditionalData"}, - {0x00110040, nullptr, "GetApplicationData"}, - {0x00120100, nullptr, "Bind"}, - {0x00130040, nullptr, "Unbind"}, - {0x001400C0, nullptr, "RecvBroadcastDataFrame"}, - {0x00150080, nullptr, "SetMaxSendDelay"}, - {0x00170182, nullptr, "SendTo"}, - {0x001A0000, nullptr, "GetChannel"}, - {0x001B0302, Initialize, "Initialize"}, - {0x001D0044, nullptr, "BeginHostingNetwork"}, - {0x001E0084, nullptr, "ConnectToNetwork"}, - {0x001F0006, nullptr, "DecryptBeaconData"}, - {0x00200040, nullptr, "Flush"}, - {0x00210080, nullptr, "SetProbeResponseParam"}, - {0x00220402, nullptr, "ScanOnConnection"}, + {0x00020000, nullptr, "Scrap"}, + {0x00030000, Shutdown, "Shutdown"}, + {0x00040402, nullptr, "CreateNetwork"}, + {0x00050040, nullptr, "EjectClient"}, + {0x00060000, nullptr, "EjectSpectator"}, + {0x00070080, nullptr, "UpdateNetworkAttribute"}, + {0x00080000, nullptr, "DestroyNetwork"}, + {0x000A0000, nullptr, "DisconnectNetwork"}, + {0x000B0000, nullptr, "GetConnectionStatus"}, + {0x000D0040, nullptr, "GetNodeInformation"}, + {0x000F0404, RecvBeaconBroadcastData, "RecvBeaconBroadcastData"}, + {0x00100042, nullptr, "SetBeaconAdditionalData"}, + {0x00110040, nullptr, "GetApplicationData"}, + {0x00120100, nullptr, "Bind"}, + {0x00130040, nullptr, "Unbind"}, + {0x001400C0, nullptr, "RecvBroadcastDataFrame"}, + {0x00150080, nullptr, "SetMaxSendDelay"}, + {0x00170182, nullptr, "SendTo"}, + {0x001A0000, nullptr, "GetChannel"}, + {0x001B0302, Initialize, "Initialize"}, + {0x001D0044, nullptr, "BeginHostingNetwork"}, + {0x001E0084, nullptr, "ConnectToNetwork"}, + {0x001F0006, nullptr, "DecryptBeaconData"}, + {0x00200040, nullptr, "Flush"}, + {0x00210080, nullptr, "SetProbeResponseParam"}, + {0x00220402, nullptr, "ScanOnConnection"}, }; //////////////////////////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3 From ebdae19fd226104baec712b9da9939ff82ef3c3a Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Wed, 21 Sep 2016 00:21:23 +0900 Subject: Remove empty newlines in #include blocks. This makes clang-format useful on those. Also add a bunch of forgotten transitive includes, which otherwise prevented compilation. --- src/core/hle/service/nwm_uds.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/core/hle/service/nwm_uds.cpp') diff --git a/src/core/hle/service/nwm_uds.cpp b/src/core/hle/service/nwm_uds.cpp index ed417fa9a..3b608dcbb 100644 --- a/src/core/hle/service/nwm_uds.cpp +++ b/src/core/hle/service/nwm_uds.cpp @@ -2,11 +2,10 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#include "core/hle/service/nwm_uds.h" #include "common/common_types.h" #include "common/logging/log.h" - #include "core/hle/kernel/event.h" -#include "core/hle/service/nwm_uds.h" //////////////////////////////////////////////////////////////////////////////////////////////////// // Namespace NWM_UDS -- cgit v1.2.3 From 84fbbe26297652d994d203bde543ec252c2d801a Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Tue, 20 Sep 2016 23:52:38 -0700 Subject: Use negative priorities to avoid special-casing the self-include --- src/core/hle/service/nwm_uds.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/hle/service/nwm_uds.cpp') diff --git a/src/core/hle/service/nwm_uds.cpp b/src/core/hle/service/nwm_uds.cpp index 3b608dcbb..27e829209 100644 --- a/src/core/hle/service/nwm_uds.cpp +++ b/src/core/hle/service/nwm_uds.cpp @@ -2,10 +2,10 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. -#include "core/hle/service/nwm_uds.h" #include "common/common_types.h" #include "common/logging/log.h" #include "core/hle/kernel/event.h" +#include "core/hle/service/nwm_uds.h" //////////////////////////////////////////////////////////////////////////////////////////////////// // Namespace NWM_UDS -- cgit v1.2.3