diff --git a/script/win_installer/readme.txt b/script/win_installer/readme.txt index 0b63cef..8fa43cc 100644 --- a/script/win_installer/readme.txt +++ b/script/win_installer/readme.txt @@ -57,4 +57,5 @@ www.rtsoft.com * (bugfix) Fixed issue where 32 bit tilebitmaps would go wonky when reloading the surface * Default color under status bar is now black, fixes issue when transparent colors are used in the stats area, random garbage would show through * (windows) Version # is now shown in title bar -* (bugfix) Fixed some issues with how default offsets are calculated, it fixed some problems where sprites would be in the wrong place in certain DMODs \ No newline at end of file +* (bugfix) Fixed some issues with how default offsets are calculated, it fixed some problems where sprites would be in the wrong place in certain DMODs +* (bugfix, windows) "Smoothing" no longer incorrectly turns on if you lose/regain focus \ No newline at end of file diff --git a/source/video_gl.cpp b/source/video_gl.cpp index 8c0926a..493324b 100644 --- a/source/video_gl.cpp +++ b/source/video_gl.cpp @@ -111,6 +111,7 @@ IDirectDrawSurface * InitOffscreenSurface(int x, int y, IDirectDrawSurface::eMod { pdds->m_pGLSurf = new Surface; + pdds->m_pGLSurf->SetSmoothing(GetApp()->GetVar("smoothing")->GetUINT32() != 0); if (GetApp()->GetVar("smoothing")->GetUINT32()) { pdds->m_pGLSurf->SetTextureType(Surface::TYPE_GUI); @@ -247,6 +248,9 @@ void IDirectDrawSurface::UpdateShadowSurface() if (!m_pGLSurf) { m_pGLSurf = new Surface; + + m_pGLSurf->SetSmoothing(GetApp()->GetVar("smoothing")->GetUINT32() != 0); + if (GetApp()->GetVar("smoothing")->GetUINT32()) { m_pGLSurf->SetTextureType(Surface::TYPE_GUI); @@ -274,14 +278,14 @@ void IDirectDrawSurface::UpdateShadowSurface() m_pGLSurf->UpdateSurfaceRect(rtRect(0,0, s.GetWidth(), s.GetHeight()), s.GetPixelData()); m_pGLSurf->SetUsesAlpha(m_pSurf->GetUsesAlpha()); - if (s.GetHasPremultipliedAlpha()) - { - m_pGLSurf->SetBlendingMode(Surface::BLENDING_PREMULTIPLIED_ALPHA); - } - - + if (s.GetHasPremultipliedAlpha()) + { + m_pGLSurf->SetBlendingMode(Surface::BLENDING_PREMULTIPLIED_ALPHA); + } + + // if (m_pSurf) m_pSurf->SetModified(false); //WARNING: Seth changed on 8/21/2017, seems like this fixes issue with constantly re-initting surfaces - + // SAFE_FREE(m_pSurf); } @@ -298,10 +302,10 @@ void IDirectDrawSurface::UpdateShadowSurface() m_pSurf->FlipY(); m_pGLSurf->SetUsesAlpha(m_pSurf->GetUsesAlpha()); - if (m_pSurf->GetHasPremultipliedAlpha()) - { - m_pGLSurf->SetBlendingMode(Surface::BLENDING_PREMULTIPLIED_ALPHA); - } + if (m_pSurf->GetHasPremultipliedAlpha()) + { + m_pGLSurf->SetBlendingMode(Surface::BLENDING_PREMULTIPLIED_ALPHA); + } }