Add a better error message for Go version

Fixes #777
This commit is contained in:
Hajime Hoshi 2019-01-10 23:42:28 +09:00
parent c4e98de804
commit 866f64a625
2 changed files with 21 additions and 0 deletions

19
goversion.go Normal file
View File

@ -0,0 +1,19 @@
// Copyright 2019 The Ebiten Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// +build go1.11
package ebiten
const __EBITEN_REQUIRES_GO_VERSION_1_11_OR_LATER__ = true

2
run.go
View File

@ -22,6 +22,8 @@ import (
"github.com/hajimehoshi/ebiten/internal/ui"
)
var _ = __EBITEN_REQUIRES_GO_VERSION_1_11_OR_LATER__
// TPS represents a default ticks per second, that represents how many times game updating happens in a second.
const DefaultTPS = 60