Page 1 of 1
Quit instead of "No Game"
Posted: Fri Nov 23, 2018 10:08 pm
by pestocat
There's a little bug with macOS right now.
Booting love2d games with "open -n -a love /game/path/", brings up a "No Game" screen about 2/3 of the time, and the other 1/3 brings up the game.
I was wondering if theres an adjustment I can make to the love.run function to make the game just quit if it can't find the game.
Thanks!
Re: Quit instead of "No Game"
Posted: Fri Nov 23, 2018 10:27 pm
by veethree
I don't think that's a love.run thing. I'm talking out of my ass, But i'd guess the "no game" screen is a .löve file or something like that that löve loads if you run it without a game. If that's the case you'd probably have to modify the löve source for it to quit.
Re: Quit instead of "No Game"
Posted: Fri Nov 23, 2018 11:15 pm
by pestocat
Inspecting the source a bit I see that you are certainly correct, this is hardcoded into boot.lua.
It seems a little overkill to recompile just to change a few lines in this script, but I guess that what I would have to do?
https://bitbucket.org/rude/love/src/def ... s/boot.lua
If I were I think it would be something like this:
line 371:
if not can_has_game then
local nogame = require("love.nogame")
nogame()
end
--becomes-->
if not can_has_game then
love.quit()
end
Any objections to this approach?
Re: Quit instead of "No Game"
Posted: Sat Nov 24, 2018 12:18 am
by slime
pestocat wrote: ↑Fri Nov 23, 2018 10:08 pm
There's a little bug with macOS right now.
Booting love2d games with "open -n -a love /game/path/", brings up a "No Game" screen about 2/3 of the time, and the other 1/3 brings up the game.
This is a bug which should be fixed in love 11.2. You can test out a preview build here to see if the fix works for you:
https://bitbucket.org/slime73/love_macbin/get/tip.zip
Re: Quit instead of "No Game"
Posted: Sat Nov 24, 2018 12:52 am
by pestocat
Thank you slime, problem solved!