Just a suggestion, it might be nice to make a love.platform variable inside of the love module. This could be set based in the headers set in the config header file.
It might be set to the string "Windows", "Mac" (OS9 and under), "OSX", or "Linux", appended with "32" or "64" based on whether it's 32 or 64 bit.
What do we need it for? Personally, I would be happy if Love games remained blind to the OS they're on. Most importantly, that would encourage Lovers to use different code depending on the platform the game is on, which can only culminate in bad, bad programming practices. But secondly, I see this happening:
if string.sub(love.platform, 0,3) == "OSX" then score = score*2 end
Earliest Love2D supporter who can't Love anymore. Let me disable pixel shaders if I don't use them, dammit! Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
I find kikito's proposal MUCH better. Harder to abuse the feature, and easier to be put to its intended purpose.
Earliest Love2D supporter who can't Love anymore. Let me disable pixel shaders if I don't use them, dammit! Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
kikito wrote:
In that case, I'd suggest adding capability detection instead of computer id detection; for example, love.can.saveFiles instead of love.os.name.
love.can.hasCheeseBurger?
But seriously, it would be nice to know if someone is using, say, a touchscreen or something. I've been tripped up by Wacom users before.
The one thing I can think of off the top of my head that platform detection would be useful for (beyond what's been mentioned in this thread already) is key modifiers, e.g. binding quit to Control-Q on Windows and Command-Q on Macs. On the other hand, that sort of thing might be more easily fixed with a special "modifier" key constant that's bound to the appropriate key on each OS.