aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorJohannes Schickel2008-11-14 22:08:10 +0000
committerJohannes Schickel2008-11-14 22:08:10 +0000
commit5a0556f09ca89886fda55d333745a672ea14e022 (patch)
tree698d0162a6737c298f8c6d313209e18a056f7684 /common
parentbb87d39424c9dee6fbfddf8b806a5675bcf39494 (diff)
downloadscummvm-rg350-5a0556f09ca89886fda55d333745a672ea14e022.tar.gz
scummvm-rg350-5a0556f09ca89886fda55d333745a672ea14e022.tar.bz2
scummvm-rg350-5a0556f09ca89886fda55d333745a672ea14e022.zip
Committed my patch #2123680 "SDL: Backend transaction / rollback support".
svn-id: r35062
Diffstat (limited to 'common')
-rw-r--r--common/system.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/common/system.h b/common/system.h
index a6880e5423..91bb091166 100644
--- a/common/system.h
+++ b/common/system.h
@@ -393,12 +393,30 @@ public:
*/
virtual void beginGFXTransaction() {}
+ /**
+ * This type is able to save the different errors which can happen while
+ * changing GFX config values inside GFX transactions.
+ *
+ * endGFXTransaction returns a ORed combination of the '*Failed' values
+ * if any problem occures, on success 0.
+ *
+ * @see endGFXTransaction
+ */
+ enum TransactionError {
+ kTransactionSuccess = 0, /**< Everything fine (use EQUAL check for this one!) */
+ kTransactionAspectRatioFailed = (1 << 0), /**< Failed switchting aspect ratio correction mode */
+ kTransactionFullscreenFailed = (1 << 1), /**< Failed switchting fullscreen mode */
+ kTransactionModeSwitchFailed = (1 << 2), /**< Failed switchting the GFX graphics mode (setGraphicsMode) */
+ kTransactionSizeChangeFailed = (1 << 3) /**< Failed switchting the screen dimensions (initSize) */
+ };
/**
* End (and thereby commit) the current GFX transaction.
* @see beginGFXTransaction
+ * @see kTransactionError
+ * @return returns a ORed combination of TransactionError values or 0 on success
*/
- virtual void endGFXTransaction() {}
+ virtual TransactionError endGFXTransaction() { return kTransactionSuccess; }
/**