2 small patches

Erik Auerswald auerswal at unix-ag.uni-kl.de
Thu May 5 12:23:14 EDT 2005


Hi,

I've attached patches to change two behaviours that might not be intended:

The Makefile in the airstrike base directory misses the file src/dep at
target clean.

SDL events except SDL_QUIT are de facto ignored, but they are generated
and inserted into the SDL event queue.

Erik
-------------- next part --------------
diff -bNru airstrike/Makefile airstrike-makefile/Makefile
--- airstrike/Makefile	2005-02-27 13:35:34.000000000 +0100
+++ airstrike-makefile/Makefile	2005-05-05 18:12:38.607646606 +0200
@@ -17,7 +17,7 @@
 	mv src/airstrike airstrike-nosound
 
 clean:
-	$(RM) $(shell find . -name '*.[od]' -o -name '*~' -o -name '#*')
+	$(RM) $(shell find . -name '*.[od]' -o -name '*~' -o -name '#*' -o -name 'dep')
 	$(RM) airstrike airstrike-nosound
 
 distclean: clean
-------------- next part --------------
diff -bNur airstrike/src/engine/engine.c airstrike-sdlevents/src/engine/engine.c
--- airstrike/src/engine/engine.c	2005-05-05 10:34:47.000000000 +0200
+++ airstrike-sdlevents/src/engine/engine.c	2005-05-05 18:16:01.743263544 +0200
@@ -58,6 +58,22 @@
 
   SDL_Init(SDL_INIT_TIMER|SDL_INIT_VIDEO);
 
+  /* don't insert events that will only be ignored into event queue
+   * SDL_EventState() cannot use ORed event types :(
+   * ignore all events except SDL_ACTIVEEVENT, SDL_QUIT, SDL_SYSWMEVENT,
+   * SDL_VIDEORESIZE and SDL_USEREVENT
+   * SDL_SYSWMEVENT is ignored by default (at least on my system...) */
+  SDL_EventState(SDL_KEYDOWN, SDL_IGNORE);
+  SDL_EventState(SDL_KEYUP, SDL_IGNORE);
+  SDL_EventState(SDL_MOUSEMOTION, SDL_IGNORE);
+  SDL_EventState(SDL_MOUSEBUTTONDOWN, SDL_IGNORE);
+  SDL_EventState(SDL_MOUSEBUTTONUP, SDL_IGNORE);
+  SDL_EventState(SDL_JOYAXISMOTION, SDL_IGNORE);
+  SDL_EventState(SDL_JOYBALLMOTION, SDL_IGNORE);
+  SDL_EventState(SDL_JOYHATMOTION, SDL_IGNORE);
+  SDL_EventState(SDL_JOYBUTTONDOWN, SDL_IGNORE);
+  SDL_EventState(SDL_JOYBUTTONUP, SDL_IGNORE);
+
   rc_setup();
   
   maths_setup();


More information about the airstrike mailing list