mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-10 00:41:26 +12:00
RSX Bugfixes and plugging memory leaks
BUGFIX: Add break after NV4097_SET_TEXTURE_BORDER_COLOR in RSXThread.cpp BUGFIX: Fix parameters passed to RSXTexture::SetControl3 (they were being passed in reverse order) BUGFIX: Remove invalid, non-sensical call to glPixelStorei in GLGSRender.h BUGFIX: Fix signed/unsigned comparison compiler warnings in GLGSRender.h CHANGE: Make GLFragmentProgram::Decompiler synchronous by default CHANGE: Update wxWidgets submodule to latest commit BUGFIX: Fix several memory leaks ADDED: Created a new MSVC debug configuration to output locations of allocations that end up leaking after the program is closed. BUGFIX: Fix the stupid PadHandler crash due to the lack of a virtual d'tor
This commit is contained in:
commit
d136adc73f
46 changed files with 617 additions and 149 deletions
|
@ -46,31 +46,38 @@ CPUThread& CPUThreadManager::AddThread(CPUThreadType type)
|
|||
return *new_thread;
|
||||
}
|
||||
|
||||
//TODO: find out where the thread is actually deleted because it's sure as shit not here
|
||||
void CPUThreadManager::RemoveThread(const u32 id)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(m_mtx_thread);
|
||||
|
||||
for(u32 i=0; i<m_threads.size(); ++i)
|
||||
CPUThread* thr = nullptr;
|
||||
u32 thread_index = 0;
|
||||
|
||||
for (u32 i = 0; i < m_threads.size(); ++i)
|
||||
{
|
||||
if(m_threads[i]->m_wait_thread_id == id)
|
||||
if (m_threads[i]->m_wait_thread_id == id)
|
||||
{
|
||||
m_threads[i]->Wait(false);
|
||||
m_threads[i]->m_wait_thread_id = -1;
|
||||
}
|
||||
|
||||
if(m_threads[i]->GetId() != id) continue;
|
||||
if (m_threads[i]->GetId() != id) continue;
|
||||
|
||||
CPUThread* thr = m_threads[i];
|
||||
thr = m_threads[i];
|
||||
thread_index = i;
|
||||
}
|
||||
|
||||
if (thr)
|
||||
{
|
||||
#ifndef QT_UI
|
||||
wxGetApp().SendDbgCommand(DID_REMOVE_THREAD, thr);
|
||||
#endif
|
||||
thr->Close();
|
||||
|
||||
m_threads.erase(m_threads.begin()+ i);
|
||||
break;
|
||||
m_threads.erase(m_threads.begin() + thread_index);
|
||||
}
|
||||
|
||||
// Removing the ID should trigger the actual deletion of the thread
|
||||
Emu.GetIdManager().RemoveID(id);
|
||||
Emu.CheckStatus();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue