examples/windowsize: Enable to specify either maxwindowsize or minwindowsize

This commit is contained in:
Hajime Hoshi 2021-04-18 23:21:34 +09:00
parent 5cc8d8476b
commit 2f451e6014

View File

@ -415,7 +415,7 @@ func main() {
maxw, _ = strconv.Atoi(m[1])
maxh, _ = strconv.Atoi(m[2])
}
if minw >= 0 && minh >= 0 && maxw >= 0 && maxh >= 0 {
if minw >= 0 || minh >= 0 || maxw >= 0 || maxh >= 0 {
ebiten.SetWindowSizeLimits(minw, minh, maxw, maxh)
ebiten.SetWindowResizable(true)
}