Browse Source

Fix edge-case where no main display would be found on the raspberry pi

tags/2021-05-28
hogliux 10 years ago
parent
commit
7d14a1010d
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      modules/juce_gui_basics/native/juce_linux_Windowing.cpp

+ 5
- 0
modules/juce_gui_basics/native/juce_linux_Windowing.cpp View File

@@ -1198,6 +1198,11 @@ private:
if (! screens->outputs[j])
continue;
// Xrandr on the raspberry pi fails to determine the main display (mainDisplay == 0)!
// Detect this edge case and make the first found display the main display
if (! mainDisplay)
mainDisplay = screens->outputs[j];
ScopedPointer<XRROutputInfo> output;
if ((output = xrandr.getOutputInfo (dpy, screens.get(), screens->outputs[j])).get())


Loading…
Cancel
Save