Skip to content

Commit

Permalink
Fix screen_size on monitors which are not 1080p
Browse files Browse the repository at this point in the history
`OS.get_screen_size()` gives us the real screen resolution of the player,
not the design size of 1920x1080 which we set in project settings.

This was game-breaking since we use the `screen_size` variable in several
places to position stuff.
  • Loading branch information
akien-mga committed Dec 2, 2020
1 parent 256241f commit 0d6253c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion global.gd
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ var endgame_time = 240

var game_over = false

var screen_size = OS.get_screen_size()
var screen_size = Vector2(
ProjectSettings.get_setting("display/window/size/width"),
ProjectSettings.get_setting("display/window/size/height"))

var score : int = 0
var combo : int = 0
Expand Down

0 comments on commit 0d6253c

Please sign in to comment.