Set Ebitengine properties on all platforms

This commit is contained in:
Trevor Slocum 2023-11-19 21:54:45 -08:00
parent 975da1f1f9
commit 0cc0b27f35
2 changed files with 6 additions and 5 deletions

View file

@ -561,6 +561,12 @@ type Game struct {
}
func NewGame() *Game {
ebiten.SetVsyncEnabled(true)
ebiten.SetScreenClearedEveryFrame(false)
ebiten.SetTPS(144)
ebiten.SetRunnableOnUnfocused(true)
ebiten.SetWindowClosingHandled(true)
g := &Game{
runeBuffer: make([]rune, 24),

View file

@ -22,11 +22,6 @@ func main() {
ebiten.SetWindowTitle("bgammon.org - Free Online Backgammon")
ebiten.SetWindowSize(screenWidth, screenHeight)
ebiten.SetWindowResizingMode(ebiten.WindowResizingModeEnabled)
ebiten.SetVsyncEnabled(true)
ebiten.SetScreenClearedEveryFrame(false)
ebiten.SetTPS(144)
ebiten.SetRunnableOnUnfocused(true)
ebiten.SetWindowClosingHandled(true)
g := parseFlags()