From 4bf3b4e44e9a813027729cbbeca78273dfbcfe98 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Tue, 22 Mar 2016 01:36:04 +0900 Subject: [PATCH] examples/windowsize: Use the screen's Size() --- examples/windowsize/main.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/examples/windowsize/main.go b/examples/windowsize/main.go index eec150caf..c7a7a6206 100644 --- a/examples/windowsize/main.go +++ b/examples/windowsize/main.go @@ -32,8 +32,6 @@ const ( var ( gophersImage *ebiten.Image - screenWidth = initScreenWidth - screenHeight = initScreenHeight screenScale = initScreenScale keyStates = map[ebiten.Key]int{ ebiten.KeyUp: 0, @@ -59,7 +57,7 @@ func update(screen *ebiten.Image) error { case 2: d = 16 } - + screenWidth, screenHeight := screen.Size() if keyStates[ebiten.KeyUp] == 1 { screenHeight += d }