瀏覽代碼

DisplayComponent: more switchCommand() debugging

Vincent Lang 9 年之前
父節點
當前提交
6a33a7c1bb
共有 1 個文件被更改,包括 9 次插入0 次删除
  1. 9 0
      src/display/DisplayComponent.cpp

+ 9 - 0
src/display/DisplayComponent.cpp

@@ -313,14 +313,23 @@ static bool modeEqualsFuzzy(const DMVideoMode& m1, const DMVideoMode& m2, float
 void DisplayComponent::switchCommand(QString command)
 {
   if (!m_displayManager)
+  {
+    QLOG_ERROR() << "Display manager not set";
     return;
+  }
 
   int currentDisplay = getApplicationDisplay();
   if (currentDisplay < 0)
+  {
+    QLOG_ERROR() << "Current display not found";
     return;
+  }
   int id = m_displayManager->getCurrentDisplayMode(currentDisplay);
   if (id < 0)
+  {
+    QLOG_ERROR() << "Current mode not found";
     return;
+  }
   DMVideoMode current_mode = *m_displayManager->displays[currentDisplay]->videoModes[id];
   DMVideoMode mode = current_mode;