TannerRogalsky / love.js

LÖVE ported to the web using Emscripten
MIT License
493 stars 53 forks source link

Detecting the platform. #19

Closed Bobbyjoness closed 8 years ago

Bobbyjoness commented 8 years ago

Love currently has a way to retrieve the OS through love.system.getOS. Although the web is not an OS maybe it can be added in there so people can make code branches for web or desktop.

TannerRogalsky commented 8 years ago

Yep, easy.

TannerRogalsky commented 8 years ago

As of 16288c2, love.system.getOS should return 'Web' in emscripten builds.

https://bitbucket.org/TannerRogalsky/love/commits/24683ea5cd793d5e98d3d26d3ceb2e9b738df905