internal WirelessDevice(WirelessManager parent, RDD info) { this.parent = parent; this.type = info.DeviceType; deviceName = info.pszDeviceName; displayName = info.pszDisplayName; this.state = info.dwState; }
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); }
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); }
internal static extern int ChangeRadioState(IntPtr pDev, WirelessState dwState, SAVEACTION sa);
internal static extern bool QueryWirelessState(IntPtr pDevice, out WirelessState state);
internal ConnectionEvent(ref SteamControllerLib.Event evt) : base(evt) { this.State = (WirelessState)evt.connection.details; }