Skip to content

Commit

Permalink
Updated GetMonitors
Browse files Browse the repository at this point in the history
  • Loading branch information
smasherprog committed Feb 26, 2018
1 parent bc9039b commit 775d058
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/windows/GetMonitors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ namespace Screen_Capture {
for (auto i = 0; EnumDisplayDevicesA(NULL, i, &dd, 0); i++) {
// monitor must be attached to desktop and not a mirroring device

if ((dd.StateFlags & DISPLAY_DEVICE_ATTACHED_TO_DESKTOP) != 0 ||
(dd.StateFlags & DISPLAY_DEVICE_PRIMARY_DEVICE) != 0 && (dd.StateFlags & DISPLAY_DEVICE_MIRRORING_DRIVER) == 0) {
if (((dd.StateFlags & DISPLAY_DEVICE_ATTACHED_TO_DESKTOP) != 0 || (dd.StateFlags & DISPLAY_DEVICE_PRIMARY_DEVICE) != 0) &&
(dd.StateFlags & DISPLAY_DEVICE_MIRRORING_DRIVER) == 0) {
DEVMODEA devMode;
devMode.dmSize = sizeof(devMode);
EnumDisplaySettingsA(dd.DeviceName, ENUM_CURRENT_SETTINGS, &devMode);
Expand All @@ -43,8 +43,8 @@ namespace Screen_Capture {
scale = 1.0f;
break;
}
ret.push_back(
CreateMonitor(static_cast<int>(ret.size()), i, devMode.dmPelsHeight, devMode.dmPelsWidth, devMode.dmPosition.x, devMode.dmPosition.y, name, scale));
ret.push_back(CreateMonitor(static_cast<int>(ret.size()), i, devMode.dmPelsHeight, devMode.dmPelsWidth, devMode.dmPosition.x,
devMode.dmPosition.y, name, scale));
}
}
return ret;
Expand Down

0 comments on commit 775d058

Please sign in to comment.