mirror of
https://github.com/azahar-emu/azahar.git
synced 2026-06-09 04:03:40 -04:00
update default displayid behavior to exclude "Built"
This commit is contained in:
parent
d4e0c6aa9c
commit
fda4708a28
1 changed files with 3 additions and 4 deletions
|
|
@ -88,13 +88,12 @@ class SecondaryDisplay(val context: Context) : DisplayManager.DisplayListener {
|
|||
currentDisplayId = -1
|
||||
vd.display
|
||||
} else if (preferredDisplayId >=0 && displays.any { it.displayId == preferredDisplayId }) {
|
||||
|
||||
currentDisplayId = preferredDisplayId
|
||||
displays.first { it.displayId == preferredDisplayId }
|
||||
} else {
|
||||
//TODO: re-enable the filter of "built-in displays" odin style to pick default
|
||||
currentDisplayId = displays[0].displayId
|
||||
displays[0]
|
||||
// prioritize a display without the word "Built" in name if it exists
|
||||
currentDisplayId = displays.firstOrNull{!it.name.contains("Built",true)}?.displayId ?: displays[0].displayId
|
||||
displays.first{ it.displayId == currentDisplayId }
|
||||
}
|
||||
|
||||
// if our presentation is already on the right display, ignore
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue