diff options
author | Max Horn | 2003-05-09 22:44:16 +0000 |
---|---|---|
committer | Max Horn | 2003-05-09 22:44:16 +0000 |
commit | 37724d929721836821065b2a177ae2f298bd1ed5 (patch) | |
tree | 50ddae26d30216a6230062335129d0d40ef5ed16 /backends/sdl | |
parent | 54a9ad3204140aba204474d186058db627b2584d (diff) | |
download | scummvm-rg350-37724d929721836821065b2a177ae2f298bd1ed5.tar.gz scummvm-rg350-37724d929721836821065b2a177ae2f298bd1ed5.tar.bz2 scummvm-rg350-37724d929721836821065b2a177ae2f298bd1ed5.zip |
Patch #735294: AdvMame3x scaler
svn-id: r7409
Diffstat (limited to 'backends/sdl')
-rw-r--r-- | backends/sdl/sdl-common.cpp | 20 | ||||
-rw-r--r-- | backends/sdl/sdl.cpp | 6 | ||||
-rw-r--r-- | backends/sdl/sdl_gl.cpp | 2 |
3 files changed, 19 insertions, 9 deletions
diff --git a/backends/sdl/sdl-common.cpp b/backends/sdl/sdl-common.cpp index 2aff1e4b40..e258957cb2 100644 --- a/backends/sdl/sdl-common.cpp +++ b/backends/sdl/sdl-common.cpp @@ -544,13 +544,19 @@ bool OSystem_SDL_Common::poll_event(Event *event) { break; } #endif - // Ctr-Alt-1 till Ctrl-Alt-9 will change the GFX mode - if (b == (KBD_CTRL|KBD_ALT) && - (ev.key.keysym.sym>='1') && (ev.key.keysym.sym<='9')) { - Property prop; - prop.gfx_mode = ev.key.keysym.sym - '1'; - property(PROP_SET_GFX_MODE, &prop); - break; + // Ctr-Alt-<key> will change the GFX mode + if (b == (KBD_CTRL|KBD_ALT)) { + char keys[] = "1234567890"; + char *ptr; + + ptr = strchr(keys, ev.key.keysym.sym); + if (ptr != NULL) { + Property prop; + + prop.gfx_mode = ptr - keys; + property(PROP_SET_GFX_MODE, &prop); + break; + } } #ifdef QTOPIA diff --git a/backends/sdl/sdl.cpp b/backends/sdl/sdl.cpp index 3c977e20b9..13cf5fe087 100644 --- a/backends/sdl/sdl.cpp +++ b/backends/sdl/sdl.cpp @@ -99,6 +99,10 @@ void OSystem_SDL::load_gfx_mode() { _scaleFactor = 2; _scaler_proc = AdvMame2x; break; + case GFX_ADVMAME3X: + _scaleFactor = 3; + _scaler_proc = AdvMame3x; + break; case GFX_TV2X: _scaleFactor = 2; _scaler_proc = TV2x; @@ -360,7 +364,7 @@ uint32 OSystem_SDL::property(int param, Property *value) { #endif return 1; } else if (param == PROP_SET_GFX_MODE) { - if (value->gfx_mode >= 9) + if (value->gfx_mode >= 10) return 0; _mode = value->gfx_mode; diff --git a/backends/sdl/sdl_gl.cpp b/backends/sdl/sdl_gl.cpp index 9858354004..99b5dc1f12 100644 --- a/backends/sdl/sdl_gl.cpp +++ b/backends/sdl/sdl_gl.cpp @@ -570,7 +570,7 @@ uint32 OSystem_SDL_OpenGL::property(int param, Property *value) { _glScreenStart = 0; break; default: // SDL backend - if (value->gfx_mode >= 9) + if (value->gfx_mode >= 10) return 0; _mode = value->gfx_mode; |