Merge pull request #4197 from unknownbrackets/savestates

Fix savestates sometimes wiping thread stacks
This commit is contained in:
Henrik Rydgård committed 2013-10-15 00:06:06 -07:00
commit 4bc068f713
3 files changed
+11 -8

No files matched your search

+4 -1
View File
@@ -487,7 +487,8 @@ public:
currentStack.start = 0;
}
~Thread()
// Can't use a destructor since savestates will call that too.
void Cleanup()
{
// Callbacks are automatically deleted when their owning thread is deleted.
for (auto it = callbacks.begin(), end = callbacks.end(); it != end; ++it)
@@ -1798,6 +1799,8 @@ u32 __KernelDeleteThread(SceUID threadID, int exitStatus, const char *reason)
if (callback && callback->nc.notifyCount != 0)
readyCallbacksCount--;
}
t->Cleanup();
}
return kernelObjects.Destroy<Thread>(threadID);
+6 -6
View File
@@ -74,8 +74,8 @@ LPDIRECT3DPIXELSHADER9 pFramebufferPixelShader = NULL; // Pixel Shader
bool CompilePixelShader(const char * code, LPDIRECT3DPIXELSHADER9 * pShader, LPD3DXCONSTANTTABLE * pShaderTable) {
LPD3DXCONSTANTTABLE shaderTable = *pShaderTable;
ID3DXBuffer* pShaderCode;
ID3DXBuffer* pErrorMsg;
ID3DXBuffer* pShaderCode = NULL;
ID3DXBuffer* pErrorMsg = NULL;
HRESULT hr = -1;
@@ -111,8 +111,8 @@ bool CompilePixelShader(const char * code, LPDIRECT3DPIXELSHADER9 * pShader, LPD
bool CompileVertexShader(const char * code, LPDIRECT3DVERTEXSHADER9 * pShader, LPD3DXCONSTANTTABLE * pShaderTable) {
LPD3DXCONSTANTTABLE shaderTable = *pShaderTable;
ID3DXBuffer* pShaderCode;
ID3DXBuffer* pErrorMsg;
ID3DXBuffer* pShaderCode = NULL;
ID3DXBuffer* pErrorMsg = NULL;
HRESULT hr = -1;
@@ -146,8 +146,8 @@ bool CompileVertexShader(const char * code, LPDIRECT3DVERTEXSHADER9 * pShader, L
}
void CompileShaders() {
ID3DXBuffer* pShaderCode;
ID3DXBuffer* pErrorMsg;
ID3DXBuffer* pShaderCode = NULL;
ID3DXBuffer* pErrorMsg = NULL;
HRESULT hr = -1;
#ifdef _XBOX
+1 -1
View File
@@ -1141,7 +1141,7 @@ void CtrlDisAsmView::search(bool continueSearch)
return;
}
for (int i = 0; i < searchQuery.size(); i++)
for (size_t i = 0; i < searchQuery.size(); i++)
{
searchQuery[i] = tolower(searchQuery[i]);
}