Minor changes

This commit is contained in:
Birunthan Mohanathas
2012-06-10 12:33:59 +03:00
parent 5dd2f249dd
commit 5c90577955
3 changed files with 56 additions and 34 deletions

View File

@ -1677,7 +1677,7 @@ int CRainmeter::ScanForSkinsRecursive(const std::wstring& path, std::wstring bas
{
if (wcscmp(L".", fileData.cFileName) != 0 &&
wcscmp(L"..", fileData.cFileName) != 0 &&
!(level == 0 && wcscmp(L"@Backup", fileData.cFileName) == 0) &&
!(level == 0 && wcscmp(L"Backup", fileData.cFileName) == 0) &&
!(level == 1 && wcscmp(L"@Resources", fileData.cFileName) == 0))
{
subfolders.push_back(filename);

View File

@ -1165,7 +1165,8 @@ void CSystem::SetWallpaper(const std::wstring& wallpaper, const std::wstring& st
Bitmap* bitmap = Bitmap::FromFile(wallpaper.c_str());
if (bitmap && bitmap->GetLastStatus() == Ok)
{
std::wstring file = Rainmeter->GetSettingsPath() + L"Wallpaper.bmp";
std::wstring file = Rainmeter->GetSettingsPath();
file += L"Wallpaper.bmp";
const CLSID bmpClsid = { 0x557cf400, 0x1a04, 0x11d3, { 0x9a, 0x73, 0x0, 0x0, 0xf8, 0x1e, 0xf3, 0x2e } };
if (bitmap->Save(file.c_str(), &bmpClsid) == Ok)