diff options
author | Alejandro Marzini | 2010-07-19 05:36:10 +0000 |
---|---|---|
committer | Alejandro Marzini | 2010-07-19 05:36:10 +0000 |
commit | 6f70a303bcda770b831e4d22b119f814d2a3a29d (patch) | |
tree | 9d0652a2708a2cc192221967c47d5172e390b8d8 /backends/graphics/opengl/opengl-graphics.cpp | |
parent | 38b4098f676cd222ba6c5f638d3a6a61974d5f88 (diff) | |
download | scummvm-rg350-6f70a303bcda770b831e4d22b119f814d2a3a29d.tar.gz scummvm-rg350-6f70a303bcda770b831e4d22b119f814d2a3a29d.tar.bz2 scummvm-rg350-6f70a303bcda770b831e4d22b119f814d2a3a29d.zip |
OPENGL: Add basic scaler handle.
svn-id: r51016
Diffstat (limited to 'backends/graphics/opengl/opengl-graphics.cpp')
-rw-r--r-- | backends/graphics/opengl/opengl-graphics.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp index e2b541bef8..54be9c408c 100644 --- a/backends/graphics/opengl/opengl-graphics.cpp +++ b/backends/graphics/opengl/opengl-graphics.cpp @@ -555,7 +555,7 @@ void OpenGLGraphicsManager::internUpdateScreen() { } } -bool OpenGLGraphicsManager::loadGFXMode() { +void OpenGLGraphicsManager::initGL() { // Check available GL Extensions GLTexture::initGLExtensions(); @@ -583,6 +583,10 @@ bool OpenGLGraphicsManager::loadGFXMode() { CHECK_GL_ERROR( glOrtho(0, _videoMode.hardwareWidth, _videoMode.hardwareHeight, 0, -1, 1) ); CHECK_GL_ERROR( glMatrixMode(GL_MODELVIEW) ); CHECK_GL_ERROR( glLoadIdentity() ); +} + +bool OpenGLGraphicsManager::loadGFXMode() { + initGL(); if (!_gameTexture) { byte bpp; @@ -622,6 +626,15 @@ bool OpenGLGraphicsManager::hotswapGFXMode() { return false; } +void OpenGLGraphicsManager::setScale(int newScale) { + if (newScale == _videoMode.scaleFactor) + return; + + _videoMode.scaleFactor = newScale; + + _transactionDetails.sizeChanged = true; +} + void OpenGLGraphicsManager::adjustMouseEvent(const Common::Event &event) { if (!event.synthetic) { Common::Event newEvent(event); @@ -651,6 +664,7 @@ bool OpenGLGraphicsManager::notifyEvent(const Common::Event &event) { case Common::EVENT_MBUTTONUP: adjustMouseEvent(event); return !event.synthetic; + default: break; } @@ -658,4 +672,8 @@ bool OpenGLGraphicsManager::notifyEvent(const Common::Event &event) { return false; } +bool OpenGLGraphicsManager::saveScreenshot(const char *filename) { + return false; +} + #endif |