aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics
diff options
context:
space:
mode:
authorChris Warren-Smith2011-08-07 21:33:32 +1000
committerChris Warren-Smith2011-08-21 16:37:06 +1000
commit59739a7a0e3e4826ba7b27d5270a8d7a26b787ef (patch)
treedcf98438157963eabd0ca4499b7794548b08f5fa /backends/graphics
parentf705a9b2865a3379b3423c7cc929086eee17a4f1 (diff)
downloadscummvm-rg350-59739a7a0e3e4826ba7b27d5270a8d7a26b787ef.tar.gz
scummvm-rg350-59739a7a0e3e4826ba7b27d5270a8d7a26b787ef.tar.bz2
scummvm-rg350-59739a7a0e3e4826ba7b27d5270a8d7a26b787ef.zip
BADA: Initial BADA port implementation
Diffstat (limited to 'backends/graphics')
-rw-r--r--backends/graphics/opengl/gltexture.h7
-rw-r--r--backends/graphics/opengl/opengl-graphics.cpp6
-rw-r--r--backends/graphics/opengl/opengl-graphics.h6
3 files changed, 16 insertions, 3 deletions
diff --git a/backends/graphics/opengl/gltexture.h b/backends/graphics/opengl/gltexture.h
index 2f0bef2bbf..f1c77073a4 100644
--- a/backends/graphics/opengl/gltexture.h
+++ b/backends/graphics/opengl/gltexture.h
@@ -25,7 +25,7 @@
#include "common/scummsys.h"
-#ifdef WIN32
+#if defined(WIN32) && !defined(BADA)
#if defined(ARRAYSIZE) && !defined(_WINDOWS_)
#undef ARRAYSIZE
#endif
@@ -44,7 +44,10 @@
#define ARRAYSIZE(x) ((int)(sizeof(x) / sizeof(x[0])))
#endif
-#if defined(USE_GLES)
+#if defined(BADA)
+#include <FGraphicsOpengl.h>
+using namespace Osp::Graphics::Opengl;
+#elif defined(USE_GLES)
#include <GLES/gl.h>
#elif defined(SDL_BACKEND)
#include <SDL_opengl.h>
diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp
index 40ef17e477..d80ac8050e 100644
--- a/backends/graphics/opengl/opengl-graphics.cpp
+++ b/backends/graphics/opengl/opengl-graphics.cpp
@@ -1348,9 +1348,13 @@ const char *OpenGLGraphicsManager::getCurrentModeName() {
}
#ifdef USE_OSD
+const Graphics::Font* getFontOSD() {
+ return FontMan.getFontByUsage(Graphics::FontManager::kLocalizedFont);
+}
+
void OpenGLGraphicsManager::updateOSD() {
// The font we are going to use:
- const Graphics::Font *font = FontMan.getFontByUsage(Graphics::FontManager::kLocalizedFont);
+ const Graphics::Font *font = getFontOSD();
if (_osdSurface.w != _osdTexture->getWidth() || _osdSurface.h != _osdTexture->getHeight())
_osdSurface.create(_osdTexture->getWidth(), _osdTexture->getHeight(), _overlayFormat);
diff --git a/backends/graphics/opengl/opengl-graphics.h b/backends/graphics/opengl/opengl-graphics.h
index 42cfbacc85..1202cf0343 100644
--- a/backends/graphics/opengl/opengl-graphics.h
+++ b/backends/graphics/opengl/opengl-graphics.h
@@ -27,6 +27,7 @@
#include "backends/graphics/graphics.h"
#include "common/array.h"
#include "common/rect.h"
+#include "graphics/font.h"
#include "graphics/pixelformat.h"
// Uncomment this to enable the 'on screen display' code.
@@ -315,6 +316,11 @@ protected:
*/
Common::Array<Common::String> _osdLines;
+ /**
+ * Returns the font used for on screen display
+ */
+ virtual const Graphics::Font* getFontOSD();
+
/**
* Update the OSD texture / surface.
*/