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:
+7
-1
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user