fixed: Screensaver would lockup Kodi when stopping on slow systems
authorarnova <arnova@void.org>
Thu, 25 Feb 2016 10:23:32 +0000 (11:23 +0100)
committerarnova <arnova@void.org>
Sat, 27 Feb 2016 18:11:34 +0000 (19:11 +0100)
xbmc/addons/ScreenSaver.cpp

index 4df3a66..07c2fb9 100644 (file)
@@ -27,7 +27,7 @@
 // What sound does a python screensaver make?
 #define SCRIPT_ALARM "sssssscreensaver"
 
-#define SCRIPT_TIMEOUT 5 // seconds
+#define SCRIPT_TIMEOUT 15 // seconds
 
 namespace ADDON
 {
@@ -108,6 +108,10 @@ void CScreenSaver::Destroy()
 #ifdef HAS_PYTHON
   if (URIUtils::HasExtension(LibPath(), ".py"))
   {
+    /* FIXME: This is a hack but a proper fix is non-trivial. Basically this code
+     * makes sure the addon gets terminated after we've moved out of the screensaver window.
+     * If we don't do this, we may simply lockup.
+     */
     g_alarmClock.Start(SCRIPT_ALARM, SCRIPT_TIMEOUT, "StopScript(" + LibPath() + ")", true, false);
     return;
   }