Bug 59195 - xgalaga no keyboard control under kde
Summary: xgalaga no keyboard control under kde
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Pav Lucistnik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-11 23:50 UTC by Lee Harr
Modified: 2003-11-16 00:42 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lee Harr 2003-11-11 23:50:19 UTC
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.

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:



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:--A7mswXqT2SJ1Nmo7RggMAqk4TBGf0SCqoFjsfawZEzF28VHZ
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- 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;
How-To-Repeat: Log in to KDE, run xgalaga. Space bar should fire, but it does not.
Comment 1 Pav Lucistnik freebsd_committer freebsd_triage 2003-11-15 18:37:21 UTC
Responsible Changed
From-To: freebsd-ports-bugs->pav

I'll take this one.
Comment 2 Pav Lucistnik freebsd_committer freebsd_triage 2003-11-16 00:41:57 UTC
State Changed
From-To: open->closed

Committed, thanks. Good catch!