Skip to content

Commit

Permalink
revert dpi scale and screen bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
redthing1 committed Oct 12, 2024
1 parent 3fca36e commit 0e10c4b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions source/re/gfx/window.d
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ class Window {
}

public @property float dpi_scale() {
return raylib.GetWindowScaleDPI().x;
auto scale_dpi_vec = raylib.GetWindowScaleDPI();
return max(scale_dpi_vec.x, scale_dpi_vec.y);
}

public @property int screen_width() {
Expand All @@ -62,7 +63,7 @@ class Window {
}

public @property Rectangle screen_bounds() {
return Rectangle(0, 0, screen_width * Core.window.dpi_scale, screen_height * Core.window.dpi_scale);
return Rectangle(0, 0, screen_width, screen_height);
}

public @property int render_width() {
Expand Down

0 comments on commit 0e10c4b

Please sign in to comment.