From 08a3376ba7bdcd262131eafa5ae5e4e8a4ecf18d Mon Sep 17 00:00:00 2001 From: vanfanel Date: Tue, 27 Jan 2015 17:58:08 +0100 Subject: RASPBERRYPI: Added Raspberry Pi native 2D API support (dispmanx) --- backends/platform/sdl/raspberrypi/raspberrypi.cpp | 42 +++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 backends/platform/sdl/raspberrypi/raspberrypi.cpp (limited to 'backends/platform/sdl/raspberrypi/raspberrypi.cpp') diff --git a/backends/platform/sdl/raspberrypi/raspberrypi.cpp b/backends/platform/sdl/raspberrypi/raspberrypi.cpp new file mode 100644 index 0000000000..2405dfaf43 --- /dev/null +++ b/backends/platform/sdl/raspberrypi/raspberrypi.cpp @@ -0,0 +1,42 @@ +/* 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(RASPBERRYPI) + +#include "backends/platform/sdl/raspberrypi/raspberrypi.h" +#include "backends/graphics/dispmanxsdl/dispmanxsdl-graphics.h" + +void OSystem_SDL_RaspberryPi::initBackend() { + // Create the events manager + if (_eventSource == 0) + _eventSource = new SdlEventSource(); + + // Create the graphics manager + if (_graphicsManager == 0) { + _graphicsManager = new DispmanXSdlGraphicsManager(_eventSource); + } + + // Call parent implementation of this method + OSystem_POSIX::initBackend(); +} + +#endif -- cgit v1.2.3 From c362119572228721e45087d1a835231512b8edab Mon Sep 17 00:00:00 2001 From: vanfanel Date: Sun, 18 Oct 2015 20:25:53 +0200 Subject: SDL/DISPMANX Renamed the RASBERRYPI define to the less confusing name of DISPMANX because it controls whether dispmanx rendering backend is enabled or not on the Raspberry Pi. --- backends/platform/sdl/raspberrypi/raspberrypi.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'backends/platform/sdl/raspberrypi/raspberrypi.cpp') diff --git a/backends/platform/sdl/raspberrypi/raspberrypi.cpp b/backends/platform/sdl/raspberrypi/raspberrypi.cpp index 2405dfaf43..a3f79fd5b3 100644 --- a/backends/platform/sdl/raspberrypi/raspberrypi.cpp +++ b/backends/platform/sdl/raspberrypi/raspberrypi.cpp @@ -20,7 +20,7 @@ * */ -#if defined(RASPBERRYPI) +#if defined(DISPMANX) #include "backends/platform/sdl/raspberrypi/raspberrypi.h" #include "backends/graphics/dispmanxsdl/dispmanxsdl-graphics.h" -- cgit v1.2.3 From 9d831d0c428df4f21272a3b7df2d1016f657b63f Mon Sep 17 00:00:00 2001 From: vanfanel Date: Thu, 12 Nov 2015 14:03:14 +0100 Subject: SDL/DISPMANX Fixed small issues with merging: Use append_var, fix spacing issues and changed SurfaceSdlGraphicsManager constructor call parameters on DispmanXSdlGraphicsManager constructor. --- backends/platform/sdl/raspberrypi/raspberrypi.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'backends/platform/sdl/raspberrypi/raspberrypi.cpp') diff --git a/backends/platform/sdl/raspberrypi/raspberrypi.cpp b/backends/platform/sdl/raspberrypi/raspberrypi.cpp index a3f79fd5b3..206203d82e 100644 --- a/backends/platform/sdl/raspberrypi/raspberrypi.cpp +++ b/backends/platform/sdl/raspberrypi/raspberrypi.cpp @@ -32,7 +32,7 @@ void OSystem_SDL_RaspberryPi::initBackend() { // Create the graphics manager if (_graphicsManager == 0) { - _graphicsManager = new DispmanXSdlGraphicsManager(_eventSource); + _graphicsManager = new DispmanXSdlGraphicsManager(_eventSource, _window); } // Call parent implementation of this method -- cgit v1.2.3