From fc5cef124f281678da4f804094cd844a0081854a Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Mon, 22 Aug 2022 23:30:19 +0900 Subject: [PATCH] ebiten: add comments about termination --- run.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/run.go b/run.go index e2a6cb638..526aa1215 100644 --- a/run.go +++ b/run.go @@ -188,6 +188,9 @@ func (i *imageDumperGame) Layout(outsideWidth, outsideHeight int) (screenWidth, // use errors.Is when you check the returned error is the error you want, rather than comparing the values // with == or != directly. // +// If you want to terminate a game on desktops, it is totally fine to define your own error value, return it at +// Update, and check whether the returned error value from RunGame is the same as the value you defined. +// // The size unit is device-independent pixel. // // Don't call RunGame twice or more in one process.