From f60d6f7a9776253ad4716eb8a72fba18c91a7588 Mon Sep 17 00:00:00 2001 From: CeRiAl Date: Thu, 7 Jul 2011 02:47:46 +0200 Subject: MACOSX/UPDATES: Streamline UpdateManager Moved UpdateManager related code from backends/modular-backend.* to common/system.*. Added switch --enable/disable-updates to be able to disable updates support generally. --- common/system.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'common/system.h') diff --git a/common/system.h b/common/system.h index 9b833c5b1a..600778d8e1 100644 --- a/common/system.h +++ b/common/system.h @@ -45,6 +45,9 @@ class String; #if defined(USE_TASKBAR) class TaskbarManager; #endif +#if defined(USE_UPDATES) +class UpdateManager; +#endif class TimerManager; class SeekableReadStream; class WriteStream; @@ -161,6 +164,15 @@ protected: Common::TaskbarManager *_taskbarManager; #endif +#if defined(USE_UPDATES) + /** + * No default value is provided for _updateManager by OSystem. + * + * @note _updateManager is deleted by the OSystem destructor. + */ + Common::UpdateManager *_updateManager; +#endif + /** * No default value is provided for _fsFactory by OSystem. * @@ -1071,6 +1083,18 @@ public: } #endif +#if defined(USE_UPDATES) + /** + * Returns the UpdateManager, used to handle auto-updating, + * and updating of ScummVM in general. + * + * @return the UpdateManager for the current architecture + */ + virtual Common::UpdateManager *getUpdateManager() { + return _updateManager; + } +#endif + /** * Returns the FilesystemFactory object, depending on the current architecture. * -- cgit v1.2.3 From bcd07d35bb0c5307dfb0864afa3586deba96132c Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 6 Aug 2011 18:53:21 +0200 Subject: OSYSTEM: Mention that our OSystem graphics API is not thread safe. Based on f621f6a5059ec619ae9ea1045548e62a27e99ab4 and the fact that our OpenGL based backends do not (and sometimes cannot easily) implement it in a thread safe manner. --- common/system.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'common/system.h') diff --git a/common/system.h b/common/system.h index 600778d8e1..413fe326a7 100644 --- a/common/system.h +++ b/common/system.h @@ -403,6 +403,11 @@ public: * factor 2x, too, just like the game graphics. But if it has a * cursorTargetScale of 2, then it shouldn't be scaled again by * the game graphics scaler. + * + * On a note for OSystem users here. We do not require our graphics + * to be thread safe and in fact most/all backends using OpenGL are + * not. So do *not* try to call any of these functions from a timer + * and/or audio callback (like readBuffer of AudioStreams). */ //@{ -- cgit v1.2.3