mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Minor changes.
This commit is contained in:
parent
abb1831092
commit
2e22c542cc
@ -29,7 +29,7 @@ GLOBALDATA g_Data;
|
|||||||
*/
|
*/
|
||||||
int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow)
|
int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow)
|
||||||
{
|
{
|
||||||
bool loadTheme = (wcsncmp(lpCmdLine, L"/LOADTHEME ", 11) == 0);
|
bool loadTheme = (_wcsnicmp(lpCmdLine, L"/LoadTheme ", 11) == 0);
|
||||||
if (wcscmp(lpCmdLine, L"/BACKUP") != 0 && !loadTheme)
|
if (wcscmp(lpCmdLine, L"/BACKUP") != 0 && !loadTheme)
|
||||||
{
|
{
|
||||||
// Temporary solution until Rainstaller rewrite
|
// Temporary solution until Rainstaller rewrite
|
||||||
@ -169,8 +169,8 @@ void LoadTheme(const WCHAR* name)
|
|||||||
theme += name;
|
theme += name;
|
||||||
std::wstring wallpaper = theme + L"\\RainThemes.bmp";
|
std::wstring wallpaper = theme + L"\\RainThemes.bmp";
|
||||||
theme += L"\\Rainmeter.thm";
|
theme += L"\\Rainmeter.thm";
|
||||||
CopyFiles(theme, g_Data.iniFile);
|
if (CopyFiles(theme, g_Data.iniFile))
|
||||||
|
{
|
||||||
PreserveSetting(backup, L"SkinPath");
|
PreserveSetting(backup, L"SkinPath");
|
||||||
PreserveSetting(backup, L"ConfigEditor");
|
PreserveSetting(backup, L"ConfigEditor");
|
||||||
PreserveSetting(backup, L"LogViewer");
|
PreserveSetting(backup, L"LogViewer");
|
||||||
@ -190,6 +190,7 @@ void LoadTheme(const WCHAR* name)
|
|||||||
SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, (void*)wallpaper.c_str(), SPIF_UPDATEINIFILE);
|
SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, (void*)wallpaper.c_str(), SPIF_UPDATEINIFILE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void PreserveSetting(const std::wstring& from, LPCTSTR key, bool replace)
|
void PreserveSetting(const std::wstring& from, LPCTSTR key, bool replace)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user