Skip to content

Commit

Permalink
Fix display_output_x11::get_dpi_scale
Browse files Browse the repository at this point in the history
Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
  • Loading branch information
Caellian committed Apr 30, 2024
1 parent d8fb65e commit 6d194af
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/display-x11.cc
Original file line number Diff line number Diff line change
Expand Up @@ -947,15 +947,12 @@ void display_output_x11::move_win(int x, int y) {

const float PIXELS_PER_INCH = 96.0;
float display_output_x11::get_dpi_scale() {
#if defined(BUILD_XFT)
#ifdef BUILD_XFT
if (use_xft.get(*state) && xft_dpi > 0) {
return static_cast<float>(xft_dpi) / PIXELS_PER_INCH;
} else {
return 1.0;
}
#else /* defined(BUILD_XFT) */
return value;
#endif /* defined(BUILD_XFT) */
#endif /* BUILD_XFT */
return 1.0;
}

void display_output_x11::end_draw_stuff() {
Expand Down

0 comments on commit 6d194af

Please sign in to comment.