From 7e2dd1ec2673b41ceb8123c9fe4f4a116ad920d0 Mon Sep 17 00:00:00 2001 From: Ben Rog-Wilhelm Date: Sun, 29 Jan 2023 19:40:17 -0600 Subject: [PATCH] Disable the screensaver only when playing video. --- src/core.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/core.cpp b/src/core.cpp index 7b06bd2b5..9fbcfd544 100644 --- a/src/core.cpp +++ b/src/core.cpp @@ -270,7 +270,6 @@ Core::Core( MplayerWindow *mpw, QWidget* parent ) #ifdef USE_POWERSAVING screensaver = new ScreenSaver(this); - connect( this, SIGNAL(aboutToStartPlaying()), this, SLOT(disableScreensaver()) ); connect( proc, SIGNAL(processExited()), this, SLOT(enableScreensaver()) ); connect( proc, SIGNAL(error(QProcess::ProcessError)), this, SLOT(enableScreensaver()) ); #endif @@ -4797,16 +4796,13 @@ void Core::sendMediaInfo() { //! Called when the state changes void Core::watchState(Core::State state) { #ifdef USE_POWERSAVING - #if 1 qDebug("Core::watchState: %d", state); - //qDebug("Core::watchState: has video: %d", !mdat.novideo); - if ((state == Playing) /* && (!mdat.novideo) */) { + if (state == Playing) { disableScreensaver(); } else { enableScreensaver(); } - #endif #endif if ((proc->isMPlayer()) && (state == Playing) && (change_volume_after_unpause)) {