LilyPad: Yet another minor change to window hook cleanup that probably isn't really needed. "LilyHaxxor" property wasn't always being removed.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2591 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
MattMenke@gmail.com 2010-02-12 23:28:42 +00:00
parent cd5c262e7f
commit 32c7e80634
1 changed files with 3 additions and 6 deletions

View File

@ -35,18 +35,15 @@ void WndProcEater::ReleaseExtraProc(ExtraWndProc proc) {
if (!numExtraProcs && eatenWndProc) { if (!numExtraProcs && eatenWndProc) {
free(extraProcs); free(extraProcs);
extraProcs = 0; extraProcs = 0;
if (hWndEaten && IsWindow(hWndEaten)) { // As numExtraProcs is 0, won't cause recursion if called from Release().
SetWindowLongPtr(hWndEaten, GWLP_WNDPROC, (LONG_PTR)eatenWndProc); Release();
}
hWndEaten = 0;
eatenWndProc = 0;
} }
} }
void WndProcEater::Release() { void WndProcEater::Release() {
while (numExtraProcs) ReleaseExtraProc(extraProcs[0].proc); while (numExtraProcs) ReleaseExtraProc(extraProcs[0].proc);
RemoveProp( hWndEaten, L"LilyHaxxor" );
if (hWndEaten && IsWindow(hWndEaten)) { if (hWndEaten && IsWindow(hWndEaten)) {
RemoveProp(hWndEaten, L"LilyHaxxor");
SetWindowLongPtr(hWndEaten, GWLP_WNDPROC, (LONG_PTR)eatenWndProc); SetWindowLongPtr(hWndEaten, GWLP_WNDPROC, (LONG_PTR)eatenWndProc);
hWndEaten = 0; hWndEaten = 0;
eatenWndProc = 0; eatenWndProc = 0;