[Scummvm-cvs-logs] SF.net SVN: scummvm:[53435] scummvm/branches/gsoc2010-opengl/backends
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Wed Oct 13 17:42:53 CEST 2010
Revision: 53435
http://scummvm.svn.sourceforge.net/scummvm/?rev=53435&view=rev
Author: lordhoto
Date: 2010-10-13 15:42:53 +0000 (Wed, 13 Oct 2010)
Log Message:
-----------
OPENGL: Get rid of one ugly cast.
Modified Paths:
--------------
scummvm/branches/gsoc2010-opengl/backends/graphics/sdl/sdl-graphics.cpp
scummvm/branches/gsoc2010-opengl/backends/graphics/sdl/sdl-graphics.h
scummvm/branches/gsoc2010-opengl/backends/platform/sdl/sdl.cpp
Modified: scummvm/branches/gsoc2010-opengl/backends/graphics/sdl/sdl-graphics.cpp
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/graphics/sdl/sdl-graphics.cpp 2010-10-13 15:42:33 UTC (rev 53434)
+++ scummvm/branches/gsoc2010-opengl/backends/graphics/sdl/sdl-graphics.cpp 2010-10-13 15:42:53 UTC (rev 53435)
@@ -120,8 +120,9 @@
}
#endif
-SdlGraphicsManager::SdlGraphicsManager()
+SdlGraphicsManager::SdlGraphicsManager(SdlEventSource *sdlEventSource)
:
+ _sdlEventSource(sdlEventSource),
#ifdef USE_OSD
_osdSurface(0), _osdAlpha(SDL_ALPHA_TRANSPARENT), _osdFadeStartTime(0),
#endif
@@ -821,7 +822,7 @@
SDL_SetColorKey(_osdSurface, SDL_RLEACCEL | SDL_SRCCOLORKEY | SDL_SRCALPHA, kOSDColorKey);
#endif
- ((SdlEventSource *)g_system)->resetKeyboadEmulation(
+ _sdlEventSource->resetKeyboadEmulation(
_videoMode.screenWidth * _videoMode.scaleFactor - 1,
effectiveScreenHeight() - 1);
Modified: scummvm/branches/gsoc2010-opengl/backends/graphics/sdl/sdl-graphics.h
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/graphics/sdl/sdl-graphics.h 2010-10-13 15:42:33 UTC (rev 53434)
+++ scummvm/branches/gsoc2010-opengl/backends/graphics/sdl/sdl-graphics.h 2010-10-13 15:42:53 UTC (rev 53435)
@@ -31,6 +31,8 @@
#include "common/events.h"
#include "common/system.h"
+#include "backends/events/sdl/sdl-events.h"
+
#if defined(__SYMBIAN32__)
#include <esdl\SDL.h>
#else
@@ -75,7 +77,7 @@
*/
class SdlGraphicsManager : public GraphicsManager, public Common::EventObserver {
public:
- SdlGraphicsManager();
+ SdlGraphicsManager(SdlEventSource *sdlEventSource);
virtual ~SdlGraphicsManager();
virtual void initEventObserver();
@@ -136,6 +138,8 @@
bool notifyEvent(const Common::Event &event);
protected:
+ SdlEventSource *_sdlEventSource;
+
#ifdef USE_OSD
/** Surface containing the OSD message */
SDL_Surface *_osdSurface;
Modified: scummvm/branches/gsoc2010-opengl/backends/platform/sdl/sdl.cpp
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/platform/sdl/sdl.cpp 2010-10-13 15:42:33 UTC (rev 53434)
+++ scummvm/branches/gsoc2010-opengl/backends/platform/sdl/sdl.cpp 2010-10-13 15:42:53 UTC (rev 53435)
@@ -104,7 +104,7 @@
}
#endif
if (_graphicsManager == 0) {
- _graphicsManager = new SdlGraphicsManager();
+ _graphicsManager = new SdlGraphicsManager(this);
graphicsManagerType = 0;
}
}
@@ -352,7 +352,7 @@
// manager, delete and create the new mode graphics manager
if (_graphicsMode >= _sdlModesCount && mode < _sdlModesCount) {
delete _graphicsManager;
- _graphicsManager = new SdlGraphicsManager();
+ _graphicsManager = new SdlGraphicsManager(this);
((SdlGraphicsManager *)_graphicsManager)->initEventObserver();
_graphicsManager->beginGFXTransaction();
} else if (_graphicsMode < _sdlModesCount && mode >= _sdlModesCount) {
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