aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorJohannes Schickel2013-10-19 19:40:10 +0200
committerJohannes Schickel2013-10-19 22:18:22 +0200
commit37f71235529f8fd4a4c90389dc6a3b41e355f4a9 (patch)
treeff15cfeeeacf024d859cc9b45db8d46119dffded /backends
parentfa90f9797c7ffb6fdd416ac2ebdde3e6dab2fb52 (diff)
downloadscummvm-rg350-37f71235529f8fd4a4c90389dc6a3b41e355f4a9.tar.gz
scummvm-rg350-37f71235529f8fd4a4c90389dc6a3b41e355f4a9.tar.bz2
scummvm-rg350-37f71235529f8fd4a4c90389dc6a3b41e355f4a9.zip
TIZEN: Add some further OpenGL related changes by Chris.
Diffstat (limited to 'backends')
-rw-r--r--backends/platform/tizen/graphics.cpp29
-rw-r--r--backends/platform/tizen/graphics.h2
-rw-r--r--backends/platform/tizen/system.cpp2
3 files changed, 18 insertions, 15 deletions
diff --git a/backends/platform/tizen/graphics.cpp b/backends/platform/tizen/graphics.cpp
index 6af0c2b37e..390796dc0e 100644
--- a/backends/platform/tizen/graphics.cpp
+++ b/backends/platform/tizen/graphics.cpp
@@ -37,6 +37,20 @@ TizenGraphicsManager::TizenGraphicsManager(TizenAppForm *appForm) :
_eglContext(EGL_NO_CONTEXT),
_initState(true) {
assert(appForm != NULL);
+}
+
+TizenGraphicsManager::~TizenGraphicsManager() {
+ logEntered();
+
+ if (_eglDisplay != EGL_NO_DISPLAY) {
+ eglMakeCurrent(_eglDisplay, NULL, NULL, NULL);
+ if (_eglContext != EGL_NO_CONTEXT) {
+ eglDestroyContext(_eglDisplay, _eglContext);
+ }
+ }
+}
+
+result TizenGraphicsManager::Construct() {
// Initialize our OpenGL ES context.
loadEgl();
@@ -51,17 +65,7 @@ TizenGraphicsManager::TizenGraphicsManager(TizenAppForm *appForm) :
_appForm->GetBounds(x, y, width, height);
AppLog("screen size: %dx%d", width, height);
setActualScreenSize(width, height);
-}
-
-TizenGraphicsManager::~TizenGraphicsManager() {
- logEntered();
-
- if (_eglDisplay != EGL_NO_DISPLAY) {
- eglMakeCurrent(_eglDisplay, NULL, NULL, NULL);
- if (_eglContext != EGL_NO_CONTEXT) {
- eglDestroyContext(_eglDisplay, _eglContext);
- }
- }
+ return E_SUCCESS;
}
const Graphics::Font *TizenGraphicsManager::getFontOSD() {
@@ -189,9 +193,6 @@ bool TizenGraphicsManager::loadEgl() {
systemError("eglMakeCurrent() failed");
return false;
}
- if (!_initState) {
- _appForm->GetVisualElement()->SetShowState(true);
- }
logLeaving();
return true;
}
diff --git a/backends/platform/tizen/graphics.h b/backends/platform/tizen/graphics.h
index 1ed8a7c653..29ba86a3c4 100644
--- a/backends/platform/tizen/graphics.h
+++ b/backends/platform/tizen/graphics.h
@@ -44,6 +44,8 @@ public:
TizenGraphicsManager(TizenAppForm *appForm);
virtual ~TizenGraphicsManager();
+ result Construct();
+
Common::List<Graphics::PixelFormat> getSupportedFormats() const;
bool hasFeature(OSystem::Feature f);
void setFeatureState(OSystem::Feature f, bool enable);
diff --git a/backends/platform/tizen/system.cpp b/backends/platform/tizen/system.cpp
index 3448dc1421..f7ebc46719 100644
--- a/backends/platform/tizen/system.cpp
+++ b/backends/platform/tizen/system.cpp
@@ -267,7 +267,7 @@ result TizenSystem::initModules() {
}
_graphicsManager = (GraphicsManager *)new TizenGraphicsManager(_appForm);
- if (!_graphicsManager) {
+ if (!_graphicsManager || graphicsManager->Construct() != E_SUCCESS) {
return E_OUT_OF_MEMORY;
}