From 32c7e80634854e23e49b8cd364c8dcd3d2f138ba Mon Sep 17 00:00:00 2001 From: "MattMenke@gmail.com" Date: Fri, 12 Feb 2010 23:28:42 +0000 Subject: [PATCH] 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 --- plugins/LilyPad/WndProcEater.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/plugins/LilyPad/WndProcEater.cpp b/plugins/LilyPad/WndProcEater.cpp index 65f685f36f..eeea23e0b6 100644 --- a/plugins/LilyPad/WndProcEater.cpp +++ b/plugins/LilyPad/WndProcEater.cpp @@ -35,18 +35,15 @@ void WndProcEater::ReleaseExtraProc(ExtraWndProc proc) { if (!numExtraProcs && eatenWndProc) { free(extraProcs); extraProcs = 0; - if (hWndEaten && IsWindow(hWndEaten)) { - SetWindowLongPtr(hWndEaten, GWLP_WNDPROC, (LONG_PTR)eatenWndProc); - } - hWndEaten = 0; - eatenWndProc = 0; + // As numExtraProcs is 0, won't cause recursion if called from Release(). + Release(); } } void WndProcEater::Release() { while (numExtraProcs) ReleaseExtraProc(extraProcs[0].proc); - RemoveProp( hWndEaten, L"LilyHaxxor" ); if (hWndEaten && IsWindow(hWndEaten)) { + RemoveProp(hWndEaten, L"LilyHaxxor"); SetWindowLongPtr(hWndEaten, GWLP_WNDPROC, (LONG_PTR)eatenWndProc); hWndEaten = 0; eatenWndProc = 0;