Преглед на файлове

PlayerComponent: fix another access to a deprecated property

This effectively made the debug overlay now show up with newer libmpv
builds. On the other hand, this change still works with somewhat older
libmpv builds.
Vincent Lang преди 8 години
родител
ревизия
b1ae11bd24
променени са 1 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. 3 3
      src/player/PlayerComponent.cpp

+ 3 - 3
src/player/PlayerComponent.cpp

@@ -319,7 +319,7 @@ bool PlayerComponent::switchDisplayFrameRate()
 void PlayerComponent::onRestoreDisplay()
 {
   // If the player will in fact start another file (or is playing one), don't restore.
-  if (mpv::qt::get_property(m_mpv, "idle").toBool())
+  if (mpv::qt::get_property(m_mpv, "idle-active").toBool())
     DisplayComponent::Get().restorePreviousVideoMode();
 }
 
@@ -839,7 +839,7 @@ void PlayerComponent::checkCurrentAudioDevice(const QSet<QString>& old_devs, con
   QLOG_DEBUG() << "Audio devices added:" << added;
   QLOG_DEBUG() << "Audio device selected:" << userDevice;
 
-  if (!mpv::qt::get_property(m_mpv, "idle").toBool() && userDevice.length())
+  if (!mpv::qt::get_property(m_mpv, "idle-active").toBool() && userDevice.length())
   {
     if (added.contains(userDevice))
     {
@@ -1330,7 +1330,7 @@ QString PlayerComponent::videoInformation() const
   QTextStream info(&infoStr);
 
   // check if video is playing
-  if (mpv::qt::get_property(m_mpv, "idle").toBool())
+  if (mpv::qt::get_property(m_mpv, "idle-active").toBool())
     return "";
 
   info << "File:" << endl;