0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00
mpv/video/out/mac
der richter f7a32b5f29 mac: make display-names unique to allow specific selection
the Screen property localizedName returns a none unique dynamic name
that doesn't allow a specific selection of a Screen on every OS boot.
the name consists of the vendor name and model name (eg DELL U2723QE).
if the same model display is connected to the system several times,
macOS starts to add numbers to the localizedName (eg DELL U2723QE (1)),
that may not be associated to the same Screen on every OS boot or
connecting the display. it also changes the name of the first connected
display by adding that numeration. this makes it impossible specify the
proper screen with the screen-name option every time.

to circumvent this we remove the enumeration from the name and instead
add the serial number to the display-names property. this makes the
actual Screen unique and none dynamic. furthermore the selection of a
screen by name will check for equality for the old localizedName, simple
name without enumeration, serial number and the combined name with
serial number. this makes it possible to select the screen by either of
those names and identifiers, and keeps backwards compatibility with the
old behaviour.

Examples:
localized name (System Settings name): DELL U2723QE, DELL U2723QE (1)
simple name: DELL U2723QE
serial number: 123456789
combined name: DELL U2723QE (123456789)
2024-04-24 20:35:38 +02:00
..
common.swift mac: make display-names unique to allow specific selection 2024-04-24 20:35:38 +02:00
gl_layer.swift mac/log: rename log functions and cleanup class 2024-03-29 14:20:40 +01:00
metal_layer.swift mac: cleanup swift bridge header imports and unify them 2024-03-29 14:20:40 +01:00
title_bar.swift mac/option: rename option structs to properly represent their content 2024-03-21 18:33:15 +01:00
view.swift mac/window: fix unfs window size retrieval 2024-04-04 19:39:27 +02:00
window.swift mac/window: fix window pinch gesture and modify current-window-scale 2024-04-10 19:13:00 +02:00