File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ std::vector<iware::system::display_t> iware::system::displays() {
40
40
return enumerate_displays<iware::system::display_t >([](auto display_id) {
41
41
const std::uint32_t width = CGDisplayPixelsWide (display_id);
42
42
// 25.4 millimeters per inch
43
- const std::uint32_t dpi = 25.4 * CGDisplayScreenSize (display_id).width / width ;
43
+ const std::uint32_t dpi = width / ( CGDisplayScreenSize (display_id).width / 25.4 ) ;
44
44
45
45
auto display_mode = CGDisplayCopyDisplayMode (display_id);
46
46
iware::detail::quickscope_wrapper display_mode_deleter{[&]() { CGDisplayModeRelease (display_mode); }};
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ std::vector<iware::system::display_t> iware::system::displays() {
50
50
width,
51
51
static_cast <std::uint32_t >(DisplayHeight (display, screen_number)),
52
52
// 25.4 millimeters per inch
53
- static_cast <std::uint32_t >(25.4 * DisplayWidthMM (display, screen_number) / width ),
53
+ static_cast <std::uint32_t >(width / ( DisplayWidthMM (display, screen_number) / 25.4 ) ),
54
54
static_cast <std::uint32_t >(DefaultDepth (display, screen_number)),
55
55
static_cast <double >(XRRConfigCurrentRate (screen_config)),
56
56
};
You can’t perform that action at this time.
0 commit comments