浏览代码

PowerComponent: try not to use the non-existent OS screensaver on Embedded

When we enable the OS screensaver, web-client disables its own
screensaver. But Embedded has no OS screensaver, so no screen-saving
happens at all.

This is due to the "preventSystemScreensaver" setting being false. It
really should default to true on Embedded. It's already a bit too late
to change that, since there are multiple user installs with that setting
in the config file. Since setting it to false is never useful on
Embedded, just force it to true in C++.
Vincent Lang 8 年之前
父节点
当前提交
5b7269b8ab
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      src/power/PowerComponent.cpp

+ 5 - 1
src/power/PowerComponent.cpp

@@ -65,7 +65,11 @@ void PowerComponent::redecideScreeensaverState()
   // by default we don't allow the fullscreen state affect sleep state, but we want to
   // have a hidden option to allow system sleep and screensaver when in fullscreen.
   //
-  if (SettingsComponent::Get().value(SETTINGS_SECTION_MAIN, "preventSystemScreensaver").toBool())
+  bool preventSystemScreensaver = SettingsComponent::Get().value(SETTINGS_SECTION_MAIN, "preventSystemScreensaver").toBool();
+#ifdef KONVERGO_OPENELEC
+  preventSystemScreensaver = true;
+#endif
+  if (preventSystemScreensaver)
     enableOsScreensaver &= !m_fullscreenState;
 
   if (m_currentScreensaverEnabled != enableOsScreensaver)