aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2011-03-17 18:34:22 +0100
committerJohannes Schickel2011-03-17 18:35:32 +0100
commit42d3b8fcbda7793bf3ef8435db5ed78f7350cf4d (patch)
tree135a11a9faddc1b1ba7de60ec8e462a669505000
parent372af10a7bf154a625c9af7e65820a007bd43584 (diff)
downloadscummvm-rg350-42d3b8fcbda7793bf3ef8435db5ed78f7350cf4d.tar.gz
scummvm-rg350-42d3b8fcbda7793bf3ef8435db5ed78f7350cf4d.tar.bz2
scummvm-rg350-42d3b8fcbda7793bf3ef8435db5ed78f7350cf4d.zip
OPENGL: Fix compilation when USE_OSD is not defined.
-rw-r--r--backends/graphics/opengl/opengl-graphics.cpp2
-rw-r--r--backends/graphics/openglsdl/openglsdl-graphics.cpp2
2 files changed, 4 insertions, 0 deletions
diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp
index 108e249019..e9942b8eb4 100644
--- a/backends/graphics/opengl/opengl-graphics.cpp
+++ b/backends/graphics/opengl/opengl-graphics.cpp
@@ -646,6 +646,7 @@ void OpenGLGraphicsManager::displayMessageOnOSD(const char *msg) {
assert(_transactionMode == kTransactionNone);
assert(msg);
+#ifdef USE_OSD
// Split the message into separate lines.
_osdLines.clear();
@@ -659,6 +660,7 @@ void OpenGLGraphicsManager::displayMessageOnOSD(const char *msg) {
// Init the OSD display parameters, and the fade out
_osdAlpha = kOSDInitialAlpha;
_osdFadeStartTime = g_system->getMillis() + kOSDFadeOutDelay;
+#endif
}
//
diff --git a/backends/graphics/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp
index b68b55fef1..c2ec43b90d 100644
--- a/backends/graphics/openglsdl/openglsdl-graphics.cpp
+++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp
@@ -565,7 +565,9 @@ bool OpenGLSdlGraphicsManager::notifyEvent(const Common::Event &event) {
// Ctrl-Alt-<number key> will change the GFX mode
if (isNormalNumber || isKeypadNumber) {
if (sdlKey - (isNormalNumber ? SDLK_1 : SDLK_KP1) <= 4) {
+#ifdef USE_OSD
int lastMode = _videoMode.mode;
+#endif
beginGFXTransaction();
_videoMode.mode = sdlKey - (isNormalNumber ? SDLK_1 : SDLK_KP1);
_transactionDetails.needRefresh = true;