mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
!SetWallpaper: Added file check.
This commit is contained in:
parent
34effcfba0
commit
30ea472c51
@ -1239,6 +1239,12 @@ void CSystem::SetWallpaper(const std::wstring& wallpaper, const std::wstring& st
|
|||||||
|
|
||||||
if (!wallpaper.empty())
|
if (!wallpaper.empty())
|
||||||
{
|
{
|
||||||
|
if (_waccess(wallpaper.c_str(), 0) == -1)
|
||||||
|
{
|
||||||
|
LogWithArgs(LOG_ERROR, L"!SetWallpaper: Unable to read file: %s", wallpaper.c_str());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (GetOSPlatform() < OSPLATFORM_7)
|
if (GetOSPlatform() < OSPLATFORM_7)
|
||||||
{
|
{
|
||||||
// Gotta convert to .bmp for pre-7
|
// Gotta convert to .bmp for pre-7
|
||||||
|
Loading…
Reference in New Issue
Block a user