Browse Source

KonvergoWindow: add some more debugging infos to debug overlay

Probably should be removed eventually. Might help debugging the issue
the previous commit hides.
Vincent Lang 8 years ago
parent
commit
e8adac7b89
1 changed files with 13 additions and 0 deletions
  1. 13 0
      src/ui/KonvergoWindow.cpp

+ 13 - 0
src/ui/KonvergoWindow.cpp

@@ -486,6 +486,19 @@ void KonvergoWindow::updateDebugInfo()
   {
   {
     info << "  Screen" << scr->name() << scr->geometry() << "\n";
     info << "  Screen" << scr->name() << scr->geometry() << "\n";
   }
   }
+
+#ifdef Q_OS_WIN32
+  HMONITOR mon = MonitorFromWindow((HWND)winId(), MONITOR_DEFAULTTONEAREST);
+  MONITORINFO moninfo = {};
+  moninfo.cbSize = sizeof(moninfo);
+  RECT winrc;
+  if (GetMonitorInfo(mon, &moninfo) &&GetWindowRect((HWND)winId(), &winrc))
+  {
+    RECT rc = moninfo.rcMonitor;
+    info << "  Win32 window" << QString("%1/%2 %3x%4").arg(rc.left).arg(rc.top).arg(rc.right).arg(rc.bottom) << QString("%1/%2 %3x%4").arg(winrc.left).arg(winrc.top).arg(winrc.right).arg(winrc.bottom) << "\n";
+  }
+#endif
+
   info << "\n";
   info << "\n";
   m_debugInfo += infoString;
   m_debugInfo += infoString;
   m_videoInfo = PlayerComponent::Get().videoInformation();
   m_videoInfo = PlayerComponent::Get().videoInformation();