Instantiate config in main, add outputsize param

This commit is contained in:
lash 2024-09-05 04:11:20 +01:00
parent 3c6585e387
commit 1b712dbbb7
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746

View File

@ -106,11 +106,7 @@ func getResource(resourceDir string) (resource.Resource, error) {
} }
func getEngine(cfg Config, rs resource.Resource, pr *persister.Persister) { func getEngine(cfg Config, rs resource.Resource, pr *persister.Persister) {
cfg := engine.Config{
Root: sym,
SessionId: sessionId,
FlagCount: uint32(16),
}
en := engine.NewEngine(cfg, rfs) en := engine.NewEngine(cfg, rfs)
en = en.WithPersister(pr) en = en.WithPersister(pr)
return en return en
@ -160,6 +156,12 @@ func main() {
os.Exit(1) os.Exit(1)
} }
cfg := engine.Config{
Root: sym,
SessionId: sessionId,
OutputSize: size,
FlagCount: uint32(16),
}
en := getEngine(cfg, rs, pr) en := getEngine(cfg, rs, pr)
_, err = en.Init(ctx) _, err = en.Init(ctx)
if err != nil { if err != nil {