aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorTravis Howell2009-07-13 23:36:22 +0000
committerTravis Howell2009-07-13 23:36:22 +0000
commit6f66d6a42565a803aac300eb6e8541029f682a01 (patch)
tree6842fbe974a46ceeb965c3a2e2010a1fa79abfe7 /common
parentf7a2a9170ff9cbb3b71025c51b4fd870294b5a13 (diff)
parent581be82b8366bca93fc3ea1c70b7aec921ad56a2 (diff)
downloadscummvm-rg350-6f66d6a42565a803aac300eb6e8541029f682a01.tar.gz
scummvm-rg350-6f66d6a42565a803aac300eb6e8541029f682a01.tar.bz2
scummvm-rg350-6f66d6a42565a803aac300eb6e8541029f682a01.zip
Merged revisions 42433-42434,42436,42439-42441,42443-42446,42455-42456,42458-42459 via svnmerge from
https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk ........ r42433 | sunmax | 2009-07-13 10:55:30 +1000 (Mon, 13 Jul 2009) | 5 lines Reverted my previous change (fprintf vs fputs), and properly implemented fputs for stderr case on PS2 ;-) ........ r42434 | Kirben | 2009-07-13 17:55:11 +1000 (Mon, 13 Jul 2009) | 1 line Fix bug #2820472 - MAZE: Keyboard input fault. ........ r42436 | wjpalenstijn | 2009-07-14 00:46:14 +1000 (Tue, 14 Jul 2009) | 1 line Add one more type of IQ-points filename (for bug #2820803) ........ r42439 | buddha_ | 2009-07-14 02:52:09 +1000 (Tue, 14 Jul 2009) | 1 line Fix for bug #2669415 (FW: half walking speed in a screen). ........ r42440 | buddha_ | 2009-07-14 03:09:40 +1000 (Tue, 14 Jul 2009) | 1 line Fix compilation under Windows (The fabs-calls were causing error C2668 about 'ambiguous call to overloaded function'). ........ r42441 | sev | 2009-07-14 03:28:49 +1000 (Tue, 14 Jul 2009) | 2 lines Add Drascula engine to the credits ........ r42443 | lordhoto | 2009-07-14 03:48:13 +1000 (Tue, 14 Jul 2009) | 1 line Got rid of Screen_LoL::_paletteConvTable. ........ r42444 | lordhoto | 2009-07-14 04:31:42 +1000 (Tue, 14 Jul 2009) | 1 line Support transparent guioptions update on game launch for AdvancedMetaEngine. ........ r42445 | lordhoto | 2009-07-14 04:32:03 +1000 (Tue, 14 Jul 2009) | 1 line Add transparent GUI options update for SCUMM too. ........ r42446 | lordhoto | 2009-07-14 04:47:32 +1000 (Tue, 14 Jul 2009) | 1 line Refactor GUI options update into a function in Common: updateGameGUIOptions. ........ r42455 | fingolfin | 2009-07-14 08:08:56 +1000 (Tue, 14 Jul 2009) | 1 line Unify PS2 and non-PS2 alloc code in Common::Array code (if this causes regressions somewhere, we better find a fix that also works on PS2) ........ r42456 | cyx | 2009-07-14 08:11:54 +1000 (Tue, 14 Jul 2009) | 1 line tucker: fixed issues with dirty rects handling (tracker item #2597763) ........ r42458 | cyx | 2009-07-14 08:19:10 +1000 (Tue, 14 Jul 2009) | 1 line tucker: added workaround for original game glitch (tracker item #2597763) ........ r42459 | fingolfin | 2009-07-14 08:19:33 +1000 (Tue, 14 Jul 2009) | 1 line Completed name of the creator of our logo ........ svn-id: r42462
Diffstat (limited to 'common')
-rw-r--r--common/array.h12
-rw-r--r--common/util.cpp13
-rw-r--r--common/util.h7
3 files changed, 16 insertions, 16 deletions
diff --git a/common/array.h b/common/array.h
index ac8a4b20d7..0b5a65e9bd 100644
--- a/common/array.h
+++ b/common/array.h
@@ -222,13 +222,7 @@ public:
T *old_storage = _storage;
_capacity = newCapacity;
- // PS2 gcc 3.2.2 can't do "new T[newCapacity]()" but only
- // "new T[newCapacity]" -> quick fix until we update tools.
- #ifndef __PLAYSTATION2__
- _storage = new T[newCapacity]();
- #else
_storage = new T[newCapacity];
- #endif
assert(_storage);
if (old_storage) {
@@ -279,13 +273,7 @@ protected:
// If there is not enough space, allocate more and
// copy old elements over.
uint newCapacity = roundUpCapacity(_size + n);
- // PS2 gcc 3.2.2 can't do "new T[newCapacity]()" but only
- // "new T[newCapacity]" -> quick fix until we update tools.
- #ifndef __PLAYSTATION2__
- newStorage = new T[newCapacity]();
- #else
newStorage = new T[newCapacity];
- #endif
assert(newStorage);
copy(_storage, _storage + idx, newStorage);
pos = newStorage + idx;
diff --git a/common/util.cpp b/common/util.cpp
index 5f5e31aa93..869cec4c48 100644
--- a/common/util.cpp
+++ b/common/util.cpp
@@ -24,6 +24,7 @@
#include "common/util.h"
#include "common/system.h"
+#include "common/config-manager.h"
#include "gui/debugger.h"
#include "engines/engine.h"
@@ -420,6 +421,14 @@ String getGameGUIOptionsDescription(uint32 options) {
return res;
}
+void updateGameGUIOptions(const uint32 options) {
+ if ((options && !ConfMan.hasKey("guioptions")) ||
+ (ConfMan.hasKey("guioptions") && options != parseGameGUIOptions(ConfMan.get("guioptions")))) {
+ ConfMan.set("guioptions", getGameGUIOptionsDescription(options));
+ ConfMan.flushToDisk();
+ }
+}
+
} // End of namespace Common
@@ -477,11 +486,7 @@ void NORETURN error(const char *s, ...) {
// Print the error message to stderr
-#ifndef __PLAYSTATION2__
fputs(buf_output, stderr);
-#else
- fprintf(stderr, "%s", buf_output);
-#endif
// Unless this error -originated- within the debugger itself, we
// now invoke the debugger, if available / supported.
diff --git a/common/util.h b/common/util.h
index e50dcebff0..aeadcd1483 100644
--- a/common/util.h
+++ b/common/util.h
@@ -284,6 +284,13 @@ bool checkGameGUIOption(GameGUIOption option, const String &str);
uint32 parseGameGUIOptions(const String &str);
String getGameGUIOptionsDescription(uint32 options);
+/**
+ * Updates the GUI options of the current config manager
+ * domain, when they differ to the ones passed as
+ * parameter.
+ */
+void updateGameGUIOptions(const uint32 options);
+
} // End of namespace Common