[Scummvm-cvs-logs] scummvm master -> 2067bec18e905e62ae1110e8b58b1178b6800c6c

lordhoto lordhoto at gmail.com
Sun Jun 19 19:38:01 CEST 2011


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

Summary:
2067bec18e SDL: Remove left over traces from the time the SdlEventSource subclassed DefaultEventManager.


Commit: 2067bec18e905e62ae1110e8b58b1178b6800c6c
    https://github.com/scummvm/scummvm/commit/2067bec18e905e62ae1110e8b58b1178b6800c6c
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2011-06-19T10:35:27-07:00

Commit Message:
SDL: Remove left over traces from the time the SdlEventSource subclassed DefaultEventManager.

Changed paths:
    backends/events/sdl/sdl-events.h
    backends/platform/sdl/sdl.cpp



diff --git a/backends/events/sdl/sdl-events.h b/backends/events/sdl/sdl-events.h
index 227d6e1..9b9d265 100644
--- a/backends/events/sdl/sdl-events.h
+++ b/backends/events/sdl/sdl-events.h
@@ -20,13 +20,13 @@
  *
  */
 
-#if !defined(BACKEND_EVENTS_SDL_H) && !defined(DISABLE_DEFAULT_EVENTMANAGER)
+#ifndef BACKEND_EVENTS_SDL_H
 #define BACKEND_EVENTS_SDL_H
 
-#include "backends/events/default/default-events.h"
-
 #include "backends/platform/sdl/sdl-sys.h"
 
+#include "common/events.h"
+
 
 /**
  * The SDL event source.
diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp
index e36878d..7b24ebe 100644
--- a/backends/platform/sdl/sdl.cpp
+++ b/backends/platform/sdl/sdl.cpp
@@ -172,22 +172,6 @@ void OSystem_SDL::initBackend() {
 		}
 	}
 
-	// Creates the backend managers, if they don't exist yet (we check
-	// for this to allow subclasses to provide their own).
-	if (_eventManager == 0)
-		_eventManager = new DefaultEventManager(_eventSource);
-
-	// We have to initialize the graphics manager before the event manager
-	// so the virtual keyboard can be initialized, but we have to add the
-	// graphics manager as an event observer after initializing the event
-	// manager.
-	if (graphicsManagerType == 0)
-		((SdlGraphicsManager *)_graphicsManager)->initEventObserver();
-#ifdef USE_OPENGL
-	else if (graphicsManagerType == 1)
-		((OpenGLSdlGraphicsManager *)_graphicsManager)->initEventObserver();
-#endif
-
 	if (_savefileManager == 0)
 		_savefileManager = new DefaultSaveFileManager();
 
@@ -207,6 +191,18 @@ void OSystem_SDL::initBackend() {
 	_inited = true;
 
 	ModularBackend::initBackend();
+
+	// We have to initialize the graphics manager before the event manager
+	// so the virtual keyboard can be initialized, but we have to add the
+	// graphics manager as an event observer after initializing the event
+	// manager.
+	if (graphicsManagerType == 0)
+		((SdlGraphicsManager *)_graphicsManager)->initEventObserver();
+#ifdef USE_OPENGL
+	else if (graphicsManagerType == 1)
+		((OpenGLSdlGraphicsManager *)_graphicsManager)->initEventObserver();
+#endif
+
 }
 
 void OSystem_SDL::initSDL() {






More information about the Scummvm-git-logs mailing list