mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Add Suspend/Resume support (#1535)
* Add Suspend/Resume support * Support Suspend/Resume/Restart via API, UI and Systray * Support screen lock/unlock scenario * Handle idle scenario * Align with fix for #1368 * Update Windows build * Refactor SuspendHandler to maintain state * Do not start BG-Effect, if system goes into suspend mode * Correct Idle and Resume interaction
This commit is contained in:
@@ -96,6 +96,7 @@ HyperionDaemon::HyperionDaemon(const QString& rootPath, QObject* parent, bool lo
|
||||
#ifdef ENABLE_CEC
|
||||
, _cecHandler(nullptr)
|
||||
#endif
|
||||
, _suspendHandler(nullptr)
|
||||
, _currVideoMode(VideoMode::VIDEO_2D)
|
||||
{
|
||||
HyperionDaemon::daemon = this;
|
||||
@@ -171,6 +172,8 @@ HyperionDaemon::HyperionDaemon(const QString& rootPath, QObject* parent, bool lo
|
||||
|
||||
// ---- network services -----
|
||||
startNetworkServices();
|
||||
|
||||
_suspendHandler = new SuspendHandler();
|
||||
}
|
||||
|
||||
HyperionDaemon::~HyperionDaemon()
|
||||
@@ -337,6 +340,8 @@ void HyperionDaemon::freeObjects()
|
||||
}
|
||||
#endif
|
||||
|
||||
delete _suspendHandler;
|
||||
|
||||
// stop Hyperions (non blocking)
|
||||
_instanceManager->stopAll();
|
||||
|
||||
|
Reference in New Issue
Block a user