Two preferred modes shouldn't happen, but this ensures a copy-paste
for another flag doesn't result in mis-sorted modes and it's more
consistent with the rest of the logic.
Works around a DRM bug where the EDID blob would be 0.
We always get modes from DRM from this, which means it MUST be getting the edid.
Surprise! Calling this before getting the object props makes it so it gets the edid. Yipee!
Avoids picking 4K@30Hz and other modes which feel really bad.
Happens on a lot of USB C -> HDMI adapters, even if they advertise support for it online.
When adding/removing from a normal map, the iterators become undefined, which means drm->connector can change randomly to the wrong connector or garbage memory.
There is no way to tel a NV12 buffer in Wayland's color space. Why?
What a glaring omission.
Even then, the color management protocol that has supposedly been in
development for 2 years is missing basic features like setting the
color range. Great!
For now we are just setting an env var both us and Remote Play Together
are going to listen to and call it a day until the situation is
properly resolved.
Currently creating a new external overlay window will not show up until all others close or are killed.
With this change when the user starts a new external overlay it will take precedence until a newer one appears or it is closed or killed.
This will help alleviate a lot of bugs where overlays 'don't start' because another overlay is already in the slot and not drawing into it.
Once external overlay windows set their XAtom `GAMESCOPE_EXTERNAL_OVERLAY` to 0 they should be removed from the pool of known external overlays, but reference is kept until they are closed and is never replaced as all current overlays use maximum opacity.
This change is untested and written in a coffee break.
Use sched_get_priority_min for priority
Accommodates other unixes with odd minimum priorities.
Manually handle save/restore of scheduling.
Add space. (formatting)
Exit on failure to get scheduler parameters.
Add missing braces.
Copy and edit existing sched_parm rather than new.
May be relevant on some exotic unixes.