Skip to content

Commit

Permalink
save sram when onPause is called
Browse files Browse the repository at this point in the history
  • Loading branch information
newhinton committed Sep 10, 2022
1 parent e9f1dbc commit ff49b7d
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,13 @@ abstract class BaseGameActivity : ImmersiveActivity() {
}
}

override fun onPause() {
GlobalScope.launch {
saveSRAM(game)
}
super.onPause()
}

private suspend fun autoSaveAndFinish() = withLoading {
saveSRAM(game)
saveAutoSave(game)
Expand Down

0 comments on commit ff49b7d

Please sign in to comment.