1
0
forked from 0ad/0ad

avoid error dialog when gamma upload fails twice (for reasons still unknown *sign*)

http://www.wildfiregames.com/forum/index.php?showtopic=14058&pid=226211&st=50&#entry226211

This was SVN commit r10303.
This commit is contained in:
janwas 2011-09-21 20:38:09 +00:00
parent c77fb0e841
commit 9812ee2780

View File

@ -105,13 +105,20 @@ public:
void Latch()
{
if(m_hasChanged)
Upload(m_changed);
{
if(!Upload(m_changed))
m_hasChanged = false;
}
}
void RestoreOriginal()
{
if(m_hasChanged)
Upload(m_original);
{
if(!Upload(m_original))
m_hasChanged = false;
}
}
private:
@ -151,7 +158,10 @@ private:
if(ok == FALSE)
{
ok = SetDeviceGammaRamp(g_hDC, ramps);
ENSURE(ok);
// at least one 32-bit XP system STILL fails here,
// so don't raise an error dialog.
if(!ok)
debug_printf(L"SetDeviceGammaRamp failed twice. Oh well.\n");
}
return (ok == TRUE);
}