[Gridflow-cvs] [svn] commit: r3809 - /trunk/format/sdl.c

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Thu Jun 5 13:17:55 EDT 2008


Author: matju
Date: Thu Jun  5 13:17:54 2008
New Revision: 3809

Log:
added 'f' and Escape as alternate hotkeys for fullscreen toggle

Modified:
    trunk/format/sdl.c

Modified: trunk/format/sdl.c
==============================================================================
--- trunk/format/sdl.c (original)
+++ trunk/format/sdl.c Thu Jun  5 13:17:54 2008
@@ -89,7 +89,11 @@
 		    case SDL_KEYDOWN: case SDL_KEYUP: {
 			int key = event.key.keysym.sym;
 			int mod = event.key.keysym.mod;
-			if (key==SDLK_F11 && event.type==SDL_KEYDOWN) {full_screen = !full_screen; SDL_WM_ToggleFullScreen(screen); break;}
+			if (event.type==SDL_KEYDOWN && (key==SDLK_F11 || key==SDLK_ESCAPE || key=='f')) {
+				full_screen = !full_screen;
+				SDL_WM_ToggleFullScreen(screen);
+				break;
+			}
 			t_symbol *sel = gensym(const_cast<char *>(event.type==SDL_KEYDOWN ? "keypress" : "keyrelease"));
 			t_atom at[4];
 			mousem &= ~0xFF;
@@ -99,7 +103,6 @@
 			SETFLOAT(at+2,mousem);
 			SETSYMBOL(at+3,keyboard[event.key.keysym.sym]);
 			outlet_anything(instance->bself->outlets[0],sel,4,at);
-			post("type=%d state=%d keysym=%d",event.type,event.key.state,event.key.keysym.sym);
 		    } break;
 		    case SDL_MOUSEBUTTONDOWN: SDL_MOUSEBUTTONUP: {
 			if (SDL_MOUSEBUTTONDOWN) mousem |=  (128<<event.button.button);



More information about the Gridflow-cvs mailing list