mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-11 19:48:54 +01:00
examples/windowsize: add a new flag -runnableonunfocused
This commit is contained in:
parent
db7c99fde8
commit
3564a44638
@ -49,6 +49,7 @@ var (
|
||||
flagMinWindowSize = flag.String("minwindowsize", "", "minimum window size (e.g., 100x200)")
|
||||
flagMaxWindowSize = flag.String("maxwindowsize", "", "maximium window size (e.g., 1920x1080)")
|
||||
flagGraphicsLibrary = flag.String("graphicslibrary", "", "graphics library (e.g. opengl)")
|
||||
flagRunnableOnUnfocused = flag.Bool("runnableonunfocused", true, "whether the app is runnable even on unfocused")
|
||||
)
|
||||
|
||||
func init() {
|
||||
@ -429,9 +430,8 @@ func main() {
|
||||
if *flagAutoAdjusting {
|
||||
ebiten.SetWindowResizingMode(ebiten.WindowResizingModeEnabled)
|
||||
}
|
||||
|
||||
if !*flagInitFocused {
|
||||
ebiten.SetRunnableOnUnfocused(true)
|
||||
if !*flagRunnableOnUnfocused {
|
||||
ebiten.SetRunnableOnUnfocused(false)
|
||||
}
|
||||
|
||||
minw, minh, maxw, maxh := -1, -1, -1, -1
|
||||
|
Loading…
Reference in New Issue
Block a user