소스 검색

DisplayComponent: explicitly log setDisplayMode() success

It can be deduced from the other log messages, but that's always such a
drag.
Vincent Lang 9 년 전
부모
커밋
c2b4e2f8f6
1개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  1. 6 1
      src/display/DisplayComponent.cpp

+ 6 - 1
src/display/DisplayComponent.cpp

@@ -134,7 +134,12 @@ bool DisplayComponent::switchToBestVideoMode(float frameRate)
       << m_displayManager->displays[currentDisplay]->videoModes[bestmode]->getPrettyName()
       << "on display" << currentDisplay;
 
-      return m_displayManager->setDisplayMode(currentDisplay, bestmode);
+      if (!m_displayManager->setDisplayMode(currentDisplay, bestmode))
+      {
+        QLOG_INFO() << "Mode switching failed.";
+        return false;
+      }
+      return true;
     }
     QLOG_INFO() << "No better video mode than the currently active one found.";
   }