mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
Use runtime.GOMAXPROCS
This commit is contained in:
parent
847b6b80f6
commit
e91ab21d8d
@ -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()
|
||||||
|
Loading…
Reference in New Issue
Block a user