mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Fixed the load-state memory leak, also fixed various other savestate issues. Found (probably) the cause of load-state crashing Dolphin: BPWrites. Tried to put a CriticalSection around BPWritten but it only causes Dolphin to hang when loading a state. Can someone find why it hangs?
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3873 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -27,15 +27,20 @@
|
||||
#include "OpcodeDecoding.h"
|
||||
#include "VertexLoader.h"
|
||||
#include "VertexShaderManager.h"
|
||||
#include "Thread.h"
|
||||
|
||||
using namespace BPFunctions;
|
||||
|
||||
// FIXME: Hangs load-state, but should fix graphic-heavy games state loading
|
||||
//Common::CriticalSection s_bpCritical;
|
||||
|
||||
void BPInit()
|
||||
{
|
||||
memset(&bpmem, 0, sizeof(bpmem));
|
||||
bpmem.bpMask = 0xFFFFFF;
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------------------------------------
|
||||
// Write to the Bypass Memory (Bypass Raster State Registers)
|
||||
/* ------------------
|
||||
@ -73,6 +78,9 @@ void BPWritten(const Bypass& bp)
|
||||
//default: break;
|
||||
//}
|
||||
|
||||
// FIXME: Hangs load-state, but should fix graphic-heavy games state loading
|
||||
//s_bpCritical.Enter();
|
||||
|
||||
FlushPipeline();
|
||||
((u32*)&bpmem)[bp.address] = bp.newvalue;
|
||||
|
||||
@ -605,10 +613,11 @@ void BPWritten(const Bypass& bp)
|
||||
default:
|
||||
WARN_LOG(VIDEO, "Unknown BP opcode: address = 0x%08x value = 0x%08x", bp.address, bp.newvalue);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME: Hangs load-state, but should fix graphic-heavy games state loading
|
||||
//s_bpCritical.Leave();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user