Skip to content

Commit

Permalink
Detect windowsgui
Browse files Browse the repository at this point in the history
  • Loading branch information
gen2brain committed Nov 6, 2024
1 parent bf2ff27 commit a2e5a5a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions jpegli_wazero.go
Original file line number Diff line number Diff line change
Expand Up @@ -368,9 +368,10 @@ func initialize() {

wasi_snapshot_preview1.MustInstantiate(ctx, rt)

mc = wazero.NewModuleConfig().WithStderr(os.Stderr).WithStdout(os.Stdout)
if runtime.GOOS == "windows" && isWindowsGUI() {
mc = wazero.NewModuleConfig()
mc = wazero.NewModuleConfig().WithStderr(io.Discard).WithStdout(io.Discard)
} else {
mc = wazero.NewModuleConfig().WithStderr(os.Stderr).WithStdout(os.Stdout)
}
}

Expand Down

0 comments on commit a2e5a5a

Please # to comment.