* (bugfix, windows) "Smoothing" no longer incorrectly turns on if you lose/regain focus
git-svn-id: svn://rtsoft.com/rtsvn/projects/RTDink@1477 353e56fe-9613-0410-8469-b96ad8e6f29c
This commit is contained in:
parent
0fe6c06c7d
commit
f9d131f431
2 changed files with 17 additions and 12 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue