examples/windowsize: Reset TPS when resetting the Vsync mode

This commit is contained in:
Hajime Hoshi 2021-08-05 03:01:11 +09:00
parent fb04b0d004
commit 14f0fbf844

View File

@ -212,6 +212,8 @@ func (g *game) Update() error {
fpsMode = ebiten.FPSModeVsyncOffMinimum fpsMode = ebiten.FPSModeVsyncOffMinimum
case ebiten.FPSModeVsyncOffMinimum: case ebiten.FPSModeVsyncOffMinimum:
fpsMode = ebiten.FPSModeVsyncOn fpsMode = ebiten.FPSModeVsyncOn
// Reset TPS
tps = 60
} }
} }
if inpututil.IsKeyJustPressed(ebiten.KeyT) { if inpututil.IsKeyJustPressed(ebiten.KeyT) {