[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Ctrl+Alt+Q deactivated



On 09/22/2010 02:33 PM, Helmut Karlowski wrote:

> I suggest I commit the stuff 'till weekend, and you do your patch again ;)

Ok, here it is.

Jo Even
--- freemint.helmut/xaaes/src.km/k_keybd.c	Wed Sep 22 17:23:54 2010
+++ freemint/xaaes/src.km/k_keybd.c	Wed Sep 22 22:24:54 2010
@@ -564,9 +564,21 @@
 			sdmd = HALT_SYSTEM;
 		case 'Q':
 		{
-			DIAGS(("shutdown by CtlAlt Q"));
+			struct proc *p;
+			char *sdmaster = get_env(0, "SDMASTER=");
+ 
+			if (sdmaster)
+			{
+				int ret = create_process(sdmaster, NULL, NULL, &p, 0, NULL);
+				if (ret < 0)
+					ALERT(("$SDMASTER is not a valid program: %s", sdmaster));
+			}
+			else
+			{
+				DIAGS(("shutdown by CtlAlt Q"));
+				post_cevent(C.Hlp, ceExecfunc, ce_dispatch_shutdown, NULL, sdmd,1, NULL, NULL);
+			}
 
-			post_cevent(C.Hlp, ceExecfunc, ce_dispatch_shutdown, NULL, sdmd,1, NULL, NULL);
 			return true;
 		}
 #endif