diff options
author | Travis Howell | 2003-06-22 14:18:33 +0000 |
---|---|---|
committer | Travis Howell | 2003-06-22 14:18:33 +0000 |
commit | 5132ca1b2f454545ff3b3b3bb1b108391d7256c7 (patch) | |
tree | 586c27838b53f6c31e2dd2d354c40ec0291cd81f | |
parent | 3883de39a9ce3103503b37472aded49a80d6c194 (diff) | |
download | scummvm-rg350-5132ca1b2f454545ff3b3b3bb1b108391d7256c7.tar.gz scummvm-rg350-5132ca1b2f454545ff3b3b3bb1b108391d7256c7.tar.bz2 scummvm-rg350-5132ca1b2f454545ff3b3b3bb1b108391d7256c7.zip |
Add opengl filter option
for opengl backend
Enable poll_event in opengl backend
svn-id: r8612
-rw-r--r-- | backends/sdl/sdl.cpp | 1 | ||||
-rw-r--r-- | backends/sdl/sdl_gl.cpp | 10 | ||||
-rw-r--r-- | common/gameDetector.cpp | 1 |
3 files changed, 8 insertions, 4 deletions
diff --git a/backends/sdl/sdl.cpp b/backends/sdl/sdl.cpp index ecb00cd2d8..f1078ded0b 100644 --- a/backends/sdl/sdl.cpp +++ b/backends/sdl/sdl.cpp @@ -112,6 +112,7 @@ void OSystem_SDL::load_gfx_mode() { _scaler_proc = DotMatrix; break; + case GFX_BILINEAR: case GFX_DOUBLESIZE: _scaleFactor = 2; _scaler_proc = Normal2x; diff --git a/backends/sdl/sdl_gl.cpp b/backends/sdl/sdl_gl.cpp index b328114bc7..a07e7b08ec 100644 --- a/backends/sdl/sdl_gl.cpp +++ b/backends/sdl/sdl_gl.cpp @@ -47,7 +47,7 @@ public: // Get the next event. // Returns true if an event was retrieved. -// bool poll_event(Event *event); + bool poll_event(Event *event); protected: FB2GL fb2gl; @@ -119,6 +119,10 @@ void OSystem_SDL_OpenGL::load_gfx_mode() { _tmpScreenWidth = (_screenWidth + 3); switch(_mode) { + case GFX_BILINEAR: + _usingOpenGL = true; + _mode = GFX_NORMAL; + break; case GFX_2XSAI: _scaleFactor = 2; _scaler_proc = _2xSaI; @@ -501,14 +505,13 @@ void OSystem_SDL_OpenGL::update_screen() { _forceFull = false; } -/* bool OSystem_SDL_OpenGL::poll_event(Event *event) { SDL_Event ev; ev.type = 0; SDL_PeepEvents(&ev, 1, SDL_GETEVENT, SDL_VIDEORESIZEMASK); - if (ev.type == SDL_VIDEORESIZE) { + if (_usingOpenGL && ev.type == SDL_VIDEORESIZE) { int w = ev.resize.w; int h = ev.resize.h; glViewport(0, 0, (GLsizei)w, (GLsizei)h); @@ -521,7 +524,6 @@ bool OSystem_SDL_OpenGL::poll_event(Event *event) { return OSystem_SDL_Common::poll_event(event); } -*/ uint32 OSystem_SDL_OpenGL::property(int param, Property *value) { diff --git a/common/gameDetector.cpp b/common/gameDetector.cpp index a4841ed72b..c17c78d31c 100644 --- a/common/gameDetector.cpp +++ b/common/gameDetector.cpp @@ -101,6 +101,7 @@ static const struct GraphicsMode gfx_modes[] = { {"advmame3x", "AdvMAME3x", GFX_ADVMAME3X}, {"tv2x", "TV2x", GFX_TV2X}, {"dotmatrix", "DotMatrix", GFX_DOTMATRIX}, + {"opengl", "OpenGL", GFX_BILINEAR}, #else {"flipping", "Page Flipping", GFX_FLIPPING}, {"dbuffer", "Double Buffer", GFX_DOUBLEBUFFER}, |