Skip to content

Commit

Permalink
Remove effects vector
Browse files Browse the repository at this point in the history
  • Loading branch information
elishacloud committed Dec 2, 2024
1 parent 9932160 commit 986654f
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
2 changes: 1 addition & 1 deletion BuildNo.rc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#define BUILD_NUMBER 80
#define BUILD_NUMBER 81
1 change: 0 additions & 1 deletion IDirectInputDeviceX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,6 @@ HRESULT m_IDirectInputDeviceX::CreateEffect(REFGUID rguid, LPCDIEFFECT lpeff, LP
Logging::LogDebug() << __FUNCTION__ << " (" << this << ") Failed! hr: " << (DIERR)hr;

m_IDirectInputEffect* pEffect = CreateEffectWrapper(nullptr);
effects.push_back(pEffect);

// Return an effect class even on failure becasue some games don't check for failure
*ppdeff = pEffect;
Expand Down
8 changes: 0 additions & 8 deletions IDirectInputDeviceX.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ class m_IDirectInputDeviceX : public AddressLookupTableDinputObject
void *WrapperInterface2 = nullptr;
void *WrapperInterface7 = nullptr;

// Vector to store instances of m_IDirectInputEffect
std::vector<m_IDirectInputEffect*> effects;

// For SetCooperativeLevel
bool IsMouse = false;

Expand Down Expand Up @@ -131,11 +128,6 @@ class m_IDirectInputDeviceX : public AddressLookupTableDinputObject
{
LOG_LIMIT(3, __FUNCTION__ << " (" << this << ")" << " deleting interface!");

for (auto& entry : effects)
{
entry->DeleteMe();
}

// Delete Critical Section
DeleteCriticalSection(&dics);

Expand Down

0 comments on commit 986654f

Please sign in to comment.