Use runtime.GOMAXPROCS

This commit is contained in:
Hajime Hoshi 2013-06-19 23:49:24 +09:00
parent 847b6b80f6
commit e91ab21d8d

View File

@ -19,6 +19,7 @@ import (
"image/color" "image/color"
_ "image/png" _ "image/png"
"os" "os"
"runtime"
"unsafe" "unsafe"
"github.com/hajimehoshi/go-ebiten" "github.com/hajimehoshi/go-ebiten"
"github.com/hajimehoshi/go-ebiten/graphics" "github.com/hajimehoshi/go-ebiten/graphics"
@ -125,6 +126,8 @@ func (game *DemoGame) Draw(g graphics.GraphicsContext, offscreen graphics.Textur
} }
func main() { func main() {
runtime.GOMAXPROCS(runtime.NumCPU())
game := &DemoGame{} game := &DemoGame{}
currentUI = &GlutUI{} currentUI = &GlutUI{}
currentUI.Init() currentUI.Init()