A few fixes for texture/scanline filtering.

git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2860 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2014-03-01 18:28:57 +00:00
parent dbddad068c
commit 2d64643d8f
1 changed files with 5 additions and 10 deletions

View File

@ -393,9 +393,9 @@ void FrameBufferSDL2::enableNTSC(bool enable)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
uInt32 FrameBufferSDL2::enableScanlines(int relative, int absolute) uInt32 FrameBufferSDL2::enableScanlines(int relative, int absolute)
{ {
int intensity = myTiaSurface->myScanlineIntensity;
if(myTiaSurface) if(myTiaSurface)
{ {
int intensity = myTiaSurface->myScanlineIntensity;
if(relative == 0) intensity = absolute; if(relative == 0) intensity = absolute;
else intensity += relative; else intensity += relative;
intensity = BSPF_max(0, intensity); intensity = BSPF_max(0, intensity);
@ -403,8 +403,9 @@ uInt32 FrameBufferSDL2::enableScanlines(int relative, int absolute)
myTiaSurface->setScanIntensity(intensity); myTiaSurface->setScanIntensity(intensity);
myRedrawEntireFrame = true; myRedrawEntireFrame = true;
return intensity;
} }
return intensity; return 0;
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -462,18 +463,12 @@ string FrameBufferSDL2::effectsInfo() const
case kBlarggNormal: case kBlarggNormal:
buf << myNTSCFilter.getPreset() << ", scanlines=" buf << myNTSCFilter.getPreset() << ", scanlines="
<< myTiaSurface->myScanlineIntensity << "/" << myTiaSurface->myScanlineIntensity << "/"
#if 0 << (myTiaSurface->myTexFilter[1] ? "inter" : "nointer");
<< (myTiaSurface->myTexFilter[1] == GL_LINEAR ? "inter" : "nointer");
#endif
;
break; break;
case kBlarggPhosphor: case kBlarggPhosphor:
buf << myNTSCFilter.getPreset() << ", phosphor, scanlines=" buf << myNTSCFilter.getPreset() << ", phosphor, scanlines="
<< myTiaSurface->myScanlineIntensity << "/" << myTiaSurface->myScanlineIntensity << "/"
#if 0 << (myTiaSurface->myTexFilter[1] ? "inter" : "nointer");
<< (myTiaSurface->myTexFilter[1] == GL_LINEAR ? "inter" : "nointer");
#endif
;
break; break;
} }
return buf.str(); return buf.str();