Added love.graphics.isActive. love.graphics function calls (and method calls on objects created via love.graphics) are only guaranteed to work when isActive is true, otherwise bad things might happen (the program crashing, for example.)

It's usually only false when the app is inactive on iOS, and when the window hasn't been created yet.

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2015-02-17 02:24:09 -04:00
parent cafbf1ffbe
commit ac2b03e8a4
8 changed files with 78 additions and 6 deletions
+4
View File
@@ -68,6 +68,9 @@ public:
virtual bool setMode(int width, int height, bool &sRGB);
virtual void unSetMode();
virtual void setActive(bool active);
virtual bool isActive() const;
void setDebug(bool enable);
/**
@@ -470,6 +473,7 @@ private:
int width;
int height;
bool created;
bool active;
bool writingToStencil;