From ca7880df6cbbb7fbc5bf58230f2f6255b0289b37 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 4 Aug 2006 13:10:28 +0000 Subject: Added new method OSystem::getScreenChangeID(), which can be used by code to track screen changes even without getting all EVENT_SCREEN_CHANGED events svn-id: r23661 --- common/system.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'common/system.h') diff --git a/common/system.h b/common/system.h index 776e76798a..91ea05b928 100644 --- a/common/system.h +++ b/common/system.h @@ -309,6 +309,21 @@ public: */ virtual void initSize(uint width, uint height) = 0; + /** + * Return an int value which is changed whenever any screen + * parameters (like the resolution) change. That is, whenever a + * EVENT_SCREEN_CHANGED would be sent. You can track this value + * in your code to detect screen changes in case you do not have + * full control over the event loop(s) being used (like the GUI + * code). + * + * @return an integer which can be used to track screen changes + * + * @note Backends which generate EVENT_SCREEN_CHANGED events MUST + * overload this method appropriately. + */ + virtual int getScreenChangeID() const { return 0; } + /** * Begin a new GFX transaction, which is a sequence of GFX mode changes. * The idea behind GFX transactions is to make it possible to activate -- cgit v1.2.3