diff --git a/README.md b/README.md index 0762fb4..380363c 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,10 @@ An EEW system for Linux using JMA data provided by the Wolfx Project. This software comes with zero guarantee. This software could fail at any time. I made this since there were no better free and open source alternatives for Linux. +# Real time vis +**VERY IMPORTANT**: +Because of how the real time visualisation is implemented, you will have to restart the process when you close the realtime visualisation window. + # Installation ## Linux Install the `ontake-hayai-git` package from the AUR if on Arch. For other distros you can just build `hayai` from source with `go build` (only `go` is required). diff --git a/render/render.go b/render/render.go index ba048f7..4254371 100644 --- a/render/render.go +++ b/render/render.go @@ -9,6 +9,7 @@ import ( "image/color" "log" "math" + "os" "time" "github.com/disintegration/imaging" @@ -34,8 +35,7 @@ var Displaying bool func (g *Game) Update() error { if ebiten.IsWindowBeingClosed() { - Displaying = false - return ebiten.Termination + os.Exit(0) } return nil // Add kill after timer TODO } @@ -160,7 +160,7 @@ func Render(event jmaeew.JMAEEW) { ebiten.SetWindowPosition(screenW/2-config.Config.RealtimeVisRenderSize/2, screenH/2-config.Config.RealtimeVisRenderSize/2) ebiten.SetVsyncEnabled(true) ebiten.SetWindowClosingHandled(true) - if err := ebiten.RunGameWithOptions(gameData, &ebiten.RunGameOptions{ScreenTransparent: true}); err != nil { + if err := ebiten.RunGameWithOptions(gameData, &ebiten.RunGameOptions{}); err != nil { log.Fatal(err) } }