Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
1c5765f
Enable installing item to device slot by id
exinfinitum Mar 23, 2021
1607c6e
WIP commit for new device slot changes
exinfinitum Mar 26, 2021
f3974e6
Implement force use of device slot for install and install check
exinfinitum Apr 1, 2021
f0e99ac
More WIP on device slot functions
exinfinitum Apr 17, 2021
6510c0f
Merge remote-tracking branch 'origin/master' into deviceSlotImprovements
exinfinitum Apr 17, 2021
9395da1
Initial work on GetDeviceSlotProperty, still need Attributes and Weap…
exinfinitum Apr 29, 2021
471da0a
Implement device slot attributes
exinfinitum Apr 29, 2021
ee5b643
Add support for Description
exinfinitum Apr 30, 2021
ce22b46
Merge remote-tracking branch 'origin/master' into deviceSlotImprovements
exinfinitum Jun 3, 2021
348570c
Fix problems
exinfinitum Jun 5, 2021
7d1b916
Fix bugs with device slot IDs, and some possible crashes
exinfinitum Jun 6, 2021
d61c2a8
Merge remote-tracking branch 'origin/master' into deviceSlotImprovements
exinfinitum Jun 6, 2021
82ee475
Clean up and fix compile errors
exinfinitum Jun 6, 2021
03a3494
Remove forceUseOfDeviceSlot from shpInstallDevice
exinfinitum Jun 7, 2021
9935438
Merge remote-tracking branch 'origin/master' into deviceSlotImprovements
exinfinitum Jul 18, 2021
c9c3a5a
Add functions to get device slot given device, or device given device…
exinfinitum Oct 6, 2021
0cd9361
Add NAME attribute to device slots
exinfinitum Oct 6, 2021
53d65a5
Merge remote-tracking branch 'origin/master' into deviceSlotImprovements
exinfinitum Oct 28, 2021
6a4bcb5
Replace forceUseOfDeviceSlot with API version check; allow rpgInstall…
exinfinitum Oct 28, 2021
2a924d5
Add minFireArc and maxFireArc device slot properties
exinfinitum Oct 30, 2021
cf29320
Fix problems when maxDevices is less than the number of device slots
exinfinitum Nov 11, 2021
7e67ee2
Decouple device descs and slots in ships
exinfinitum Nov 13, 2021
bb6f911
Clean up
exinfinitum Nov 13, 2021
0166944
Remove shpGetDeviceSlotIDs function and replace with objGetProperty o…
exinfinitum Nov 13, 2021
8797226
Merge branch 'master' into deviceSlotImprovements
exinfinitum Feb 10, 2022
a3fd6ef
Fix incorrect property in itm@ function help
exinfinitum May 5, 2022
8cffe7b
Merge pull request #13 from exinfinitum/deviceSlotImprovements
FlufflesTheMicrosaur Nov 5, 2025
0b1d5fb
Merge branch 'integration/API58' into extern/exinfinitum/deviceSlotIm…
FlufflesTheMicrosaur Nov 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion Mammoth/Include/TSE.h
Original file line number Diff line number Diff line change
Expand Up @@ -654,12 +654,14 @@ class CSpaceObject

// Devices

virtual bool CanInstallItem (const CItem &Item, const CDeviceSystem::SSlotDesc &Slot = CDeviceSystem::SSlotDesc(), InstallItemResults *retiResult = NULL, CString *retsResult = NULL, CItem *retItemToReplace = NULL);
virtual bool CanInstallItem (const CItem &Item, const CDeviceSystem::SSlotDesc &Slot = CDeviceSystem::SSlotDesc(), bool bForceUseOfDeviceSlot = false, InstallItemResults *retiResult = NULL, CString *retsResult = NULL, CItem *retItemToReplace = NULL);
void ClearDeviceSlotAtID (const CString id) { m_DeviceSlotsGivenID.DeleteAt(id); }
virtual void DamageExternalDevice (int iDev, SDamageCtx &Ctx) { }
virtual void DisableDevice (CInstalledDevice *pDevice) { }
bool FindDevice (const CItem &Item, CInstalledDevice **retpDevice, CString *retsError);
virtual CInstalledDevice *FindDevice (const CItem &Item) { return NULL; }
virtual bool FindDeviceSlotDesc (const CItem &Item, SDeviceDesc *retDesc) { return false; }
virtual bool FindDeviceSlotDesc (const CString &ID, SDeviceDesc *retDesc) { return false; }
bool FireCanInstallItem (const CItem &Item, const CDeviceSystem::SSlotDesc &Slot, CString *retsResult);
bool FireCanRemoveItem (const CItem &Item, int iSlot, CString *retsResult);
int GetNextAutoDefenseDeviceIndex (int iDev);
Expand All @@ -669,13 +671,15 @@ class CSpaceObject
virtual CDeviceSystem &GetDeviceSystem (void) { return CDeviceSystem::m_Null; }
virtual const CDeviceSystem &GetDeviceSystem (void) const { return CDeviceSystem::m_Null; }
CItem GetItemForDevice (CInstalledDevice *pDevice);
int GetDeviceSlotAtID (const CString id) const { if (m_DeviceSlotsGivenID.Find(id)) return *m_DeviceSlotsGivenID.GetAt(id); return -1; }
const CInstalledDevice *GetNamedDevice (DeviceNames iDev) const { return GetDeviceSystem().GetNamedDevice(iDev); }
CInstalledDevice *GetNamedDevice (DeviceNames iDev) { return GetDeviceSystem().GetNamedDevice(iDev); }
CDeviceItem GetNamedDeviceItem (DeviceNames iDev) const { return GetDeviceSystem().GetNamedDeviceItem(iDev); }
int GetShieldLevel (void) const;
virtual void OnDeviceStatus (CInstalledDevice *pDev, CDeviceClass::DeviceNotificationTypes iEvent) { }
bool SetCursorAtDevice (CItemListManipulator &ItemList, int iDevSlot);
bool SetCursorAtDevice (CItemListManipulator &ItemList, CInstalledDevice *pDevice);
void SetDeviceSlotAtID (const CString id, const int iDeviceSlotIndex) { if (iDeviceSlotIndex < 0 || iDeviceSlotIndex >= GetDeviceSystem().GetCount()) throw CException(ERR_FAIL); m_DeviceSlotsGivenID.SetAt(id, iDeviceSlotIndex); }
void OnObjDestroyUpdateDevices (const SDestroyCtx& Ctx);

// Docking
Expand Down Expand Up @@ -1548,6 +1552,7 @@ class CSpaceObject
CSpaceObjectList m_SubscribedObjs; // List of objects to notify when something happens
CObjectJoint *m_pFirstJoint = NULL; // List of joints
CPhysicsForceDesc m_ForceDesc; // Temporary; valid only inside Update.
TSortMap<CString, int> m_DeviceSlotsGivenID; // Mapping of device desc IDs to device slots where devices with those descs are installed
mutable int m_iImageScale = -1; // Cached value computed in GetImageScale

int m_iControlsFrozen:8 = 0; // Object will not respond to controls
Expand Down
9 changes: 8 additions & 1 deletion Mammoth/Include/TSEDevices.h
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,7 @@ struct SDeviceDesc
CEnhancementDesc Enhancements; // Slot enhancements to installed device
int iSlotBonus = 0;
double rShotSeparationScale = 1.; // Governs scaling of shot separation for dual etc weapons

};

class CDeviceDescList
Expand Down Expand Up @@ -553,9 +554,15 @@ class IDeviceGenerator

virtual bool FindDefaultDesc (SDeviceGenerateCtx &Ctx, DeviceNames iDev, SDeviceDesc *retDesc) const { return false; }
virtual bool FindDefaultDesc (SDeviceGenerateCtx &Ctx, CSpaceObject *pSource, const CItem &Item, SDeviceDesc *retDesc) const { return false; }
virtual bool FindDefaultDesc (SDeviceGenerateCtx &Ctx, CSpaceObject *pObj, const CString& sID, SDeviceDesc* retDesc) const { return false; };
virtual bool FindDefaultDesc (SDeviceGenerateCtx &Ctx, const CDeviceDescList &DescList, const CItem &Item, SDeviceDesc *retDesc) const { return false; }
virtual bool FindDefaultDesc (SDeviceGenerateCtx &Ctx, const CDeviceDescList &DescList, const CString &sID, SDeviceDesc *retDesc) const { return false; }
virtual bool FindDeviceSlot (const CString &sID, SDeviceDesc *retDesc = NULL, int *retiMaxCount = NULL) const { return false; }
virtual bool FindDeviceSlot(const CString& sID, SDeviceDesc* retDesc = NULL, int* retiMaxCount = NULL) const { return false; }
virtual bool ItemFitsSlot (CSpaceObject *pObj, const CItem &Item, const int iSlotIndex) const { return false; };
virtual int GetNumberOfDescs () const { return 0; }
virtual const int GetDescIndexGivenId (const CString &sID) const { return -1; }
virtual ICCItem* GetDeviceSlotProperty (const int iSlotIndex, CCodeChain *pCC, const CString &Property, const ICCItem *pArgs) const { return pCC->CreateNil(); };
virtual TArray<CString> GetDeviceSlotIds() const { return TArray<CString>(); }

static ALERROR InitDeviceDescFromXML (SDesignLoadCtx &Ctx, CXMLElement *pDesc, SDeviceDesc *retDesc);
};
Expand Down
1 change: 1 addition & 0 deletions Mammoth/Include/TSEShipClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@ class CShipClass : public CDesignType
bool CreateWreck (CShip *pShip, CSpaceObject **retpWreck = NULL);
bool FindDeviceSlotDesc (DeviceNames iDev, SDeviceDesc *retDesc) const;
bool FindDeviceSlotDesc (CShip *pShip, const CItem &Item, SDeviceDesc *retDesc) const;
bool FindDeviceSlotDesc (CShip *pShip, const CString& sID, SDeviceDesc *retDesc) const;

static const DWORD GDFLAG_NO_DEVICE_SLOT_SEARCH = 0x00000001;
void GenerateDevices (int iLevel, CDeviceDescList &Devices, DWORD dwFlags = 0) const;
Expand Down
3 changes: 2 additions & 1 deletion Mammoth/Include/TSEShipSystems.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,11 @@ class CDeviceSystem
int GetCountByID (const CString &sID) const;
CInstalledDevice &GetDevice (int iIndex) { if (iIndex < 0 || iIndex >= GetCount()) throw CException(ERR_FAIL); return *m_Devices[iIndex]; }
CDeviceItem GetDeviceItem (int iIndex) const { if (iIndex < 0 || iIndex >= GetCount()) throw CException(ERR_FAIL); if (!m_Devices[iIndex]->IsEmpty()) return m_Devices[iIndex]->GetItem()->AsDeviceItem(); else return CItem().AsDeviceItem(); }
const IDeviceGenerator *GetSlots() const { return m_pSlots; }
const CInstalledDevice &GetDevice (int iIndex) const { if (iIndex < 0 || iIndex >= GetCount()) throw CException(ERR_FAIL); return *m_Devices[iIndex]; }
const CInstalledDevice *GetNamedDevice (DeviceNames iDev) const { return GetNamedDeviceHelper(iDev); }
CInstalledDevice *GetNamedDevice (DeviceNames iDev) { return const_cast<CInstalledDevice *>(GetNamedDeviceHelper(iDev)); }
CDeviceItem GetNamedDeviceItem (DeviceNames iDev) const { if (HasNamedDevices() && m_NamedDevices[iDev] != -1) return GetDevice(m_NamedDevices[iDev]).GetItem()->AsDeviceItem(); else return CItem().AsDeviceItem(); }
CDeviceItem GetNamedDeviceItem (DeviceNames iDev) const { if (HasNamedDevices() && m_NamedDevices[iDev] != -1 && GetDevice(m_NamedDevices[iDev]).GetItem()) return GetDevice(m_NamedDevices[iDev]).GetItem()->AsDeviceItem(); else return CItem().AsDeviceItem(); }
int GetNamedIndex (DeviceNames iDev) const { return (HasNamedDevices() ? m_NamedDevices[iDev] : -1); }
DWORD GetTargetTypes (void) const;
bool HasShieldsUp (void) const;
Expand Down
4 changes: 3 additions & 1 deletion Mammoth/Include/TSESpaceObjectsImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -1048,6 +1048,7 @@ class CShip : public TSpaceObjectImpl<OBJID_CSHIP>
bool FindDeviceAtPos (const CVector &vPos, CInstalledDevice **retpDevice);
int GetAmmoForSelectedLinkedFireWeapons(CInstalledDevice *pDevice);
DeviceNames GetDeviceNameForCategory (ItemCategories iCategory);
ICCItem* GetDeviceSlotProperty(CCodeChain* pCC, CCodeChainCtx& Ctx, const ICCItem* pArgs) const;
int GetItemDeviceName (const CItem &Item) const;
bool HasNamedDevice (DeviceNames iDev) const;
void InstallItemAsDevice (CItemListManipulator &ItemList, const CDeviceSystem::SSlotDesc &RecommendedSlot = CDeviceSystem::SSlotDesc());
Expand Down Expand Up @@ -1142,7 +1143,7 @@ class CShip : public TSpaceObjectImpl<OBJID_CSHIP>
virtual bool CanAttack (void) const override;
virtual bool CanBeAttacked (void) const override { return CanAttack(); }
virtual bool CanBeDestroyedBy (CSpaceObject &Attacker) const override;
virtual bool CanInstallItem (const CItem &Item, const CDeviceSystem::SSlotDesc &Slot = CDeviceSystem::SSlotDesc(), InstallItemResults *retiResult = NULL, CString *retsResult = NULL, CItem *retItemToReplace = NULL) override;
virtual bool CanInstallItem (const CItem &Item, const CDeviceSystem::SSlotDesc &Slot = CDeviceSystem::SSlotDesc(), bool bForceUseOfDeviceSlot = false, InstallItemResults *retiResult = NULL, CString *retsResult = NULL, CItem *retItemToReplace = NULL) override;
virtual bool CanMove (void) const override { return true; }
virtual RequestDockResults CanObjRequestDock (CSpaceObject *pObj = NULL) const override;
virtual bool CanThrust (void) const override { return (GetThrust() > 0.0); }
Expand All @@ -1158,6 +1159,7 @@ class CShip : public TSpaceObjectImpl<OBJID_CSHIP>
virtual bool FindDataField (const CString &sField, CString *retsValue) override;
virtual CInstalledDevice *FindDevice (const CItem &Item) override;
virtual bool FindDeviceSlotDesc (const CItem &Item, SDeviceDesc *retDesc) override { return m_pClass->FindDeviceSlotDesc(this, Item, retDesc); }
virtual bool FindDeviceSlotDesc (const CString &ID, SDeviceDesc *retDesc) override { return m_pClass->FindDeviceSlotDesc(this, ID, retDesc); }
virtual bool FollowsObjThroughGate (CSpaceObject *pLeader = NULL) override;
virtual AbilityStatus GetAbility (Abilities iAbility) const override;
virtual int GetAISettingInteger (const CString &sSetting) override { return m_pController->GetAISettingInteger(sSetting); }
Expand Down
69 changes: 57 additions & 12 deletions Mammoth/TSE/CCExtensions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ ICCItem *fnObjGetArmor (CEvalContext *pEvalCtx, ICCItem *pArguments, DWORD dwDat
#define FN_SHIP_DEVICE_SLOT_AVAIL 1
#define FN_SHIP_INSTALL_AUTOPILOT 2
#define FN_SHIP_HAS_AUTOPILOT 3
// spare
#define FN_SHIP_DEV_SLOT_PROPERTY 4
#define FN_SHIP_INSTALL_TARGETING 5
#define FN_SHIP_HAS_TARGETING 6
#define FN_SHIP_CLASS 7
Expand Down Expand Up @@ -663,6 +663,8 @@ ICCItem *fnXMLGet (CEvalContext *pEvalCtx, ICCItem *pArgs, DWORD dwData);
#define FIELD_RADIUS_OFFSET CONSTLIT("radiusOffset")
#define FIELD_REMOVE CONSTLIT("remove")
#define FIELD_ROTATION CONSTLIT("rotation")
#define FIELD_SLOT_ID CONSTLIT("slotID") // TODO(heliogenesis): Remove
#define FIELD_SLOT_POS_INDEX CONSTLIT("slotPosIndex") // TODO(heliogenesis): Remove
#define FIELD_SOURCE_ONLY CONSTLIT("sourceOnly")
#define FIELD_TYPE CONSTLIT("type")
#define FIELD_WIDTH CONSTLIT("width")
Expand Down Expand Up @@ -1284,6 +1286,33 @@ static PRIMITIVEPROCDEF g_Extensions[] =
"(shpGetClassName class flags) -> class name",
"ii", 0, },

{ "shpGetDeviceSlotProperty", fnShipGet, FN_SHIP_DEV_SLOT_PROPERTY,
"(shpGetDeviceSlotProperty ship [deviceSlot] property) -> angle\n\n"

"deviceSlot can be an int or struct with these parameters:\n\n"
" deviceSlot: device slot number\n"
" slotID: device slot ID\n"
" slotPosIndex: device slot pos index\n"

"property:\n\n"
" 'attributes\n"
" 'criteria\n"
" 'description\n"
" 'deviceAtSlot\n"
" 'fireArc\n"
" 'hasAttribute [attribute]\n"
" 'maxMass\n"
" 'maxPower\n"
" 'maxPowerPercent\n"
" 'omnidirectional\n"
" 'pos\n"
" 'posAngle\n"
" 'posCartesian\n"
" 'posRadius\n"
" 'secondaryWeapon\n",

"i*s", 0, },

{ "shpGetDirection", fnShipGetOld, FN_SHIP_DIRECTION,
"(shpGetDirection ship) -> angle",
NULL, 0, },
Expand Down Expand Up @@ -1362,7 +1391,12 @@ static PRIMITIVEPROCDEF g_Extensions[] =
"ivi", PPFLAG_SIDEEFFECTS, },

{ "shpInstallDevice", fnShipSet, FN_SHIP_INSTALL_DEVICE,
"(shpInstallDevice ship item [deviceSlot]) -> itemStruct (or Nil)",
"(shpInstallDevice ship item [deviceSlot]) -> itemStruct (or Nil)\n\n"

"deviceSlot can be an int or struct with these parameters:\n\n"
" deviceSlot: device slot number\n"
" slotID: device slot ID\n"
" slotPosIndex: device slot pos index\n",
"iv*", PPFLAG_SIDEEFFECTS, },

{ "shpIsBlind", fnShipGetOld, FN_SHIP_BLINDNESS,
Expand Down Expand Up @@ -2286,6 +2320,7 @@ static PRIMITIVEPROCDEF g_Extensions[] =
"property (device)\n\n"

" 'capacitor\n"
" 'slotID\n"
" 'enabled\n"
" 'linkedFireOptions\n"
" 'pos\n"
Expand Down Expand Up @@ -7144,11 +7179,12 @@ ICCItem *fnObjGet (CEvalContext *pEvalCtx, ICCItem *pArgs, DWORD dwData)

case FN_OBJ_CAN_INSTALL_ITEM:
{
CItem Item(pCtx->AsItem(pArgs->GetElement(1)));
CItem Item = (pCtx->AsItem(pArgs->GetElement(1)));
if (Item.GetType() == NULL)
return pCC->CreateError(CONSTLIT("Invalid item"), pArgs->GetElement(1));

CDeviceSystem::SSlotDesc Slot;
bool bForceUseOfDeviceSlot = false;
if (pArgs->GetCount() > 2)
{
if (!CTLispConvert::AsSlotDesc(*pArgs->GetElement(2), Slot))
Expand All @@ -7167,14 +7203,18 @@ ICCItem *fnObjGet (CEvalContext *pEvalCtx, ICCItem *pArgs, DWORD dwData)
return pCC->CreateError(CONSTLIT("Invalid armor segment"), pArgs->GetElement(2));
if (Item.IsDevice()
&& pShip
&& (Slot.iIndex < 0 || Slot.iIndex >= pShip->GetDeviceCount() || pShip->GetDevice(Slot.iIndex)->IsEmpty()))
&& (Slot.iIndex < 0 || Slot.iIndex >= pShip->GetDeviceCount()))
return pCC->CreateError(CONSTLIT("Invalid device slot"), pArgs->GetElement(2));
bForceUseOfDeviceSlot = pCtx->GetAPIVersion() >= 54;
}

if (!Slot.sID.IsBlank())
{
if (!pObj->GetDeviceSystem().FindSlotDesc(Slot.sID))
return pCC->CreateError(CONSTLIT("Unkown slot ID"), pArgs->GetElement(2));
CShip* pShip = pObj->AsShip();
const bool bDeviceSlotExists = pShip->GetDeviceSystem().FindSlotDesc(Slot.sID);
if (!bDeviceSlotExists)
return pCC->CreateError(CONSTLIT("Unknown slot ID"), pArgs->GetElement(2));
bForceUseOfDeviceSlot = pCtx->GetAPIVersion() >= 54;
}
}

Expand All @@ -7183,7 +7223,7 @@ ICCItem *fnObjGet (CEvalContext *pEvalCtx, ICCItem *pArgs, DWORD dwData)
CSpaceObject::InstallItemResults iResult;
CString sResult;
CItem ItemToReplace;
bool bCanInstall = pObj->CanInstallItem(Item, Slot, &iResult, &sResult, &ItemToReplace);
bool bCanInstall = pObj->CanInstallItem(Item, Slot, bForceUseOfDeviceSlot, &iResult, &sResult, &ItemToReplace);

// Generate the result

Expand Down Expand Up @@ -10928,6 +10968,11 @@ ICCItem *fnShipGet (CEvalContext *pEvalCtx, ICCItem *pArgs, DWORD dwData)
}
}

case FN_SHIP_DEV_SLOT_PROPERTY:
{
return pShip->GetDeviceSlotProperty(pCC, *pCtx, pArgs);
}

case FN_SHIP_DOCK_OBJ:
{
CSpaceObject *pObj = pShip->GetDockedObj();
Expand Down Expand Up @@ -11243,7 +11288,7 @@ ICCItem *fnShipSet (CEvalContext *pEvalCtx, ICCItem *pArgs, DWORD dwData)

CSpaceObject::InstallItemResults iResult;
CString sResult;
pShip->CanInstallItem(Item, Slot, &iResult, &sResult);
pShip->CanInstallItem(Item, Slot, false, &iResult, &sResult);

if (!sResult.IsBlank())
return pCC->CreateString(sResult);
Expand Down Expand Up @@ -11456,7 +11501,6 @@ ICCItem *fnShipSet (CEvalContext *pEvalCtx, ICCItem *pArgs, DWORD dwData)
return pCC->CreateNil();

// See if we passed in a device slot

CDeviceSystem::SSlotDesc Slot;
if (pArgs->GetCount() > 2)
{
Expand All @@ -11468,14 +11512,15 @@ ICCItem *fnShipSet (CEvalContext *pEvalCtx, ICCItem *pArgs, DWORD dwData)
if (Slot.iIndex != -1)
{
if (Item.IsDevice()
&& (Slot.iIndex < 0 || Slot.iIndex >= pShip->GetDeviceCount() || pShip->GetDevice(Slot.iIndex)->IsEmpty()))
&& (Slot.iIndex < 0 || Slot.iIndex >= pShip->GetDeviceCount()))
return pCC->CreateError(CONSTLIT("Invalid device slot"), pArgs->GetElement(2));
}

if (!Slot.sID.IsBlank())
{
if (!pShip->GetDeviceSystem().FindSlotDesc(Slot.sID))
return pCC->CreateError(CONSTLIT("Unkown slot ID"), pArgs->GetElement(2));
const bool bDeviceSlotExists = pShip->GetDeviceSystem().FindSlotDesc(Slot.sID);
if (!bDeviceSlotExists)
return pCC->CreateError(CONSTLIT("Unknown slot ID"), pArgs->GetElement(2));
}
}

Expand Down
2 changes: 1 addition & 1 deletion Mammoth/TSE/CDeviceSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ bool CDeviceSystem::Install (CSpaceObject *pObj, CItemListManipulator &ItemList,
SDeviceDesc Desc;
if (Slot.sID)
{
FindSlotDesc(Slot.sID, &Desc);
pObj->FindDeviceSlotDesc(Slot.sID, &Desc);
}
else
{
Expand Down
Loading