tags 568702 + patch pending
thanks

On Sun, Feb 07, 2010 at 11:09:41AM +0100, Jean GUARDIA wrote:
> I'm sorry but when I did the cut and paste, last night, I've forgotten
> some code lines.  Here they are. They had to be inserted after the "}"
> after line #143
> 
>               jwx_event.SetPosition(m_lastposition);
>                 jwx_event.SetTimestamp(j_evt.time);
>                 jwx_event.SetJoystick(m_joystick);
>                 jwx_event.SetZPosition(m_axe[3]);
>                 jwx_event.SetEventObject(m_catchwin);
> 
>                 if (m_catchwin)
>                     m_catchwin->AddPendingEvent(jwx_event);

Thanks for this, I've applied this to the git tree, so it should be in
the next upload.

Looking at upstream SVN trunk, this seems to have been addressed in
2.9.x.  I'll forward the patch to upstream anyway, so they can fix this
in any further 2.8.x releases.

Incidentally, it's more helpful to send a patch then try to describe the
changes - then there's no scope for misunderstanding, and patches can be
applied by the "patch" tool automatically, often even if the file has
changed since the patch was generated.  Short version:

cp src/unix/joystick.cpp src/unix/joystick.cpp.orig
<edit src/unix/joystick.cpp>
diff -u src/unix/joystick.cpp.orig src/unix/joystick.cpp > joystick-fix.patch

I've attached the patch I actually applied for reference.

Cheers,
    Olly
Patch by Jean GUARDIA taken from:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=568702

diff --git a/src/unix/joystick.cpp b/src/unix/joystick.cpp
index 411f96a..1deacbc 100644
--- a/src/unix/joystick.cpp
+++ b/src/unix/joystick.cpp
@@ -141,6 +141,15 @@ void* wxJoystickThread::Entry()
                         //       is for some other axes.
                         break;
                 }
+
+                jwx_event.SetPosition(m_lastposition);
+                jwx_event.SetTimestamp(j_evt.time);
+                jwx_event.SetJoystick(m_joystick);
+                jwx_event.SetZPosition(m_axe[3]);
+                jwx_event.SetEventObject(m_catchwin);
+
+                if (m_catchwin)
+                    m_catchwin->AddPendingEvent(jwx_event);
             }
 
             if (j_evt.type & JS_EVENT_BUTTON)

Reply via email to