From 543aa9491d699f197451be00da761c41421933b0 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 5c064125a..db442cb61 100644 --- a/src/core.cpp +++ b/src/core.cpp @@ -269,7 +269,6 @@ Core::Core( MplayerWindow *mpw, QWidget* parent ) #ifdef SCREENSAVER_OFF 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 @@ -4760,16 +4759,13 @@ void Core::sendMediaInfo() { //! Called when the state changes void Core::watchState(Core::State state) { #ifdef SCREENSAVER_OFF - #if 0 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)) {