mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 10:48:53 +01:00
parent
67c9d65d82
commit
365740aca9
@ -1065,8 +1065,8 @@ func (u *userInterfaceImpl) updateGame() error {
|
||||
t2 = time.Now()
|
||||
}
|
||||
|
||||
// When a window is not focused, SwapBuffers might return immediately and CPU might be busy.
|
||||
// Mitigate this by sleeping (#982).
|
||||
// When a window is not focused or in another space, SwapBuffers might return immediately and CPU might be busy.
|
||||
// Mitigate this by sleeping (#982, #2521).
|
||||
if unfocused {
|
||||
d := t2.Sub(t1)
|
||||
const wait = time.Second / 60
|
||||
|
Loading…
Reference in New Issue
Block a user