gl01/internal/io/config.go

21 lines
306 B
Go
Raw Permalink Normal View History

2022-02-05 19:43:28 +08:00
package io
import "edgaru089.ink/go/gl01/internal/util"
2022-02-05 19:43:28 +08:00
var (
MainConfig struct {
WindowWidth, WindowHeight int
FramerateLimit int // 0: vsync, -1: unlimited
}
)
func LoadConfig() (err error) {
err = util.LoadJSON("main.cfg.json", &MainConfig)
if err != nil {
return
}
return
}