Explorar el Código

#IQRV #comment 桌面壁纸设置开关通过集中配置控制

80374374 hace 1 año
padre
commit
71db1e7fcd
Se han modificado 1 ficheros con 11 adiciones y 2 borrados
  1. 11 2
      Module/mod_ResourceWatcher/ResourceWatcherFSM.cpp

+ 11 - 2
Module/mod_ResourceWatcher/ResourceWatcherFSM.cpp

@@ -1977,7 +1977,7 @@ int ResourceWatcherFSM::InitialAutoStartupSetType()
     spConfig->ReadConfigValueInt(GetEntityBase()->GetEntityName(), "AutoStartCMD", value);
     if (value != 0) {
         ret = value;
-        DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Get AutoStartCMD from CS: %d", ret);
+        DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Get AutoStartCMD from CenterSettings: %d", ret);
     }
     return ret;
 }
@@ -3843,7 +3843,7 @@ void ResourceWatcherFSM::DetectWallpaperAndWarn()
 	if (Is32R64Platform() != 0) {
 		dwFlag |= KEY_WOW64_64KEY;
 	}
-	bool wallpapaerSetCMD = true;
+	bool wallpapaerSetCMD = false;
     bool wellDone = false;
 	CSimpleStringA regeditValue(true);
 	HKEY hKey;
@@ -3874,6 +3874,15 @@ void ResourceWatcherFSM::DetectWallpaperAndWarn()
 	}
     RegCloseKey(hKey);
     //////////////////////////////////////////////////////////////////////////
+	CSmartPointer<IConfigInfo> spCtSettingConfig;
+	GetEntityBase()->GetFunction()->OpenConfig(Config_CenterSetting, spCtSettingConfig);
+	int value(0);
+    spCtSettingConfig->ReadConfigValueInt(GetEntityBase()->GetEntityName(), "MakeSureCMBWallPaper", value);
+	if (!!value) {
+		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Get MakeSureCMBWallPaper active flag from CenterSettings");
+        wallpapaerSetCMD = true;
+	}
+
 	CSimpleStringA RVCWallpaperName("WallPaper1920.png");
     if (wellDone && !regeditValue.IsNullOrEmpty() && regeditValue.IndexOf(RVCWallpaperName) != -1 && ExistsFileA(regeditValue)) {
         wallpapaerSetCMD = false;