Minor fixes for r522.

This commit is contained in:
spx 2010-08-26 21:49:50 +00:00
parent d9137c2413
commit 9f33f8907a

View File

@ -546,7 +546,12 @@ BOOL LSLog(int nLevel, LPCTSTR pszModule, LPCTSTR pszMessage)
logInfo.type = L"DEBUG";
break;
}
Rainmeter->m_LogData.push_front(logInfo);
if (Rainmeter->m_LogData.size() > MAXABOUTLOGLINES)
{
Rainmeter->m_LogData.pop_back();
}
// Use the lsapi.dll version of the method if possible
if (fpLSLog)
@ -590,6 +595,7 @@ BOOL LSLog(int nLevel, LPCTSTR pszModule, LPCTSTR pszMessage)
if (logFile)
{
fputws(logInfo.type.c_str(), logFile);
fputws(L": ", logFile);
fputws(message.c_str(), logFile);
fputws(L"\n", logFile);
fclose(logFile);
@ -597,10 +603,6 @@ BOOL LSLog(int nLevel, LPCTSTR pszModule, LPCTSTR pszMessage)
}
}
}
if (Rainmeter->m_LogData.size() > MAXABOUTLOGLINES)
{
Rainmeter->m_LogData.pop_back();
}
return TRUE;
}