Skip to content

Commit

Permalink
Use play/stop instead of restart
Browse files Browse the repository at this point in the history
  • Loading branch information
smplayer-dev committed Dec 19, 2021
1 parent 56c42d9 commit 9f96346
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/baseguiplus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1075,6 +1075,9 @@ void BaseGuiPlus::detachVideo(bool detach) {
qDebug() << "BaseGuiPlus::detachVideo:" << detach;

#ifdef USE_WINDOW_VIDEOLAYER
bool playing = (core->state() != Core::Stopped);
core->stop();

if (detach) {
toggleFullscreen(false);
fullscreenAct->setEnabled(false);
Expand All @@ -1092,7 +1095,7 @@ void BaseGuiPlus::detachVideo(bool detach) {
mplayerwindow->show();
fullscreenAct->setEnabled(true);
}
core->restart();
if (playing) core->play();
#else
if (detach) {
if (!isVideoDetached()) {
Expand Down

0 comments on commit 9f96346

Please sign in to comment.