diff options
Diffstat (limited to 'backends/platform')
-rw-r--r-- | backends/platform/ios7/ios7_common.h | 4 | ||||
-rw-r--r-- | backends/platform/ios7/ios7_osys_main.cpp | 9 | ||||
-rw-r--r-- | backends/platform/ios7/ios7_osys_video.mm | 1 | ||||
-rw-r--r-- | backends/platform/ios7/ios7_video.mm | 24 |
4 files changed, 10 insertions, 28 deletions
diff --git a/backends/platform/ios7/ios7_common.h b/backends/platform/ios7/ios7_common.h index 12740d4ae9..3609387efd 100644 --- a/backends/platform/ios7/ios7_common.h +++ b/backends/platform/ios7/ios7_common.h @@ -62,7 +62,6 @@ enum UIViewTapDescription { }; enum GraphicsModes { - kGraphicsModeLinear = 0, kGraphicsModeNone = 1, kGraphicsMode2xSaI, @@ -80,7 +79,7 @@ struct VideoContext { VideoContext() : asprectRatioCorrection(), screenWidth(), screenHeight(), overlayVisible(false), overlayWidth(), overlayHeight(), mouseX(), mouseY(), mouseHotspotX(), mouseHotspotY(), mouseWidth(), mouseHeight(), - mouseIsVisible(), graphicsMode(kGraphicsModeNone), shakeOffsetY() { + mouseIsVisible(), graphicsMode(kGraphicsModeNone), filtering(false), shakeOffsetY() { } // Game screen state @@ -102,6 +101,7 @@ struct VideoContext { // Misc state GraphicsModes graphicsMode; + bool filtering; int shakeOffsetY; }; diff --git a/backends/platform/ios7/ios7_osys_main.cpp b/backends/platform/ios7/ios7_osys_main.cpp index 25d9cbed15..3a627478f9 100644 --- a/backends/platform/ios7/ios7_osys_main.cpp +++ b/backends/platform/ios7/ios7_osys_main.cpp @@ -52,8 +52,7 @@ const OSystem::GraphicsMode OSystem_iOS7::s_supportedGraphicsModes[] = { - { "none", "No filtering", kGraphicsModeNone }, - { "linear", "Linear filtering", kGraphicsModeLinear }, + { "none", "Normal", kGraphicsModeNone }, #ifdef ENABLE_IOS7_SCALERS #ifdef USE_SCALERS @@ -171,6 +170,7 @@ void OSystem_iOS7::initBackend() { bool OSystem_iOS7::hasFeature(Feature f) { switch (f) { case kFeatureCursorPalette: + case kFeatureFilteringMode: return true; default: @@ -187,6 +187,9 @@ void OSystem_iOS7::setFeatureState(Feature f, bool enable) { _mouseCursorPaletteEnabled = enable; } break; + case kFeatureFilteringMode: + _videoContext->filtering = enable; + break; case kFeatureAspectRatioCorrection: _videoContext->asprectRatioCorrection = enable; break; @@ -200,6 +203,8 @@ bool OSystem_iOS7::getFeatureState(Feature f) { switch (f) { case kFeatureCursorPalette: return _mouseCursorPaletteEnabled; + case kFeatureFilteringMode: + return _videoContext->filtering; case kFeatureAspectRatioCorrection: return _videoContext->asprectRatioCorrection; diff --git a/backends/platform/ios7/ios7_osys_video.mm b/backends/platform/ios7/ios7_osys_video.mm index 6784cf46f5..456796137e 100644 --- a/backends/platform/ios7/ios7_osys_video.mm +++ b/backends/platform/ios7/ios7_osys_video.mm @@ -76,7 +76,6 @@ int OSystem_iOS7::getDefaultGraphicsMode() const { bool OSystem_iOS7::setGraphicsMode(int mode) { switch (mode) { case kGraphicsModeNone: - case kGraphicsModeLinear: case kGraphicsMode2xSaI: case kGraphicsModeSuper2xSaI: case kGraphicsModeSuperEagle: diff --git a/backends/platform/ios7/ios7_video.mm b/backends/platform/ios7/ios7_video.mm index 8dbfb71b74..5baa83e8e8 100644 --- a/backends/platform/ios7/ios7_video.mm +++ b/backends/platform/ios7/ios7_video.mm @@ -442,26 +442,7 @@ uint getSizeNextPOT(uint size) { glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, tex); printOpenGLError(); - GLint filter = GL_LINEAR; - - switch (_videoContext.graphicsMode) { - case kGraphicsModeNone: - filter = GL_NEAREST; - break; - - case kGraphicsModeLinear: - case kGraphicsMode2xSaI: - case kGraphicsModeSuper2xSaI: - case kGraphicsModeSuperEagle: - case kGraphicsModeAdvMame2x: - case kGraphicsModeAdvMame3x: - case kGraphicsModeHQ2x: - case kGraphicsModeHQ3x: - case kGraphicsModeTV2x: - case kGraphicsModeDotMatrix: - filter = GL_LINEAR; - break; - } + GLint filter = _videoContext.filtering ? GL_LINEAR : GL_NEAREST; glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, filter); printOpenGLError(); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, filter); printOpenGLError(); @@ -478,9 +459,6 @@ uint getSizeNextPOT(uint size) { int scalerScale = 1; switch (_videoContext.graphicsMode) { - case kGraphicsModeLinear: - break; - case kGraphicsModeNone: break; #ifdef USE_SCALERS |