aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorMax Horn2006-08-04 13:10:28 +0000
committerMax Horn2006-08-04 13:10:28 +0000
commitca7880df6cbbb7fbc5bf58230f2f6255b0289b37 (patch)
tree9749fb5571e7ffe11e2e96ac0b1fc6819b81787c /common
parentaf3241f70035db44a7510d4558a52bd7e1e92722 (diff)
downloadscummvm-rg350-ca7880df6cbbb7fbc5bf58230f2f6255b0289b37.tar.gz
scummvm-rg350-ca7880df6cbbb7fbc5bf58230f2f6255b0289b37.tar.bz2
scummvm-rg350-ca7880df6cbbb7fbc5bf58230f2f6255b0289b37.zip
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
Diffstat (limited to 'common')
-rw-r--r--common/system.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/common/system.h b/common/system.h
index 776e76798a..91ea05b928 100644
--- a/common/system.h
+++ b/common/system.h
@@ -310,6 +310,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
* several different GFX changes at once as a "batch" operation. For