Просмотр исходного кода

More user friendly monitor name on Windows

The device name is very internal and likely of little use to a user.
Instead give the more user friendly string we can get out of the system.
tags/v1.12.90
Pierre Ossman 2 лет назад
Родитель
Сommit
6a1eaff040
1 измененных файлов: 5 добавлений и 1 удалений
  1. 5
    1
      vncviewer/MonitorArrangement.cxx

+ 5
- 1
vncviewer/MonitorArrangement.cxx Просмотреть файл

@@ -371,6 +371,7 @@ std::string MonitorArrangement::get_monitor_name(int m)

for (iter = sys_monitors.begin(); iter != sys_monitors.end(); ++iter) {
MONITORINFOEX info;
DISPLAY_DEVICE dev;

info.cbSize = sizeof(info);
GetMonitorInfo(*iter, (LPMONITORINFO)&info);
@@ -384,7 +385,10 @@ std::string MonitorArrangement::get_monitor_name(int m)
if ((info.rcMonitor.bottom - info.rcMonitor.top) != h)
continue;

return info.szDevice;
dev.cb = sizeof(dev);
EnumDisplayDevices(info.szDevice, 0, &dev, 0);

return dev.DeviceString;
}

return "";

Загрузка…
Отмена
Сохранить