set default gamma when closing AC

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4923 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2010-05-18 19:03:37 +00:00
parent d439de1f93
commit 2c0147eb1a
+7 -1
View File
@@ -9,6 +9,7 @@ void cleanup(char *msg) // single program exit point;
cleanupclient();
audiomgr.soundcleanup();
cleanupserver();
setdefaultgamma();
}
SDL_ShowCursor(1);
if(msg)
@@ -371,11 +372,16 @@ VARFP(gamma, 30, 100, 300,
}
});
void setdefaultgamma()
{
SDL_SetGamma(1, 1, 1);
}
void resetgamma()
{
float f = gamma/100.0f;
if(f==1) return;
SDL_SetGamma(1, 1, 1);
setdefaultgamma();
SDL_SetGamma(f, f, f);
}