Quit instead of "No Game"

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.
Post Reply
pestocat
Prole
Posts: 11
Joined: Fri Aug 17, 2018 7:53 pm

Quit instead of "No Game"

Post 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!
User avatar
veethree
Inner party member
Posts: 875
Joined: Sat Dec 10, 2011 7:18 pm

Re: Quit instead of "No Game"

Post 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.
pestocat
Prole
Posts: 11
Joined: Fri Aug 17, 2018 7:53 pm

Re: Quit instead of "No Game"

Post 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?
User avatar
slime
Solid Snayke
Posts: 3132
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Quit instead of "No Game"

Post 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
pestocat
Prole
Posts: 11
Joined: Fri Aug 17, 2018 7:53 pm

Re: Quit instead of "No Game"

Post by pestocat »

Thank you slime, problem solved!
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 75 guests