move pause restore to dismiss

and fix the condition
develop
Myk Taylor 2023-01-23 17:46:03 -08:00
parent 8b98ba5042
commit 4377065081
No known key found for this signature in database
GPG Key ID: 8A39CA0FA0C16E78
1 changed files with 3 additions and 2 deletions

@ -710,10 +710,11 @@ function ZScreen:init()
self.defocused = false
end
function ZScreen:onDestroy()
function ZScreen:dismiss()
ZScreen.super.dismiss(self)
if self.force_pause or self.initial_pause then
-- never go from unpaused to paused, just from paused to unpaused
df.global.pause_state = df.global.pause_state or self.saved_pause_state
df.global.pause_state = df.global.pause_state and self.saved_pause_state
end
end