aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartijn Kaijser <martijn@xbmc.org>2016-03-05 09:55:44 +0100
committerMartijn Kaijser <martijn@xbmc.org>2016-03-05 09:55:44 +0100
commit38cb247130a8fd73f36e3d1d49477a19669caaf9 (patch)
tree0f2477b757fe94fc7d375ed875780e7c5608ee2f
parent1f43582a9b03ad2b3c5bfe2b46c7ce98ebc209db (diff)
parent678bc24606ba85756ecbec5be170297ce7815d2e (diff)
Merge pull request #9226 from arnova/screensaver_freeze_fix_jarvis
fixed: Screensaver would lockup Kodi when stopping on slow systems
-rw-r--r--xbmc/addons/ScreenSaver.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/xbmc/addons/ScreenSaver.cpp b/xbmc/addons/ScreenSaver.cpp
index 4df3a667b2..07c2fb94ca 100644
--- a/xbmc/addons/ScreenSaver.cpp
+++ b/xbmc/addons/ScreenSaver.cpp
@@ -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;
}