コード例 #1
0
 internal WirelessDevice(WirelessManager parent, RDD info)
 {
     this.parent = parent;
     this.type   = info.DeviceType;
     deviceName  = info.pszDeviceName;
     displayName = info.pszDisplayName;
     this.state  = info.dwState;
 }
コード例 #2
0
        internal void SetAll(WirelessState state)
        {
            IntPtr devList;
            int    result = GetWirelessDevices(out devList, 0);
            IntPtr pThis  = devList;

            while (pThis != IntPtr.Zero)
            {
                RDD r = (RDD)Marshal.PtrToStructure(pThis, typeof(RDD));

                ChangeRadioState(pThis, state, SAVEACTION.RADIODEVICES_PRE_SAVE);

                pThis = r.pNext;
            }
            result = FreeDeviceList(devList);
        }
コード例 #3
0
        internal int SetWirelessState(WirelessDeviceType type, WirelessState state)
        {
            int    stateResult = -1;
            IntPtr devList;
            int    result = GetWirelessDevices(out devList, 0);
            IntPtr pThis  = devList;

            while (pThis != IntPtr.Zero)
            {
                RDD r = (RDD)Marshal.PtrToStructure(pThis, typeof(RDD));

                if (r.DeviceType == type)
                {
                    stateResult = ChangeRadioState(pThis, state, SAVEACTION.RADIODEVICES_PRE_SAVE);
                }

                pThis = r.pNext;
            }

            result = FreeDeviceList(devList);
            return(stateResult);
        }
コード例 #4
0
 internal static extern int ChangeRadioState(IntPtr pDev, WirelessState dwState, SAVEACTION sa);
コード例 #5
0
 internal static extern bool QueryWirelessState(IntPtr pDevice, out WirelessState state);
コード例 #6
0
 internal ConnectionEvent(ref SteamControllerLib.Event evt) : base(evt)
 {
     this.State = (WirelessState)evt.connection.details;
 }