diff -ru ja2-0.12.1r6466/sgp/SGP.cc ja2-0.12.1r6466.orig/sgp/SGP.cc
--- ja2-0.12.1r6466/sgp/SGP.cc	2010-01-22 20:22:09.000000000 +0000
+++ ja2-0.12.1r6466.orig/sgp/SGP.cc	2010-01-22 20:27:10.000000000 +0000
@@ -240,13 +240,22 @@
 			switch (event.type)
 			{
 				case SDL_ACTIVEEVENT:
-					if (event.active.state & SDL_APPACTIVE)
+				#ifdef WITH_MAEMO5
+					if( (event.active.state & SDL_APPACTIVE) || (event.active.state & SDL_APPINPUTFOCUS) || (event.active.state & SDL_APPMOUSEFOCUS) )
 					{
 						gfApplicationActive = (event.active.gain != 0);
-						break;
+						SDL_PauseAudio(event.active.gain == 0 ? 1 : 0);
+						
 					}
+				#endif
+				#ifndef WITH_MAEMO5
+				if (event.active.state & SDL_APPACTIVE)
+				{
+					gfApplicationActive = (event.active.gain != 0);
 					break;
-
+				}
+				#endif
+				break;
 				case SDL_KEYDOWN: KeyDown(&event.key.keysym); break;
 				case SDL_KEYUP:   KeyUp(  &event.key.keysym); break;
 
