aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorMatthew Hoops2010-07-11 16:11:28 +0000
committerMatthew Hoops2010-07-11 16:11:28 +0000
commita1161feed2e2fcb10ef75d32bdad4df1054e159d (patch)
tree6c1eb3ada0e419ab2d69a5e3f010c12478aac9f7 /backends
parent4dca7c7e02a111a950124ee26a6d46090a0f755c (diff)
downloadscummvm-rg350-a1161feed2e2fcb10ef75d32bdad4df1054e159d.tar.gz
scummvm-rg350-a1161feed2e2fcb10ef75d32bdad4df1054e159d.tar.bz2
scummvm-rg350-a1161feed2e2fcb10ef75d32bdad4df1054e159d.zip
Fix compile on Mac OS X.
svn-id: r50801
Diffstat (limited to 'backends')
-rw-r--r--backends/graphics/opengl/gltexture.h5
-rw-r--r--backends/graphics/opengl/opengl-graphics.h2
-rw-r--r--backends/graphics/sdl/sdl-graphics.cpp13
3 files changed, 12 insertions, 8 deletions
diff --git a/backends/graphics/opengl/gltexture.h b/backends/graphics/opengl/gltexture.h
index 7a33c88098..9238b73cf4 100644
--- a/backends/graphics/opengl/gltexture.h
+++ b/backends/graphics/opengl/gltexture.h
@@ -32,9 +32,12 @@
#undef ARRAYSIZE
#endif
-#ifdef USE_GLES
+#if defined(USE_GLES)
#include <GLES/gl.h>
#include <GLES/glext.h>
+#elif defined(MACOSX)
+#include <gl.h>
+#include <glext.h>
#else
#include <GL/gl.h>
#include <GL/glext.h>
diff --git a/backends/graphics/opengl/opengl-graphics.h b/backends/graphics/opengl/opengl-graphics.h
index ef71028854..cbf81db9b0 100644
--- a/backends/graphics/opengl/opengl-graphics.h
+++ b/backends/graphics/opengl/opengl-graphics.h
@@ -30,7 +30,7 @@
#include "backends/graphics/graphics.h"
enum {
- GFX_NORMAL = 0,
+ GFX_NORMAL = 0
};
/**
diff --git a/backends/graphics/sdl/sdl-graphics.cpp b/backends/graphics/sdl/sdl-graphics.cpp
index 26a5a6302c..a554479756 100644
--- a/backends/graphics/sdl/sdl-graphics.cpp
+++ b/backends/graphics/sdl/sdl-graphics.cpp
@@ -1994,20 +1994,21 @@ bool SdlGraphicsManager::handleScalerHotkeys(Common::KeyCode key) {
int newMode = -1;
int factor = _videoMode.scaleFactor - 1;
+ SDLKey sdlKey = (SDLKey)key;
// Increase/decrease the scale factor
- if (key == SDLK_EQUALS || key == SDLK_PLUS || key == SDLK_MINUS ||
- key == SDLK_KP_PLUS || key == SDLK_KP_MINUS) {
- factor += (key == SDLK_MINUS || key == SDLK_KP_MINUS) ? -1 : +1;
+ if (sdlKey == SDLK_EQUALS || sdlKey == SDLK_PLUS || sdlKey == SDLK_MINUS ||
+ sdlKey == SDLK_KP_PLUS || sdlKey == SDLK_KP_MINUS) {
+ factor += (sdlKey == SDLK_MINUS || sdlKey == SDLK_KP_MINUS) ? -1 : +1;
if (0 <= factor && factor <= 3) {
newMode = s_gfxModeSwitchTable[_scalerType][factor];
}
}
- const bool isNormalNumber = (SDLK_1 <= key && key <= SDLK_9);
- const bool isKeypadNumber = (SDLK_KP1 <= key && key <= SDLK_KP9);
+ const bool isNormalNumber = (SDLK_1 <= sdlKey && sdlKey <= SDLK_9);
+ const bool isKeypadNumber = (SDLK_KP1 <= sdlKey && sdlKey <= SDLK_KP9);
if (isNormalNumber || isKeypadNumber) {
- _scalerType = key - (isNormalNumber ? SDLK_1 : SDLK_KP1);
+ _scalerType = sdlKey - (isNormalNumber ? SDLK_1 : SDLK_KP1);
if (_scalerType >= ARRAYSIZE(s_gfxModeSwitchTable))
return false;