1
1
forked from 0ad/0ad

Disable visible warnings when gamma-setting fails. Fixes #480.

This was SVN commit r7410.
This commit is contained in:
Ykkrosh 2010-03-28 18:33:35 +00:00
parent 53744640ec
commit 13302cc133
2 changed files with 4 additions and 2 deletions

View File

@ -141,7 +141,9 @@ private:
SetLastError(0);
debug_assert(wutil_IsValidHandle(g_hDC));
const BOOL ok = SetDeviceGammaRamp(g_hDC, ramps);
debug_assert(ok);
// The call often fails, especially on multi-monitor systems, and we don't
// know how to fix/avoid the underlying problem, so just ignore the failure here
//debug_assert(ok);
return !!ok;
}

View File

@ -139,7 +139,7 @@ static int SetVideoMode(int w, int h, int bpp, bool fullscreen)
ogl_Init(); // required after each mode change
if(SDL_SetGamma(g_Gamma, g_Gamma, g_Gamma) < 0)
debug_warn(L"SDL_SetGamma failed");
LOGWARNING(L"SDL_SetGamma failed");
return 0;
}