]> Chaos Git - corbenik/ctrulib.git/commitdiff
Added udsEjectSpectator().
authoryellows8 <yellows8@users.noreply.github.com>
Wed, 6 Apr 2016 20:32:25 +0000 (16:32 -0400)
committeryellows8 <yellows8@users.noreply.github.com>
Wed, 6 Apr 2016 20:32:25 +0000 (16:32 -0400)
libctru/include/3ds/services/uds.h
libctru/source/services/uds.c

index 28e24956ac08bf4361b7006d32501d1afd08efb6..371de37a99911839edbf3547eda4cde20648b1f4 100644 (file)
@@ -287,6 +287,11 @@ Result udsDisconnectNetwork(void);
  */
 Result udsEjectClient(u16 NetworkNodeID);
 
+/**
+ * @brief This can be used by the host to force-disconnect the spectator.
+ */
+Result udsEjectSpectator();
+
 /**
  * @brief This can be used by the host to update the network attributes. If bitmask 0x4 is clear in the input bitmask, this clears that bit in the value before actually writing the value into state.
  * @param bitmask Bitmask to clear/set in the attributes. See the UDSNETATTR enum values.
index cd343976ae8aedb733f0719a9e5c312271e0fee2..3d760cad1161bba7de6627b396b6c7c97487b67d 100644 (file)
@@ -325,6 +325,18 @@ Result udsEjectClient(u16 NetworkNodeID)
        return cmdbuf[1];
 }
 
+Result udsEjectSpectator()
+{
+       u32* cmdbuf=getThreadCommandBuffer();
+
+       cmdbuf[0]=IPC_MakeHeader(0x6,0,0); // 0x60000
+
+       Result ret=0;
+       if(R_FAILED(ret=svcSendSyncRequest(__uds_servhandle)))return ret;
+
+       return cmdbuf[1];
+}
+
 Result udsUpdateNetworkAttribute(u16 bitmask, bool flag)
 {
        u32* cmdbuf=getThreadCommandBuffer();