Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help,
read this .
Kasperelo
Party member
Posts: 343 Joined: Fri Apr 13, 2012 1:47 pm
Location: The Milky Way
Post
by Kasperelo » Sat Jan 23, 2016 6:47 pm
When I exit my android game, the music still plays. I've tried adding something like:
Code: Select all
function love.focus(inFocus)
if not inFocus then
game.exit()
end
end
... where game.exit() stops all playing sounds and saves the game, but it doesn't seem to work on all devices. Any ideas?
bobbyjones
Party member
Posts: 730 Joined: Sat Apr 26, 2014 7:46 pm
Post
by bobbyjones » Sat Jan 23, 2016 7:21 pm
If stopping the music doesn't work then maybe that's the issue rather than how to cleanly exit. Unless love.focus isn't working on all devices. Which do you think it is?
Kasperelo
Party member
Posts: 343 Joined: Fri Apr 13, 2012 1:47 pm
Location: The Milky Way
Post
by Kasperelo » Sat Jan 23, 2016 7:40 pm
bobbyjones wrote: If stopping the music doesn't work then maybe that's the issue rather than how to cleanly exit. Unless love.focus isn't working on all devices. Which do you think it is?
Stopping the music works, and my example works on most phones. But it doesn't work on my friends Huawei for some reason.
bobbyjones
Party member
Posts: 730 Joined: Sat Apr 26, 2014 7:46 pm
Post
by bobbyjones » Sat Jan 23, 2016 9:33 pm
Oh so is it love.focus not working? If so maybe make an issue on the Löve issue tracker
Kasperelo
Party member
Posts: 343 Joined: Fri Apr 13, 2012 1:47 pm
Location: The Milky Way
Post
by Kasperelo » Sat Jan 23, 2016 10:56 pm
Do I need to register a user if I want to post an issue?
bobbyjones
Party member
Posts: 730 Joined: Sat Apr 26, 2014 7:46 pm
Post
by bobbyjones » Sun Jan 24, 2016 4:55 pm
Idk, it's bitbucket as a programmer you probably want an account on there anyways.
Users browsing this forum: Ahrefs [Bot] and 5 guests