Re: [Flightgear-devel] Reload joystick config
On Sun, Jan 30, 2011 at 8:51 PM, Frederic Bouvier wrote: > > But if you start without a joystick, you won't be able to open that dialog That is true. Easily fixed by reevaluating the menu state after the reload. Should probably be refactored a little to avoid code duplication (I simply copied the line from gui.nas) diff --git a/gui/menubar.xml b/gui/menubar.xml index 0d2cc52..05c7133 100644 --- a/gui/menubar.xml +++ b/gui/menubar.xml @@ -571,6 +571,10 @@ reinit input + + nasal + gui.menuEnable("joystick-info", size(props.globals.getNode("/input/joysticks").getChildren("js"))); + -- Csaba/Jester -- Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Reload joystick config
On Sun, 30 Jan 2011, Frederic Bouvier wrote: > > Maybe DirectInput would do a better job here, but we still use the > legacy api inherited from the early days of Windows. > DirectInput support would be a huge win for the Windows build. g. -- Proud owner of F-15C 80-0007 http://www.f15sim.com - The only one of its kind. http://www.simpits.org/geneb - The Me-109F/X Project ScarletDME - The red hot Data Management Environment A Multi-Value database for the masses, not the classes. http://www.scarletdme.org - Get it _today_! Political correctness is a doctrine, fostered by a delusional, illogical minority, and rabidly promoted by an unscrupulous mainstream media, which holds forth the proposition that it is entirely possible to pick up a turd by the clean end. -- Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Reload joystick config
- "Csaba Halász" a écrit : > On Sun, Jan 30, 2011 at 1:58 PM, Frederic Bouvier > wrote: > > > > I noticed three things under Windows : > > 1. the state of menu entry "Help > Joystick information" is not modified > > when I remove or add a joystick after start > > Confirmed, but unrelated to the patch. The joystick information > window > does however show the correct data after it is re-opened following a > reload input, even if I have plugged in a different joystick in the > meantime. But if you start without a joystick, you won't be able to open that dialog -Fred -- Frédéric Bouvier http://www.youtube.com/user/fgfred64 Videos -- Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Reload joystick config
> > 2. if I do "Reload input" with the joystick already recognized, axes > > goes wrong and I have to do a Reset to initialize them. > > 3. if I remove the joystick while the joystick information dialog is > > displayed and reload input, fgfs segfault. > > Don't see these problems under debian linux with plib/svn. The Windows functions segfault when we reinit input with the joystick removed. In fact, these functions don't detect that the joystick was removed, although the plug&play system correctly detect the loss of the device. The segfault happens every time, joystick information dialog shown or not, and the symptom is clearly a stack corruption inside the api. Maybe DirectInput would do a better job here, but we still use the legacy api inherited from the early days of Windows. -Fred -- Frédéric Bouvier http://www.youtube.com/user/fgfred64 Videos -- Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Reload joystick config
On 30 Jan 2011, at 14:24, Csaba Halász wrote: >> 2. if I do "Reload input" with the joystick already recognized, axes >>goes wrong and I have to do a Reset to initialize them. >> 3. if I remove the joystick while the joystick information dialog is >>displayed and reload input, fgfs segfault. > > Don't see these problems under debian linux with plib/svn. Same here on Mac all works fine. Is this a platform variation in the PLIB joystick init code, I wonder? This certainly makes me less inclined to merge the change to the release branch - though we could of course add a platform #ifdef James -- Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Reload joystick config
On Sun, Jan 30, 2011 at 1:58 PM, Frederic Bouvier wrote: > > I noticed three things under Windows : > 1. the state of menu entry "Help > Joystick information" is not modified > when I remove or add a joystick after start Confirmed, but unrelated to the patch. The joystick information window does however show the correct data after it is re-opened following a reload input, even if I have plugged in a different joystick in the meantime. > 2. if I do "Reload input" with the joystick already recognized, axes > goes wrong and I have to do a Reset to initialize them. > 3. if I remove the joystick while the joystick information dialog is > displayed and reload input, fgfs segfault. Don't see these problems under debian linux with plib/svn. -- Csaba/Jester -- Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Reload joystick config
Hi, > On 28 Jan 2011, at 09:02, James Turner wrote: > > > Looks good to me, from a visual inspection. I'll apply over the > weekend, and poke some people to test. Depending on when 2.2.0 happens > this might even be worth back-porting, but we should wait for some > positive testing feedback before that. > > This is in 'next' now, and works well for me here - if some other > people could test (on Windows and Linux), then I'll merge this to > 2.2.0 assuming the responses are positive. I noticed three things under Windows : 1. the state of menu entry "Help > Joystick information" is not modified when I remove or add a joystick after start 2. if I do "Reload input" with the joystick already recognized, axes goes wrong and I have to do a Reset to initialize them. 3. if I remove the joystick while the joystick information dialog is displayed and reload input, fgfs segfault. Regards, -Fred -- Frédéric Bouvier http://www.youtube.com/user/fgfred64 Videos -- Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Reload joystick config
On 28 Jan 2011, at 09:02, James Turner wrote: > Looks good to me, from a visual inspection. I'll apply over the weekend, and > poke some people to test. Depending on when 2.2.0 happens this might even be > worth back-porting, but we should wait for some positive testing feedback > before that. This is in 'next' now, and works well for me here - if some other people could test (on Windows and Linux), then I'll merge this to 2.2.0 assuming the responses are positive. Thanks Andreas! James -- Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Reload joystick config
On Fri, Jan 28, 2011 at 10:02 AM, James Turner wrote: > > On 28 Jan 2011, at 08:21, Andreas Gaeb wrote: > >> In the meantime I played around with this a little and came up with the >> attached patch which does what I describe above. This seems to work, >> though I didn't do any checks to rule out the suspected issues. > > Looks good to me, from a visual inspection. I'll apply over the weekend, and > poke some people to test. Depending on when 2.2.0 happens this might even be > worth back-porting, but we should wait for some positive testing feedback > before that. Since FG currently irreversibly loses joystick if it ever gets unplugged and replugged (or if the usb driver reconnects for some reason), and this patch allows for reinitializing the joystick, I certainly vote to get this into the release. Thanks Andreas! -- Csaba/Jester -- Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Reload joystick config
On 28 Jan 2011, at 08:21, Andreas Gaeb wrote: > In the meantime I played around with this a little and came up with the > attached patch which does what I describe above. This seems to work, > though I didn't do any checks to rule out the suspected issues. Looks good to me, from a visual inspection. I'll apply over the weekend, and poke some people to test. Depending on when 2.2.0 happens this might even be worth back-porting, but we should wait for some positive testing feedback before that. Thanks, James -- Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel