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 /backends | |
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
Diffstat (limited to 'backends')
-rw-r--r-- | backends/sdl/sdl.cpp | 1 | ||||
-rw-r--r-- | backends/sdl/sdl_gl.cpp | 10 |
2 files changed, 7 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) { |