aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics/openglsdl/openglsdl-graphics.cpp
diff options
context:
space:
mode:
authorathrxx2011-03-22 15:55:17 +0100
committerathrxx2011-03-22 15:55:17 +0100
commitea79336ac90e12fe53242cfd9153db9d7087ca0f (patch)
tree50c74ceb394cf23d845c408659459f3b07192b92 /backends/graphics/openglsdl/openglsdl-graphics.cpp
parent92f922aabe5811fcf595697bc1316aa57b4c9b66 (diff)
parent273ba73d5fae0dd0d3b3f7c5f15f03d02c0af1b4 (diff)
downloadscummvm-rg350-ea79336ac90e12fe53242cfd9153db9d7087ca0f.tar.gz
scummvm-rg350-ea79336ac90e12fe53242cfd9153db9d7087ca0f.tar.bz2
scummvm-rg350-ea79336ac90e12fe53242cfd9153db9d7087ca0f.zip
Merge branch 'master' of https://github.com/scummvm/scummvm
Diffstat (limited to 'backends/graphics/openglsdl/openglsdl-graphics.cpp')
-rw-r--r--backends/graphics/openglsdl/openglsdl-graphics.cpp39
1 files changed, 14 insertions, 25 deletions
diff --git a/backends/graphics/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp
index de9dba1ab1..b9022af120 100644
--- a/backends/graphics/openglsdl/openglsdl-graphics.cpp
+++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp
@@ -295,10 +295,6 @@ bool OpenGLSdlGraphicsManager::setupFullscreenMode() {
}
bool OpenGLSdlGraphicsManager::loadGFXMode() {
- // Force 4/3 if feature enabled
- if (getFeatureState(OSystem::kFeatureAspectRatioCorrection))
- _videoMode.mode = OpenGL::GFX_4_3;
-
// If the screen was resized, do not change its size
if (!_screenResized) {
const int scaleFactor = getScale();
@@ -509,10 +505,19 @@ bool OpenGLSdlGraphicsManager::notifyEvent(const Common::Event &event) {
// Ctrl-Alt-a switch between display modes
if (event.kbd.keycode == 'a') {
beginGFXTransaction();
- switchDisplayMode(-1);
+ setFeatureState(OSystem::kFeatureAspectRatioCorrection, !getFeatureState(OSystem::kFeatureAspectRatioCorrection));
endGFXTransaction();
#ifdef USE_OSD
- displayModeChangedMsg();
+ char buffer[128];
+ if (getFeatureState(OSystem::kFeatureAspectRatioCorrection))
+ sprintf(buffer, "Enabled aspect ratio correction\n%d x %d -> %d x %d",
+ _videoMode.screenWidth, _videoMode.screenHeight,
+ _hwscreen->w, _hwscreen->h);
+ else
+ sprintf(buffer, "Disabled aspect ratio correction\n%d x %d -> %d x %d",
+ _videoMode.screenWidth, _videoMode.screenHeight,
+ _hwscreen->w, _hwscreen->h);
+ displayMessageOnOSD(buffer);
#endif
internUpdateScreen();
return true;
@@ -561,12 +566,12 @@ bool OpenGLSdlGraphicsManager::notifyEvent(const Common::Event &event) {
}
}
- const bool isNormalNumber = (SDLK_1 <= sdlKey && sdlKey <= SDLK_4);
- const bool isKeypadNumber = (SDLK_KP1 <= sdlKey && sdlKey <= SDLK_KP4);
+ const bool isNormalNumber = (SDLK_1 <= sdlKey && sdlKey <= SDLK_3);
+ const bool isKeypadNumber = (SDLK_KP1 <= sdlKey && sdlKey <= SDLK_KP3);
// Ctrl-Alt-<number key> will change the GFX mode
if (isNormalNumber || isKeypadNumber) {
- if (sdlKey - (isNormalNumber ? SDLK_1 : SDLK_KP1) <= 4) {
+ if (sdlKey - (isNormalNumber ? SDLK_1 : SDLK_KP1) <= 3) {
#ifdef USE_OSD
int lastMode = _videoMode.mode;
#endif
@@ -576,10 +581,6 @@ bool OpenGLSdlGraphicsManager::notifyEvent(const Common::Event &event) {
beginGFXTransaction();
setGraphicsMode(sdlKey - (isNormalNumber ? SDLK_1 : SDLK_KP1));
setScale(oldScale);
- // TODO: We disable the aspect ratio correction here,
- // we might switch to mode which ignores it...
- // We should really fix this mess up.
- setFeatureState(OSystem::kFeatureAspectRatioCorrection, false);
endGFXTransaction();
#ifdef USE_OSD
if (lastMode != _videoMode.mode)
@@ -597,18 +598,6 @@ bool OpenGLSdlGraphicsManager::notifyEvent(const Common::Event &event) {
toggleFullScreen(-1);
return true;
}
-
- // Ctrl-Shift-a switch backwards between display modes
- if (event.kbd.keycode == 'a') {
- beginGFXTransaction();
- switchDisplayMode(-2);
- endGFXTransaction();
-#ifdef USE_OSD
- displayModeChangedMsg();
-#endif
- internUpdateScreen();
- return true;
- }
}
break;
case Common::EVENT_KEYUP: