Ypsilon.Emulation.Processor.YBUS.RemoveDevice C# (CSharp) Méthode

RemoveDevice() public méthode

Adds a device in the specified slot index. INDEX MUST BE 1 - 16.
public RemoveDevice ( ushort index ) : void
index ushort
Résultat void
        public void RemoveDevice(ushort index)
        {
            if (index == 0 || index > 16)
                return;
            if (m_Devices[index - 1] != null) {
                m_Devices[index - 1].Dispose();
                m_Devices[index - 1] = null;
            }
            foreach (Segment segment in m_References) {
                if (((segment.Reference & MemoryReferenceInfo.ReferenceType) == MemoryReferenceInfo.Device) &&
                    ((segment.Reference & MemoryReferenceInfo.DeviceIndex) == (MemoryReferenceInfo)index)) {
                    GetDeviceMemoryReference(segment, index);
                }
            }
        }