- PowerPlugin: Fixed crash when waking up from sleep/hibernation in some cases

- Code cleanup
This commit is contained in:
Birunthan Mohanathas
2011-10-12 13:34:04 +00:00
parent 7091b46689
commit 7790449f2a
30 changed files with 278 additions and 359 deletions

View File

@ -77,13 +77,12 @@ CPlayer* CPlayerWinamp::Create(WINAMPTYPE type)
*/
bool CPlayerWinamp::CheckWindow()
{
static DWORD oldTime = 0;
DWORD time = GetTickCount();
// Try to find Winamp window every 5 seconds
if (time - oldTime > 5000)
if (time - m_LastCheckTime > 5000)
{
oldTime = time;
m_LastCheckTime = time;
m_Window = FindWindow(L"Winamp v1.x", NULL);
if (m_Window)