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

djwillis at users.sourceforge.net djwillis at users.sourceforge.net
Thu Apr 16 12:40:14 CEST 2009


Revision: 39960
          http://scummvm.svn.sourceforge.net/scummvm/?rev=39960&view=rev
Author:   djwillis
Date:     2009-04-16 10:40:14 +0000 (Thu, 16 Apr 2009)

Log Message:
-----------
Push local cleanup into the 0.13 branch in prep. for 0.13.1.

Modified Paths:
--------------
    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/gp2x-common.h
===================================================================
--- scummvm/trunk/backends/platform/gp2x/gp2x-common.h	2009-04-16 10:28:12 UTC (rev 39959)
+++ scummvm/trunk/backends/platform/gp2x/gp2x-common.h	2009-04-16 10:40:14 UTC (rev 39960)
@@ -29,14 +29,16 @@
 #include <SDL.h>
 #include <SDL_gp2x.h>
 
-#include "backends/base-backend.h"
+#include "common/scummsys.h"
+#include "common/system.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;
 }
@@ -57,7 +59,7 @@
 };
 
 
-class OSystem_GP2X : public BaseBackend {
+class OSystem_GP2X : public OSystem {
 public:
 	OSystem_GP2X();
 	virtual ~OSystem_GP2X();
@@ -187,8 +189,8 @@
 	virtual FilesystemFactory *getFilesystemFactory();
 	virtual void addSysArchivesToSearchSet(Common::SearchSet &s, int priority = 0);
 
-	virtual Common::SeekableReadStream *createConfigReadStream();
-	virtual Common::WriteStream *createConfigWriteStream();
+	virtual Common::SeekableReadStream *openConfigFileForReading();
+	virtual Common::WriteStream *openConfigFileForWriting();
 
 protected:
 	bool _inited;
@@ -283,7 +285,6 @@
 
 	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:28:12 UTC (rev 39959)
+++ scummvm/trunk/backends/platform/gp2x/gp2x.cpp	2009-04-16 10:40:14 UTC (rev 39960)
@@ -37,7 +37,6 @@
 #include "common/events.h"
 #include "common/util.h"
 
-#include "common/debug.h"
 #include "common/file.h"
 #include "base/main.h"
 
@@ -377,22 +376,6 @@
 	}
 #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() {
@@ -401,14 +384,14 @@
 	return configFile;
 }
 
-Common::SeekableReadStream *OSystem_GP2X::createConfigReadStream() {
+Common::SeekableReadStream *OSystem_GP2X::openConfigFileForReading() {
 	Common::FSNode file(getDefaultConfigFileName());
-	return file.createReadStream();
+	return file.openForReading();
 }
 
-Common::WriteStream *OSystem_GP2X::createConfigWriteStream() {
+Common::WriteStream *OSystem_GP2X::openConfigFileForWriting() {
 	Common::FSNode file(getDefaultConfigFileName());
-	return file.createWriteStream();
+	return file.openForWriting();
 }
 
 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:28:12 UTC (rev 39959)
+++ scummvm/trunk/backends/platform/gp2x/graphics.cpp	2009-04-16 10:40:14 UTC (rev 39960)
@@ -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