ThePhD / infoware

C++ Library for pulling system and hardware information, without hitting the command line.
Creative Commons Zero v1.0 Universal
410 stars 84 forks source link

Zero values for non-primary displays on Windows #44

Closed Asmodai closed 4 years ago

Asmodai commented 4 years ago

My secondary display was showing a resolution of 0x1080 rather than 1920x1080, as it's to the left of the primary display (thus has a left value of -1920, and a right value of 0).

The fix is to simply compute the width and height of the display's rect and run it past abs to be ultra pedantic.

I have not tested this fix on all possible display configurations.

PR: #43

nabijaczleweli commented 4 years ago

Released in v0.5.4