Graphics: Fix some RGSS2 bitrot

This commit is contained in:
Jonas Kulla 2013-12-11 21:07:41 +01:00
parent 0035c23641
commit 1f2470deb7
1 changed files with 8 additions and 2 deletions

View File

@ -687,13 +687,16 @@ void Graphics::fadeout(int duration)
if (p->frozen) if (p->frozen)
FBO::bind(p->frozenScene.fbo, FBO::Read); FBO::bind(p->frozenScene.fbo, FBO::Read);
FBO::unbind(FBO::Draw);
for (int i = duration-1; i > -1; --i) for (int i = duration-1; i > -1; --i)
{ {
setBrightness((255.0 / duration) * i); setBrightness((255.0 / duration) * i);
if (p->frozen) if (p->frozen)
{ {
p->blitToScreen(); FBO::clear();
p->blitBufferFlippedScaled();
p->swapGLBuffer(); p->swapGLBuffer();
} }
else else
@ -708,13 +711,16 @@ void Graphics::fadein(int duration)
if (p->frozen) if (p->frozen)
FBO::bind(p->frozenScene.fbo, FBO::Read); FBO::bind(p->frozenScene.fbo, FBO::Read);
FBO::unbind(FBO::Draw);
for (int i = 0; i < duration; ++i) for (int i = 0; i < duration; ++i)
{ {
setBrightness((255.0 / duration) * i); setBrightness((255.0 / duration) * i);
if (p->frozen) if (p->frozen)
{ {
p->blitToScreen(); FBO::clear();
p->blitBufferFlippedScaled();
p->swapGLBuffer(); p->swapGLBuffer();
} }
else else