summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--softhddevice.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/softhddevice.cpp b/softhddevice.cpp
index 8be2e9d..61c32b1 100644
--- a/softhddevice.cpp
+++ b/softhddevice.cpp
@@ -1402,7 +1402,7 @@ class cPluginSoftHdDevice:public cPlugin
virtual bool Initialize(void);
virtual bool Start(void);
virtual void Stop(void);
- // virtual void Housekeeping(void);
+ virtual void Housekeeping(void);
virtual void MainThreadHook(void);
virtual const char *MainMenuEntry(void);
virtual cOsdObject *MainMenuAction(void);
@@ -1501,6 +1501,10 @@ bool cPluginSoftHdDevice::Start(void)
return true;
}
+/**
+** Shutdown plugin. Stop any background activities the plugin is
+** performing.
+*/
void cPluginSoftHdDevice::Stop(void)
{
//dsyslog("[softhddev]%s:\n", __FUNCTION__);
@@ -1508,8 +1512,6 @@ void cPluginSoftHdDevice::Stop(void)
::Stop();
}
-#if 0
-
/**
** Perform any cleanup or other regular tasks.
*/
@@ -1517,10 +1519,18 @@ void cPluginSoftHdDevice::Housekeeping(void)
{
dsyslog("[softhddev]%s:\n", __FUNCTION__);
- // ::Housekeeping();
-}
+ // check if user is inactive, automatic enter suspend mode
+ // FIXME: cControl prevents shutdown, disable this until fixed
+ if (0 && SuspendMode == NOT_SUSPENDED && ShutdownHandler.IsUserInactive()) {
+ // don't overwrite already suspended suspend mode
+ cControl::Launch(new cSoftHdControl);
+ cControl::Attach();
+ Suspend(ConfigSuspendClose, ConfigSuspendClose, ConfigSuspendX11);
+ SuspendMode = SUSPEND_NORMAL;
+ }
-#endif
+ ::Housekeeping();
+}
/**
** Create main menu entry.
@@ -1556,16 +1566,6 @@ void cPluginSoftHdDevice::MainThreadHook(void)
cDevice::SetPrimaryDevice(DoMakePrimary);
DoMakePrimary = 0;
}
- // check if user is inactive, automatic enter suspend mode
- // FIXME: cControl prevents shutdown, disable this until fixed
- // FIXME: move this to ::Housekeeping
- if (0 && SuspendMode == NOT_SUSPENDED && ShutdownHandler.IsUserInactive()) {
- // don't overwrite already suspended suspend mode
- cControl::Launch(new cSoftHdControl);
- cControl::Attach();
- Suspend(ConfigSuspendClose, ConfigSuspendClose, ConfigSuspendX11);
- SuspendMode = SUSPEND_NORMAL;
- }
::MainThreadHook();
}