[Scummvm-cvs-logs] scummvm master -> 60fa9944dc8f942212ed0c3803aa690c3014c6a5
lordhoto
lordhoto at gmail.com
Thu Jan 7 11:28:22 CET 2016
This automated email contains information about 9 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
d13300ca22 BACKENDS: Fix include style in chroot-fs-factory.cpp.
adaa1bcd8f BACKENDS: Move FIXME closer to ChRootFilesystemFactory.
557d58af8d BACKENDS: Make ChRootFilesystemFactory delcaration more consistent.
48df726c9e BACKENDS: Let ChRootFilesystemFactory's constructor take a const String reference.
ca3c5a702f BACKENDS: Make ChRootFilesystemFactory's constructor explicit.
ded43d795a AUDIO: Remove unused includes in fluidsynth.cpp.
1baf3bed7a AUDIO: Use standard line warps in iOS7 hack comment in fluidsynth.cpp.
54f5c95832 COMMON: Make FSNode(AbstractFSNode *) private again.
60fa9944dc GUI: Explain create_project HACK in module.mk a bit better.
Commit: d13300ca22663af77cb454ab536f4599d0eb772b
https://github.com/scummvm/scummvm/commit/d13300ca22663af77cb454ab536f4599d0eb772b
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2016-01-07T10:52:19+01:00
Commit Message:
BACKENDS: Fix include style in chroot-fs-factory.cpp.
Changed paths:
backends/fs/chroot/chroot-fs-factory.cpp
diff --git a/backends/fs/chroot/chroot-fs-factory.cpp b/backends/fs/chroot/chroot-fs-factory.cpp
index fa98ab7..fd1718a 100644
--- a/backends/fs/chroot/chroot-fs-factory.cpp
+++ b/backends/fs/chroot/chroot-fs-factory.cpp
@@ -27,9 +27,8 @@
#define FORBIDDEN_SYMBOL_EXCEPTION_mkdir
#define FORBIDDEN_SYMBOL_EXCEPTION_exit //Needed for IRIX's unistd.h
-#include "chroot-fs-factory.h"
+#include "backends/fs/chroot/chroot-fs-factory.h"
#include "backends/fs/chroot/chroot-fs.h"
-#include "backends/fs/posix/posix-fs-factory.h"
ChRootFilesystemFactory::ChRootFilesystemFactory(Common::String root) {
_root = root;
Commit: adaa1bcd8f727da1060a3a5261520563ca6905aa
https://github.com/scummvm/scummvm/commit/adaa1bcd8f727da1060a3a5261520563ca6905aa
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2016-01-07T10:53:28+01:00
Commit Message:
BACKENDS: Move FIXME closer to ChRootFilesystemFactory.
Changed paths:
backends/fs/chroot/chroot-fs-factory.h
diff --git a/backends/fs/chroot/chroot-fs-factory.h b/backends/fs/chroot/chroot-fs-factory.h
index 23b3c8f..4910191 100644
--- a/backends/fs/chroot/chroot-fs-factory.h
+++ b/backends/fs/chroot/chroot-fs-factory.h
@@ -20,15 +20,17 @@
*
*/
-/*
- * FIXME: Warning, using this factory in your backend may silently breaks some features. Instances are, for example, the FluidSynth code, and the POSIX plugin code.
- */
#ifndef BACKENDS_FS_CHROOT_CHROOT_FS_FACTORY_H
#define BACKENDS_FS_CHROOT_CHROOT_FS_FACTORY_H
#include "backends/fs/fs-factory.h"
+/**
+ * FIXME: Warning, using this factory in your backend may silently break some
+ * features. Instances are, for example, the FluidSynth code, and the POSIX
+ * plugin code.
+ */
class ChRootFilesystemFactory : public FilesystemFactory {
private:
Common::String _root;
Commit: 557d58af8d2c6cbb18c3506245edd06c641b5027
https://github.com/scummvm/scummvm/commit/557d58af8d2c6cbb18c3506245edd06c641b5027
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2016-01-07T10:55:01+01:00
Commit Message:
BACKENDS: Make ChRootFilesystemFactory delcaration more consistent.
The make* factory functions are public in the base class, thus keep the
visibility the same.
Changed paths:
backends/fs/chroot/chroot-fs-factory.h
diff --git a/backends/fs/chroot/chroot-fs-factory.h b/backends/fs/chroot/chroot-fs-factory.h
index 4910191..d3c997b 100644
--- a/backends/fs/chroot/chroot-fs-factory.h
+++ b/backends/fs/chroot/chroot-fs-factory.h
@@ -32,16 +32,15 @@
* plugin code.
*/
class ChRootFilesystemFactory : public FilesystemFactory {
-private:
- Common::String _root;
+public:
+ ChRootFilesystemFactory(Common::String root);
-protected:
virtual AbstractFSNode *makeRootFileNode() const;
virtual AbstractFSNode *makeCurrentDirectoryFileNode() const;
virtual AbstractFSNode *makeFileNodePath(const Common::String &path) const;
-public:
- ChRootFilesystemFactory(Common::String root);
+private:
+ Common::String _root;
};
#endif /* BACKENDS_FS_CHROOT_CHROOT_FS_FACTORY_H */
Commit: 48df726c9e2eb2a7efa87d8893d2a507be35c3cc
https://github.com/scummvm/scummvm/commit/48df726c9e2eb2a7efa87d8893d2a507be35c3cc
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2016-01-07T10:57:46+01:00
Commit Message:
BACKENDS: Let ChRootFilesystemFactory's constructor take a const String reference.
Changed paths:
backends/fs/chroot/chroot-fs-factory.cpp
backends/fs/chroot/chroot-fs-factory.h
diff --git a/backends/fs/chroot/chroot-fs-factory.cpp b/backends/fs/chroot/chroot-fs-factory.cpp
index fd1718a..db5655f 100644
--- a/backends/fs/chroot/chroot-fs-factory.cpp
+++ b/backends/fs/chroot/chroot-fs-factory.cpp
@@ -30,8 +30,8 @@
#include "backends/fs/chroot/chroot-fs-factory.h"
#include "backends/fs/chroot/chroot-fs.h"
-ChRootFilesystemFactory::ChRootFilesystemFactory(Common::String root) {
- _root = root;
+ChRootFilesystemFactory::ChRootFilesystemFactory(const Common::String &root)
+ : _root(root) {
}
AbstractFSNode *ChRootFilesystemFactory::makeRootFileNode() const {
diff --git a/backends/fs/chroot/chroot-fs-factory.h b/backends/fs/chroot/chroot-fs-factory.h
index d3c997b..1a26410 100644
--- a/backends/fs/chroot/chroot-fs-factory.h
+++ b/backends/fs/chroot/chroot-fs-factory.h
@@ -33,14 +33,14 @@
*/
class ChRootFilesystemFactory : public FilesystemFactory {
public:
- ChRootFilesystemFactory(Common::String root);
+ ChRootFilesystemFactory(const Common::String &root);
virtual AbstractFSNode *makeRootFileNode() const;
virtual AbstractFSNode *makeCurrentDirectoryFileNode() const;
virtual AbstractFSNode *makeFileNodePath(const Common::String &path) const;
private:
- Common::String _root;
+ const Common::String _root;
};
#endif /* BACKENDS_FS_CHROOT_CHROOT_FS_FACTORY_H */
Commit: ca3c5a702f9e9e5afb46a0292142ebddd7dbd5ce
https://github.com/scummvm/scummvm/commit/ca3c5a702f9e9e5afb46a0292142ebddd7dbd5ce
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2016-01-07T10:58:26+01:00
Commit Message:
BACKENDS: Make ChRootFilesystemFactory's constructor explicit.
Changed paths:
backends/fs/chroot/chroot-fs-factory.h
diff --git a/backends/fs/chroot/chroot-fs-factory.h b/backends/fs/chroot/chroot-fs-factory.h
index 1a26410..d53e5af 100644
--- a/backends/fs/chroot/chroot-fs-factory.h
+++ b/backends/fs/chroot/chroot-fs-factory.h
@@ -33,7 +33,7 @@
*/
class ChRootFilesystemFactory : public FilesystemFactory {
public:
- ChRootFilesystemFactory(const Common::String &root);
+ explicit ChRootFilesystemFactory(const Common::String &root);
virtual AbstractFSNode *makeRootFileNode() const;
virtual AbstractFSNode *makeCurrentDirectoryFileNode() const;
Commit: ded43d795a6f0208c60c8bb8eca6f327df0a2dda
https://github.com/scummvm/scummvm/commit/ded43d795a6f0208c60c8bb8eca6f327df0a2dda
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2016-01-07T10:59:15+01:00
Commit Message:
AUDIO: Remove unused includes in fluidsynth.cpp.
Changed paths:
audio/softsynth/fluidsynth.cpp
diff --git a/audio/softsynth/fluidsynth.cpp b/audio/softsynth/fluidsynth.cpp
index 4dc4349..47f65f0 100644
--- a/audio/softsynth/fluidsynth.cpp
+++ b/audio/softsynth/fluidsynth.cpp
@@ -32,8 +32,6 @@
#include "audio/mpu401.h"
#include "audio/softsynth/emumidi.h"
#if defined(IPHONE_IOS7) && defined(IPHONE_SANDBOXED)
-#include <string.h>
-#include <sys/syslimits.h>
#include "backends/platform/ios7/ios7_common.h"
#endif
Commit: 1baf3bed7ab240f2ca0f5696b1e78dc741222ae2
https://github.com/scummvm/scummvm/commit/1baf3bed7ab240f2ca0f5696b1e78dc741222ae2
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2016-01-07T11:00:28+01:00
Commit Message:
AUDIO: Use standard line warps in iOS7 hack comment in fluidsynth.cpp.
Changed paths:
audio/softsynth/fluidsynth.cpp
diff --git a/audio/softsynth/fluidsynth.cpp b/audio/softsynth/fluidsynth.cpp
index 47f65f0..860bf5b 100644
--- a/audio/softsynth/fluidsynth.cpp
+++ b/audio/softsynth/fluidsynth.cpp
@@ -183,9 +183,10 @@ int MidiDriver_FluidSynth::open() {
const char *soundfont = ConfMan.get("soundfont").c_str();
#if defined(IPHONE_IOS7) && defined(IPHONE_SANDBOXED)
- // HACK: Due to the sandbox on non-jailbroken iOS devices, we need to deal with the chroot filesystem.
- // All the path selected by the user are relative to the Document directory. So, we need to adjust
- // the path to reflect that.
+ // HACK: Due to the sandbox on non-jailbroken iOS devices, we need to deal
+ // with the chroot filesystem. All the path selected by the user are
+ // relative to the Document directory. So, we need to adjust the path to
+ // reflect that.
Common::String soundfont_fullpath = iOS7_getDocumentsDir();
soundfont_fullpath += soundfont;
_soundFont = fluid_synth_sfload(_synth, soundfont_fullpath.c_str(), 1);
Commit: 54f5c95832921b72583144e53fa45318a60e9ff9
https://github.com/scummvm/scummvm/commit/54f5c95832921b72583144e53fa45318a60e9ff9
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2016-01-07T11:25:02+01:00
Commit Message:
COMMON: Make FSNode(AbstractFSNode *) private again.
This also fixes a memory leak in OSystem_iOS7::addSysArchivesToSearchSet.
Changed paths:
backends/fs/abstract-fs.h
backends/platform/ios7/ios7_osys_main.cpp
common/fs.h
diff --git a/backends/fs/abstract-fs.h b/backends/fs/abstract-fs.h
index 34a8120..dcfdc08 100644
--- a/backends/fs/abstract-fs.h
+++ b/backends/fs/abstract-fs.h
@@ -84,6 +84,20 @@ protected:
public:
/**
+ * Construct a FSNode object from an AbstractFSNode object.
+ *
+ * This is a helper to create Common::FSNode objects when the backend's
+ * FileSystemFactory cannot create the given AbstractFSNode object itself.
+ * All other code is supposed to use Common::FSNode's constructor itself.
+ *
+ * @param realNode Pointer to a heap allocated instance. FSNode will take
+ * ownership of the pointer.
+ */
+ static Common::FSNode makeFSNode(AbstractFSNode *realNode) {
+ return Common::FSNode(realNode);
+ }
+
+ /**
* Destructor.
*/
virtual ~AbstractFSNode() {}
diff --git a/backends/platform/ios7/ios7_osys_main.cpp b/backends/platform/ios7/ios7_osys_main.cpp
index 37fa34c..f169dbb 100644
--- a/backends/platform/ios7/ios7_osys_main.cpp
+++ b/backends/platform/ios7/ios7_osys_main.cpp
@@ -301,8 +301,7 @@ void OSystem_iOS7::addSysArchivesToSearchSet(Common::SearchSet &s, int priority)
Common::String bundlePath((const char *)buf);
#ifdef IPHONE_SANDBOXED
POSIXFilesystemNode *posixNode = new POSIXFilesystemNode(bundlePath);
- Common::FSNode *node = new Common::FSNode(posixNode);
- s.add("__IOS_BUNDLE__", new Common::FSDirectory(*node), priority);
+ s.add("__IOS_BUNDLE__", new Common::FSDirectory(AbstractFSNode::makeFSNode(posixNode)), priority);
#else
s.add("__IOS_BUNDLE__", new Common::FSDirectory(bundlePath), priority);
#endif
diff --git a/common/fs.h b/common/fs.h
index 66e9844..f516bf7 100644
--- a/common/fs.h
+++ b/common/fs.h
@@ -57,12 +57,17 @@ class FSList : public Array<FSNode> {};
*/
class FSNode : public ArchiveMember {
private:
+ friend class ::AbstractFSNode;
SharedPtr<AbstractFSNode> _realNode;
-
-public:
- // WARNING: Use this constructor with care! FSNode takes the ownership of the pointer and will delete it at some point.
+ /**
+ * Construct a FSNode from a backend's AbstractFSNode implementation.
+ *
+ * @param realNode Pointer to a heap allocated instance. FSNode will take
+ * ownership of the pointer.
+ */
FSNode(AbstractFSNode *realNode);
+public:
/**
* Flag to tell listDir() which kind of files to list.
*/
Commit: 60fa9944dc8f942212ed0c3803aa690c3014c6a5
https://github.com/scummvm/scummvm/commit/60fa9944dc8f942212ed0c3803aa690c3014c6a5
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2016-01-07T11:25:02+01:00
Commit Message:
GUI: Explain create_project HACK in module.mk a bit better.
Changed paths:
gui/module.mk
diff --git a/gui/module.mk b/gui/module.mk
index fb7c968..bbb3def 100644
--- a/gui/module.mk
+++ b/gui/module.mk
@@ -32,11 +32,14 @@ MODULE_OBJS := \
widgets/scrollbar.o \
widgets/tab.o
-# HACK: Even if it seems redundant, please keep these directives in that order!
-# This is needed by the "create_project" tool, for the OS X / iOS Xcode project.
-# The main problem is that the create_project tool scans the files for both OS X, and iOS targets.
-# It must be able to collect all the files for both targets, so that the backend can later filter
-# them for its own targets (in the Xcode terminology)
+# HACK: create_project's XCode generator relies on the following ifdef
+# structure to pick up the right browser implementations for iOS and Mac OS X.
+# Please keep it like this or XCode project generation will be broken.
+# FIXME: This only works because of a bug in how we handle ifdef statements in
+# create_project's module.mk parser. create_project will think that both
+# browser.o and browser_osx.o is built when both IPHONE and MACOSX is set.
+# When we do proper ifdef handling, only browser.o will be picked up, breaking
+# XCode generation.
ifdef IPHONE
MODULE_OBJS += \
browser.o
More information about the Scummvm-git-logs
mailing list