Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Nov 2003 18:53:19 -0500 (EST)
From:      Lee Harr <lee@homer.easthighschool.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/59195: xgalaga no keyboard control under kde
Message-ID:  <200311112353.hABNrJ8c088478@homer.easthighschool.net>
Resent-Message-ID: <200311112350.hABNoJan070347@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         59195
>Category:       ports
>Synopsis:       xgalaga no keyboard control under kde
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 11 15:50:19 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Lee Harr
>Release:        FreeBSD 4.9-STABLE i386
>Organization:
>Environment:
System: FreeBSD homer.easthighschool.net 4.9-STABLE FreeBSD 4.9-STABLE #2: Thu Oct 30 23:32:22 EST 2003 lee@homer:/mnt2/obj/mnt2/src/sys/HOMER i386
KDE-3.1.4

	
>Description:
Running xgalaga when in KDE there is no keyboard control
(and also no way to get mouse control to work, since the
keyboard does not work).

Works fine under twm.


	
>How-To-Repeat:
Log in to KDE, run xgalaga. Space bar should fire, but it does not.


	
>Fix:
The key values are being passed back in to xgalaga 256 higher
than it expects. This patch corrects the problem, so that the
game runs correctly under both kde and twm:

--- main.c.orig Mon May 11 02:52:59 1998
+++ main.c      Mon Nov 10 23:10:55 2003
@@ -779,6 +779,7 @@
     if(gameOver) {
         while(W_EventsPending()) {
             W_NextEvent(&wev);
+            if (wev.key >= 256) wev.key -= 256;

            if(gameOver)
              mouseControl = 1;
@@ -826,6 +827,7 @@

     while(W_EventsPending()) {
         W_NextEvent(&wev);
+        if (wev.key >= 256) wev.key -= 256;

         switch(wev.type) {
         case W_EV_KEY_OFF:



	


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200311112353.hABNrJ8c088478>