Skip to content

Commit

Permalink
[refactor] Do not use values returned by pi.ClipReset()
Browse files Browse the repository at this point in the history
pi.ClipReset() returns 4 parameters which is a lot. Use pi.Scr().Clip() instead to get a struct with clipping region.
  • Loading branch information
elgopher committed Aug 14, 2023
1 parent 2aa977a commit b124302
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions devtools/control.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ func pauseGame() {
}
gamePaused = true

pi.Camera.Reset()
x, y, w, h := pi.ClipReset()

stateCopy = stateWhenGameWasPaused{
time: pi.Time,
camera: pi.Camera,
clip: pi.Region{X: x, Y: y, W: w, H: h},
clip: pi.Scr().Clip(),
}

pi.Camera.Reset()
pi.ClipReset()

snapshot.Take()
}

Expand Down

0 comments on commit b124302

Please sign in to comment.