MAEMO: Add basic graphics manager

This commit is contained in:
Tarek Soliman 2011-11-29 13:38:17 -06:00
parent 0192d2f2de
commit 29c0386f2c
4 changed files with 77 additions and 1 deletions

View file

@ -0,0 +1,34 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#if defined(MAEMO)
#include "common/scummsys.h"
#include "backends/platform/maemo/maemo.h"
#include "backends/events/maemosdl/maemosdl-events.h"
#include "backends/graphics/maemosdl/maemosdl-graphics.h"
MaemoSdlGraphicsManager::MaemoSdlGraphicsManager(SdlEventSource *sdlEventSource)
: SurfaceSdlGraphicsManager(sdlEventSource) {
}
#endif

View file

@ -0,0 +1,37 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#if defined(MAEMO)
#ifndef BACKENDS_GRAPHICS_MAEMOSDL_GRAPHICS_H
#define BACKENDS_GRAPHICS_MAEMOSDL_GRAPHICS_H
#include "backends/graphics/surfacesdl/surfacesdl-graphics.h"
class MaemoSdlGraphicsManager : public SurfaceSdlGraphicsManager {
public:
MaemoSdlGraphicsManager(SdlEventSource *sdlEventSource);
};
#endif
#endif

View file

@ -149,7 +149,8 @@ endif
ifeq ($(BACKEND),maemo) ifeq ($(BACKEND),maemo)
MODULE_OBJS += \ MODULE_OBJS += \
events/maemosdl/maemosdl-events.o events/maemosdl/maemosdl-events.o \
graphics/maemosdl/maemosdl-graphics.o
endif endif
ifeq ($(BACKEND),n64) ifeq ($(BACKEND),n64)

View file

@ -29,6 +29,7 @@
#include "backends/platform/maemo/maemo.h" #include "backends/platform/maemo/maemo.h"
#include "backends/events/maemosdl/maemosdl-events.h" #include "backends/events/maemosdl/maemosdl-events.h"
#include "backends/graphics/maemosdl/maemosdl-graphics.h"
#include "common/textconsole.h" #include "common/textconsole.h"
@ -47,6 +48,9 @@ void OSystem_SDL_Maemo::initBackend() {
if (_eventSource == 0) if (_eventSource == 0)
_eventSource = new MaemoSdlEventSource(); _eventSource = new MaemoSdlEventSource();
if (_graphicsManager == 0)
_graphicsManager = new MaemoSdlGraphicsManager(_eventSource);
ConfMan.set("vkeybdpath", DATA_PATH); ConfMan.set("vkeybdpath", DATA_PATH);
_model = Model(detectModel()); _model = Model(detectModel());