[Scummvm-cvs-logs] scummvm master -> 9a0ba7124fe6faee0d4c89ca10964df18740f105

djwillis John.Willis at Distant-earth.com
Sun Jul 29 22:35:19 CEST 2012


This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
3b6398cd40 GPH: Clean up initialisation code and start event manager after log files are setup (if needed).
9c2018c5a8 OPENPANDORA: Start event manager after log files are setup (if needed).
53a066d099 GPH: Use SDLPluginProvider not POSIXPluginProvider.
9a0ba7124f OPENPANDORA: Cleanup.


Commit: 3b6398cd40838b7b2679eb597d453e3e81b1e6ef
    https://github.com/scummvm/scummvm/commit/3b6398cd40838b7b2679eb597d453e3e81b1e6ef
Author: David-John Willis (John.Willis at Distant-earth.com)
Date: 2012-07-29T13:15:27-07:00

Commit Message:
GPH: Clean up initialisation code and start event manager after log files are setup (if needed).

Changed paths:
    backends/platform/gph/gph-backend.cpp
    backends/platform/gph/gph.h



diff --git a/backends/platform/gph/gph-backend.cpp b/backends/platform/gph/gph-backend.cpp
index 49a1edf..485780b 100644
--- a/backends/platform/gph/gph-backend.cpp
+++ b/backends/platform/gph/gph-backend.cpp
@@ -20,6 +20,8 @@
  *
  */
 
+#if defined(GPH_DEVICE)
+
 // Disable symbol overrides so that we can use system headers.
 #define FORBIDDEN_SYMBOL_ALLOW_ALL
 
@@ -32,8 +34,6 @@
 #include "backends/saves/default/default-saves.h"
 #include "backends/timer/default/default-timer.h"
 
-#include "base/main.h"
-
 #include "common/archive.h"
 #include "common/config-manager.h"
 #include "common/debug.h"
@@ -64,23 +64,6 @@ void OSystem_GPH::initBackend() {
 
 	assert(!_inited);
 
-	// Create the events manager
-	if (_eventSource == 0)
-		_eventSource = new GPHEventSource();
-
-	// Create the graphics manager
-	if (_graphicsManager == 0) {
-		_graphicsManager = new GPHGraphicsManager(_eventSource);
-	}
-
-	// Create the mixer manager
-	if (_mixer == 0) {
-		_mixerManager = new DoubleBufferSDLMixerManager();
-
-		// Setup and start mixer
-		_mixerManager->init();
-	}
-
 	/* Setup default save path to be workingdir/saves */
 
 	char savePath[PATH_MAX+1];
@@ -165,16 +148,42 @@ void OSystem_GPH::initBackend() {
 	/* Make sure that aspect ratio correction is enabled on the 1st run to stop
 	   users asking me what the 'wasted space' at the bottom is ;-). */
 	ConfMan.registerDefault("aspect_ratio", true);
+	ConfMan.registerDefault("fullscreen", true);
 
 	/* Make sure SDL knows that we have a joystick we want to use. */
 	ConfMan.setInt("joystick_num", 0);
 
+	// Create the events manager
+	if (_eventSource == 0)
+		_eventSource = new GPHEventSource();
+
+	// Create the graphics manager
+	if (_graphicsManager == 0) {
+		_graphicsManager = new GPHGraphicsManager(_eventSource);
+	}
+
 	/* Pass to POSIX method to do the heavy lifting */
 	OSystem_POSIX::initBackend();
 
 	_inited = true;
 }
 
+void OSystem_GPH::initSDL() {
+	// Check if SDL has not been initialized
+	if (!_initedSDL) {
+
+		uint32 sdlFlags = SDL_INIT_EVENTTHREAD;
+		if (ConfMan.hasKey("disable_sdl_parachute"))
+			sdlFlags |= SDL_INIT_NOPARACHUTE;
+
+		// Initialize SDL (SDL Subsystems are initiliazed in the corresponding sdl managers)
+		if (SDL_Init(sdlFlags) == -1)
+			error("Could not initialize SDL: %s", SDL_GetError());
+
+		_initedSDL = true;
+	}
+}
+
 void OSystem_GPH::addSysArchivesToSearchSet(Common::SearchSet &s, int priority) {
 
 	/* Setup default extra data paths for engine data files and plugins */
@@ -222,3 +231,5 @@ void OSystem_GPH::quit() {
 
 	OSystem_POSIX::quit();
 }
+
+#endif
diff --git a/backends/platform/gph/gph.h b/backends/platform/gph/gph.h
index 80f43f0..90a7981 100644
--- a/backends/platform/gph/gph.h
+++ b/backends/platform/gph/gph.h
@@ -26,13 +26,11 @@
 #if defined(GPH_DEVICE)
 
 #include "backends/base-backend.h"
-#include "backends/platform/sdl/sdl.h"
+#include "backends/platform/sdl/sdl-sys.h"
 #include "backends/platform/sdl/posix/posix.h"
 #include "backends/events/gph/gph-events.h"
 #include "backends/graphics/gph/gph-graphics.h"
 
-#define __GP2XWIZ__
-
 #ifndef PATH_MAX
 #define PATH_MAX 255
 #endif
@@ -45,6 +43,11 @@ public:
 	void addSysArchivesToSearchSet(Common::SearchSet &s, int priority);
 	void initBackend();
 	void quit();
+
+protected:
+	bool _inited;
+	bool _initedSDL;
+	virtual void initSDL();
 };
 
 #endif


Commit: 9c2018c5a890c5276249f2b93be274a564efd7bb
    https://github.com/scummvm/scummvm/commit/9c2018c5a890c5276249f2b93be274a564efd7bb
Author: David-John Willis (John.Willis at Distant-earth.com)
Date: 2012-07-29T13:15:28-07:00

Commit Message:
OPENPANDORA: Start event manager after log files are setup (if needed).

Changed paths:
    backends/platform/openpandora/op-backend.cpp



diff --git a/backends/platform/openpandora/op-backend.cpp b/backends/platform/openpandora/op-backend.cpp
index b2d53f9..354aa24 100644
--- a/backends/platform/openpandora/op-backend.cpp
+++ b/backends/platform/openpandora/op-backend.cpp
@@ -63,15 +63,6 @@ void OSystem_OP::initBackend() {
 
 	assert(!_inited);
 
-	// Create the events manager
-	if (_eventSource == 0)
-		_eventSource = new OPEventSource();
-
-	// Create the graphics manager
-	if (_graphicsManager == 0) {
-		_graphicsManager = new OPGraphicsManager(_eventSource);
-	}
-
 	/* Setup default save path to be workingdir/saves */
 
 	char savePath[PATH_MAX+1];
@@ -150,6 +141,15 @@ void OSystem_OP::initBackend() {
 	/* Make sure SDL knows that we have a joystick we want to use. */
 	ConfMan.setInt("joystick_num", 0);
 
+	// Create the events manager
+	if (_eventSource == 0)
+		_eventSource = new OPEventSource();
+
+	// Create the graphics manager
+	if (_graphicsManager == 0) {
+		_graphicsManager = new OPGraphicsManager(_eventSource);
+	}
+
 	/* Pass to POSIX method to do the heavy lifting */
 	OSystem_POSIX::initBackend();
 


Commit: 53a066d09954c78d783f72690e4d523107926939
    https://github.com/scummvm/scummvm/commit/53a066d09954c78d783f72690e4d523107926939
Author: David-John Willis (John.Willis at Distant-earth.com)
Date: 2012-07-29T13:15:28-07:00

Commit Message:
GPH: Use SDLPluginProvider not POSIXPluginProvider.

Changed paths:
    backends/platform/gph/gph-main.cpp



diff --git a/backends/platform/gph/gph-main.cpp b/backends/platform/gph/gph-main.cpp
index 2c43af1..876de0f 100644
--- a/backends/platform/gph/gph-main.cpp
+++ b/backends/platform/gph/gph-main.cpp
@@ -21,7 +21,7 @@
  */
 
 #include "backends/platform/gph/gph.h"
-#include "backends/plugins/posix/posix-provider.h"
+#include "backends/plugins/sdl/sdl-provider.h"
 #include "base/main.h"
 
 #if defined(GPH_DEVICE)
@@ -36,7 +36,7 @@ int main(int argc, char *argv[]) {
 	((OSystem_GPH *)g_system)->init();
 
 #ifdef DYNAMIC_MODULES
-	PluginManager::instance().addPluginProvider(new POSIXPluginProvider());
+	PluginManager::instance().addPluginProvider(new SDLPluginProvider());
 #endif
 
 	// Invoke the actual ScummVM main entry point:


Commit: 9a0ba7124fe6faee0d4c89ca10964df18740f105
    https://github.com/scummvm/scummvm/commit/9a0ba7124fe6faee0d4c89ca10964df18740f105
Author: David-John Willis (John.Willis at Distant-earth.com)
Date: 2012-07-29T13:15:28-07:00

Commit Message:
OPENPANDORA: Cleanup.

Changed paths:
    backends/platform/openpandora/op-sdl.h



diff --git a/backends/platform/openpandora/op-sdl.h b/backends/platform/openpandora/op-sdl.h
index 8cccbb5..1eddad5 100644
--- a/backends/platform/openpandora/op-sdl.h
+++ b/backends/platform/openpandora/op-sdl.h
@@ -31,8 +31,6 @@
 #include "backends/events/openpandora/op-events.h"
 #include "backends/graphics/openpandora/op-graphics.h"
 
-//#define MIXER_DOUBLE_BUFFERING 1
-
 #ifndef PATH_MAX
 #define PATH_MAX 255
 #endif






More information about the Scummvm-git-logs mailing list