examples/windowsize: Use the screen's Size()

This commit is contained in:
Hajime Hoshi 2016-03-22 01:36:04 +09:00
parent 1b86bb9889
commit 4bf3b4e44e

View File

@ -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
}