mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-10 22:51:57 +00:00
ATI drivers properly support SetDeviceGammaRamp, so now so do we.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@330 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
5fe626d5cb
commit
dbf313157a
1 changed files with 9 additions and 4 deletions
|
@ -873,13 +873,16 @@ void GLVID_ShiftPalette (unsigned char *palette)
|
||||||
// VID_SetPalette (palette);
|
// VID_SetPalette (palette);
|
||||||
|
|
||||||
if (ActiveApp && vid_hardwaregamma.value) //this is needed because ATI drivers don't work properly (or when task-switched out).
|
if (ActiveApp && vid_hardwaregamma.value) //this is needed because ATI drivers don't work properly (or when task-switched out).
|
||||||
|
{
|
||||||
|
if (gammaworks)
|
||||||
|
{ //we have hardware gamma applied - if we're doing a BF, we don't want to reset to the default gamma (yuck)
|
||||||
|
SetDeviceGammaRamp (maindc, ramps);
|
||||||
|
return;
|
||||||
|
}
|
||||||
gammaworks = !!SetDeviceGammaRamp (maindc, ramps);
|
gammaworks = !!SetDeviceGammaRamp (maindc, ramps);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
gammaworks = false;
|
gammaworks = false;
|
||||||
if (!gammaworks)
|
|
||||||
{
|
|
||||||
SetDeviceGammaRamp(maindc, origionalgammaramps);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -892,6 +895,7 @@ void VID_SetDefaultMode (void)
|
||||||
void GLVID_Shutdown (void)
|
void GLVID_Shutdown (void)
|
||||||
{
|
{
|
||||||
SetDeviceGammaRamp(maindc, origionalgammaramps);
|
SetDeviceGammaRamp(maindc, origionalgammaramps);
|
||||||
|
gammaworks = false;
|
||||||
|
|
||||||
VID_UnSetMode();
|
VID_UnSetMode();
|
||||||
}
|
}
|
||||||
|
@ -1055,6 +1059,7 @@ void GLAppActivate(BOOL fActive, BOOL minimize)
|
||||||
v_gamma.modified = true; //wham bam thanks.
|
v_gamma.modified = true; //wham bam thanks.
|
||||||
|
|
||||||
SetDeviceGammaRamp(maindc, origionalgammaramps);
|
SetDeviceGammaRamp(maindc, origionalgammaramps);
|
||||||
|
gammaworks = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue