1
0
Fork 0
mirror of https://github.com/notwa/mm synced 2024-05-18 05:23:22 -07:00

don't unpause the game if it wasn't already

This commit is contained in:
Connor Olding 2015-12-11 00:36:29 -08:00
parent 9ea38f25be
commit a087f2bff0

View File

@ -296,6 +296,8 @@ input = JoyWrapper(input)
local handle = MenuHandler(main_menu, T_TL)
local was_paused = false
while mm or oot do
local ctrl, pressed = input:update()
@ -304,7 +306,13 @@ while mm or oot do
handle_eat_input(handle, ctrl, pressed)
if alt_input and handle.menu ~= old_menu then
run_while_paused = true
if handle.menu then client.pause() else client.unpause() end
if old_menu == nil then
was_paused = client.ispaused()
client.pause()
end
if handle.menu == nil and not was_paused then
client.unpause()
end
end
elseif alt_input then
handle_alt_input(handle, ctrl, pressed)