togglegrap switch message

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5323 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Alejandro V. Garcia
2010-07-09 11:45:18 +00:00
parent be3cf0f400
commit 0772fcb65a
+10 -5
View File
@@ -1099,11 +1099,16 @@ COMMAND(kickallbots, ARG_NONE);
void togglegrap()
{
//if(!botmode()) return; //Toca ..make it available in any game mode
if (SDL_WM_GrabInput(SDL_GRAB_QUERY) == SDL_GrabMode(0))
SDL_WM_GrabInput(SDL_GRAB_ON);
else
SDL_WM_GrabInput(SDL_GrabMode(0));
if (SDL_WM_GrabInput(SDL_GRAB_QUERY) == SDL_GrabMode(0))
{
SDL_WM_GrabInput(SDL_GRAB_ON);
conoutf("mouse input locked");
}
else
{
SDL_WM_GrabInput(SDL_GrabMode(0));
conoutf("mouse input released");
}
}
COMMAND(togglegrap, ARG_NONE);