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:
parent
3ed50c3f09
commit
7d14a1010d
1 changed files with 5 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue