[Scummvm-cvs-logs] SF.net SVN: scummvm:[39961] scummvm/trunk/backends/platform/gp2x

djwillis at users.sourceforge.net djwillis at users.sourceforge.net
Thu Apr 16 13:19:45 CEST 2009


Revision: 39961
          http://scummvm.svn.sourceforge.net/scummvm/?rev=39961&view=rev
Author:   djwillis
Date:     2009-04-16 11:19:44 +0000 (Thu, 16 Apr 2009)

Log Message:
-----------
Backout previous 'ooops' change (while shaking a stick at SVN and trying to convince people (badly) that is was not just simple user error ;-)).

Modified Paths:
--------------
    scummvm/trunk/backends/platform/gp2x/build/README-GP2X
    scummvm/trunk/backends/platform/gp2x/build/README-GP2X.html
    scummvm/trunk/backends/platform/gp2x/gp2x-common.h
    scummvm/trunk/backends/platform/gp2x/gp2x.cpp
    scummvm/trunk/backends/platform/gp2x/graphics.cpp

Modified: scummvm/trunk/backends/platform/gp2x/build/README-GP2X
===================================================================
--- scummvm/trunk/backends/platform/gp2x/build/README-GP2X	2009-04-16 10:40:14 UTC (rev 39960)
+++ scummvm/trunk/backends/platform/gp2x/build/README-GP2X	2009-04-16 11:19:44 UTC (rev 39961)
@@ -23,10 +23,20 @@
 This is the readme for the offficial GP2X ScummVM backend (also known as
 the GP2X port).
 
+This is an SVN test release of ScummVM for the GP2X, it would be
+appreciated if this SVN test distribution was not mirrored and that
+people be directed to http://www.distant-earth.com/scummvm instead for
+updated SVN builds.
+
 Full supported official releases of the GP2X ScummVM backend are made in
 line with main official releases and are avalalble from the ScummVM
 downloads page <http://www.scummvm.org/downloads.php>.
 
+This build is in an active state of development and as such no
+?expected? behavior can be guaranteed ;).
+
+SVN builds are quickly tested with firmware 2.0.0 for reference.
+
 Please refer to the GP2X ScummVM forum
 <http://forums.scummvm.org/viewforum.php?f=14> and WiKi
 <http://wiki.scummvm.org/index.php/GP2X> for the latest information on

Modified: scummvm/trunk/backends/platform/gp2x/build/README-GP2X.html
===================================================================
--- scummvm/trunk/backends/platform/gp2x/build/README-GP2X.html	2009-04-16 10:40:14 UTC (rev 39960)
+++ scummvm/trunk/backends/platform/gp2x/build/README-GP2X.html	2009-04-16 11:19:44 UTC (rev 39961)
@@ -62,11 +62,29 @@
 
 <br>
 
+This is an SVN test release of ScummVM for the GP2X, it would be
+appreciated
+if this SVN test distribution was not mirrored and that people be
+directed to <a href="http://www.distant-earth.com/scummvm">http://www.distant-earth.com/scummvm</a>
+instead for updated SVN builds.<br>
+
+<br>
+
 Full supported official releases of the GP2X ScummVM backend are made
 in line with main official releases and are avalalble from the <a href="http://www.scummvm.org/downloads.php">ScummVM
 downloads page</a>.<br>
+
 <br>
 
+This build is in an active state of development and as such no
+‘expected’ behavior can be guaranteed ;).<br>
+
+<br>
+
+SVN builds are quickly tested with firmware 2.0.0 for reference.<br>
+
+<br>
+
 Please refer to the <a href="http://forums.scummvm.org/viewforum.php?f=14">GP2X
 ScummVM forum</a> and <a href="http://wiki.scummvm.org/index.php/GP2X">WiKi</a>
 for the latest information on the port.<br>

Modified: scummvm/trunk/backends/platform/gp2x/gp2x-common.h
===================================================================
--- scummvm/trunk/backends/platform/gp2x/gp2x-common.h	2009-04-16 10:40:14 UTC (rev 39960)
+++ scummvm/trunk/backends/platform/gp2x/gp2x-common.h	2009-04-16 11:19:44 UTC (rev 39961)
@@ -29,16 +29,14 @@
 #include <SDL.h>
 #include <SDL_gp2x.h>
 
-#include "common/scummsys.h"
-#include "common/system.h"
+#include "backends/base-backend.h"
 #include "graphics/scaler.h"
 
 #define __GP2X__
 #define USE_OSD
-/* #define DISABLE_SCALERS
-#define MIXER_DOUBLE_BUFFERING 1 */
+/* #define DISABLE_SCALERS */
+#define MIXER_DOUBLE_BUFFERING 1
 
-
 namespace Audio {
 	class MixerImpl;
 }
@@ -59,7 +57,7 @@
 };
 
 
-class OSystem_GP2X : public OSystem {
+class OSystem_GP2X : public BaseBackend {
 public:
 	OSystem_GP2X();
 	virtual ~OSystem_GP2X();
@@ -189,8 +187,8 @@
 	virtual FilesystemFactory *getFilesystemFactory();
 	virtual void addSysArchivesToSearchSet(Common::SearchSet &s, int priority = 0);
 
-	virtual Common::SeekableReadStream *openConfigFileForReading();
-	virtual Common::WriteStream *openConfigFileForWriting();
+	virtual Common::SeekableReadStream *createConfigReadStream();
+	virtual Common::WriteStream *createConfigWriteStream();
 
 protected:
 	bool _inited;
@@ -285,6 +283,7 @@
 
 	enum {
 		NUM_DIRTY_RECT = 100,
+
 		MAX_MOUSE_W = 80,
 		MAX_MOUSE_H = 80,
 		MAX_SCALING = 3

Modified: scummvm/trunk/backends/platform/gp2x/gp2x.cpp
===================================================================
--- scummvm/trunk/backends/platform/gp2x/gp2x.cpp	2009-04-16 10:40:14 UTC (rev 39960)
+++ scummvm/trunk/backends/platform/gp2x/gp2x.cpp	2009-04-16 11:19:44 UTC (rev 39961)
@@ -37,6 +37,7 @@
 #include "common/events.h"
 #include "common/util.h"
 
+#include "common/debug.h"
 #include "common/file.h"
 #include "base/main.h"
 
@@ -376,6 +377,22 @@
 	}
 #endif
 
+#if defined(MACOSX) || defined(IPHONE)
+	// Get URL of the Resource directory of the .app bundle
+	CFURLRef fileUrl = CFBundleCopyResourcesDirectoryURL(CFBundleGetMainBundle());
+	if (fileUrl) {
+		// Try to convert the URL to an absolute path
+		UInt8 buf[MAXPATHLEN];
+		if (CFURLGetFileSystemRepresentation(fileUrl, true, buf, sizeof(buf))) {
+			// Success: Add it to the search path
+			Common::String bundlePath((const char *)buf);
+			s.add("__OSX_BUNDLE__", new Common::FSDirectory(bundlePath), priority);
+		}
+		CFRelease(fileUrl);
+	}
+
+#endif
+
 }
 
 static Common::String getDefaultConfigFileName() {
@@ -384,14 +401,14 @@
 	return configFile;
 }
 
-Common::SeekableReadStream *OSystem_GP2X::openConfigFileForReading() {
+Common::SeekableReadStream *OSystem_GP2X::createConfigReadStream() {
 	Common::FSNode file(getDefaultConfigFileName());
-	return file.openForReading();
+	return file.createReadStream();
 }
 
-Common::WriteStream *OSystem_GP2X::openConfigFileForWriting() {
+Common::WriteStream *OSystem_GP2X::createConfigWriteStream() {
 	Common::FSNode file(getDefaultConfigFileName());
-	return file.openForWriting();
+	return file.createWriteStream();
 }
 
 bool OSystem_GP2X::hasFeature(Feature f) {

Modified: scummvm/trunk/backends/platform/gp2x/graphics.cpp
===================================================================
--- scummvm/trunk/backends/platform/gp2x/graphics.cpp	2009-04-16 10:40:14 UTC (rev 39960)
+++ scummvm/trunk/backends/platform/gp2x/graphics.cpp	2009-04-16 11:19:44 UTC (rev 39961)
@@ -739,18 +739,18 @@
 }
 
 void OSystem_GP2X::setAspectRatioCorrection(bool enable) {
-
 	if ((_videoMode.screenHeight == 200 && _videoMode.aspectRatio != enable) ||
 		_transactionMode == kTransactionActive) {
+
 		Common::StackLock lock(_graphicsMutex);
-	}
 
-	if (_oldVideoMode.setup && _oldVideoMode.aspectRatio == enable)
-		return;
+		if (_oldVideoMode.setup && _oldVideoMode.aspectRatio == enable)
+			return;
 
-	if (_transactionMode == kTransactionActive) {
-		_videoMode.aspectRatio = enable;
-		_transactionDetails.needHotswap = true;
+		if (_transactionMode == kTransactionActive) {
+			_videoMode.aspectRatio = enable;
+			_transactionDetails.needHotswap = true;
+		}
 	}
 }
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list