Touchscreen fixes

pull/84/head
Noah 2022-09-24 19:05:42 -07:00
parent 73421d27f2
commit cd103f06c7
2 changed files with 6 additions and 0 deletions

View File

@ -200,6 +200,11 @@ func main() {
game := doodle.New(c.Bool("debug"), engine)
game.SetupEngine()
// Reload usercfg - if their settings.json doesn't exist, we try and pick a
// default "hide touch hints" based on touch device presence - which is only
// known after SetupEngine.
usercfg.Load()
// Hide the mouse cursor over the window, we draw our own sprite image for it.
if !native.HasTouchscreen(engine) {
engine.ShowCursor(false)

View File

@ -100,6 +100,7 @@ func Load() error {
settings = Defaults()
)
if _, err := os.Stat(filename); os.IsNotExist(err) {
Current = settings
return nil // no file, no problem
}