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

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;