mirror of
https://github.com/love2d/love.git
synced 2026-08-16 08:11:02 +02:00
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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user