Skip to content

Commit 490ad8b

Browse files
committed
fix: Fixed 'fancy' overlay location being incorrect when using certain monitor setups.
1 parent 621d0e1 commit 490ad8b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

script/camera.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ local function update_camera(player)
6464
local display_resolution = player.display_resolution
6565
local display_scale = player.display_scale
6666

67-
local left_margin = (selected.position.x - player.render_position.x) * zoom * 32
68-
local top_margin = (selected.position.y - player.render_position.y) * zoom * 32
69-
local preview_size_world = (factory.layout.outside_size * 32 - 32)
67+
local left_margin = (selected.position.x - player.render_position.x) * zoom * 32 * player.display_density_scale
68+
local top_margin = (selected.position.y - player.render_position.y) * zoom * 32 * player.display_density_scale
69+
local preview_size_world = (factory.layout.outside_size * 32 - 32) * player.display_density_scale
7070
local preview_size_screen = preview_size_world * zoom
7171

7272
camera_frame.location = {

0 commit comments

Comments
 (0)