From: Frederic B. <fre...@fr...> - 2011-01-30 12:58:37
|
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 |
From: James T. <zak...@ma...> - 2011-01-30 19:41:58
|
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 |
From: Frederic B. <fre...@fr...> - 2011-01-30 19:43:35
|
> > 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 |
From: Gene B. <ge...@de...> - 2011-01-30 21:12:58
|
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. |
From: Csaba H. <csa...@gm...> - 2011-01-30 14:24:58
|
On Sun, Jan 30, 2011 at 1:58 PM, Frederic Bouvier <fre...@fr...> 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 |
From: Frederic B. <fre...@fr...> - 2011-01-30 19:51:29
|
----- "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 |
From: Csaba H. <csa...@gm...> - 2011-01-30 21:43:42
|
On Sun, Jan 30, 2011 at 8:51 PM, Frederic Bouvier <fre...@fr...> 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 @@ <command>reinit</command> <subsystem>input</subsystem> </binding> + <binding> + <command>nasal</command> + <script>gui.menuEnable("joystick-info", size(props.globals.getNode("/input/joysticks").getChildren("js")));</script> + </binding> </item> <item> -- Csaba/Jester |