package main

import (
	"flag"
	"log"
	"os"

	"code.ur.gs/lupine/ordoor/internal/ordoor"
)

var (
	winX = flag.Int("win-x", 0, "Pre-scaled window X dimension override")
	winY = flag.Int("win-y", 0, "Pre-scaled window Y dimension override")
)

func main() {
	configFile := "config.toml"
	if len(os.Args) == 2 {
		configFile = os.Args[1]
	}

	if err := ordoor.Run(configFile, *winX, *winY); err != nil {
		log.Fatalf(err.Error())
	}

	os.Exit(0)
}
