소스 검색

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 9 년 전
부모
커밋
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)