1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-07 04:10:08 +00:00

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

This commit is contained in:
hogliux 2015-05-18 13:07:06 +01:00
parent 3ed50c3f09
commit 7d14a1010d

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())