Peter Dons Tychsen wrote:
OK. Please review this diff:
I will re-submit it if you like it.
/Pedro
Alright looks good now (you might want to remove the extra white space your patch adds - git complains about those). Just left to make the same change to the other joystick interface :)
BTW don't forget to cc: the wine-devel list when you replying.
Vitaliy.
On Sun, 2007-07-29 at 17:43 -0600, Vitaliy Margolen wrote:
Peter Dons Tychsen wrote:
OK. Please review this diff:
I will re-submit it if you like it.
/Pedro
Alright looks good now (you might want to remove the extra white space your patch adds - git complains about those). Just left to make the same change to the other joystick interface :)
BTW don't forget to cc: the wine-devel list when you replying.
Vitaliy.
OK. I still feel that trying to sync joystick_linuxinput.c and joystick_linux.c is out of scope for this patch. But as my steadiness has limits i have done some of it anyway... :). I have kept the changes modest.
Please take a look at the new patch.
On another note i will agree with you that it would be practical if the two files had similar (or maybe even shared) code. Redundant code is never very practical as it always ends up as this very example. The two implementations which were supposed to identical always drift apart. If things are supposed to do the same, keep them together to begin with.
Thanks,
/pedro
On Mon, 2007-07-30 at 21:20 +0200, Peter Dons Tychsen wrote:
On Sun, 2007-07-29 at 17:43 -0600, Vitaliy Margolen wrote:
Peter Dons Tychsen wrote:
OK. Please review this diff:
I will re-submit it if you like it.
/Pedro
Alright looks good now (you might want to remove the extra white space your patch adds - git complains about those). Just left to make the same change to the other joystick interface :)
BTW don't forget to cc: the wine-devel list when you replying.
Vitaliy.
OK. I still feel that trying to sync joystick_linuxinput.c and joystick_linux.c is out of scope for this patch. But as my steadiness has limits i have done some of it anyway... :). I have kept the changes modest.
Please take a look at the new patch.
On another note i will agree with you that it would be practical if the two files had similar (or maybe even shared) code. Redundant code is never very practical as it always ends up as this very example. The two implementations which were supposed to identical always drift apart. If things are supposed to do the same, keep them together to begin with.
Thanks,
/pedro
Maybe i would be more successful if i actually attached the patch.... :-)
Here it is....
Peter Dons Tychsen wrote:
On Mon, 2007-07-30 at 21:20 +0200, Peter Dons Tychsen wrote:
On Sun, 2007-07-29 at 17:43 -0600, Vitaliy Margolen wrote:
Peter Dons Tychsen wrote:
OK. Please review this diff:
I will re-submit it if you like it.
/Pedro
Alright looks good now (you might want to remove the extra white space your patch adds - git complains about those). Just left to make the same change to the other joystick interface :)
BTW don't forget to cc: the wine-devel list when you replying.
Vitaliy.
OK. I still feel that trying to sync joystick_linuxinput.c and joystick_linux.c is out of scope for this patch. But as my steadiness has limits i have done some of it anyway... :). I have kept the changes modest.
Please take a look at the new patch.
On another note i will agree with you that it would be practical if the two files had similar (or maybe even shared) code. Redundant code is never very practical as it always ends up as this very example. The two implementations which were supposed to identical always drift apart. If things are supposed to do the same, keep them together to begin with.
Thanks,
Maybe i would be more successful if i actually attached the patch.... :-)
Here it is....
Just few small things left:
-#undef MAX_JOYSTICKS
As I mentioned earlier you should move this instead of removing it completely.
static HRESULT joydev_create_deviceW(IDirectInputImpl *dinput, REFGUID rguid, REFIID riid, LPDIRECTINPUTDEVICEW* pdev) {
- int i;
- find_joydevs();
You removed a really important function call here.
+static HRESULT joydev_create_deviceA(IDirectInputImpl *dinput, REFGUID rguid, REFIID riid, LPDIRECTINPUTDEVICEA* pdev) +{
- unsigned short index;
- if ((index = get_joystick_index(rguid)) < MAX_JOYDEV) {
- if ((riid == NULL) ||
If you reformat the whole function, please make it 4-space indented.
Vitaliy.
On Tue, 2007-07-31 at 06:34 -0600, Vitaliy Margolen wrote:
Peter Dons Tychsen wrote:
On Mon, 2007-07-30 at 21:20 +0200, Peter Dons Tychsen wrote:
On Sun, 2007-07-29 at 17:43 -0600, Vitaliy Margolen wrote:
Peter Dons Tychsen wrote:
OK. Please review this diff:
I will re-submit it if you like it.
/Pedro
Alright looks good now (you might want to remove the extra white space your patch adds - git complains about those). Just left to make the same change to the other joystick interface :)
BTW don't forget to cc: the wine-devel list when you replying.
Vitaliy.
OK. I still feel that trying to sync joystick_linuxinput.c and joystick_linux.c is out of scope for this patch. But as my steadiness has limits i have done some of it anyway... :). I have kept the changes modest.
Please take a look at the new patch.
On another note i will agree with you that it would be practical if the two files had similar (or maybe even shared) code. Redundant code is never very practical as it always ends up as this very example. The two implementations which were supposed to identical always drift apart. If things are supposed to do the same, keep them together to begin with.
Thanks,
Maybe i would be more successful if i actually attached the patch.... :-)
Here it is....
Just few small things left:
-#undef MAX_JOYSTICKS
As I mentioned earlier you should move this instead of removing it completely.
static HRESULT joydev_create_deviceW(IDirectInputImpl *dinput, REFGUID rguid, REFIID riid, LPDIRECTINPUTDEVICEW* pdev) {
- int i;
- find_joydevs();
You removed a really important function call here.
+static HRESULT joydev_create_deviceA(IDirectInputImpl *dinput, REFGUID rguid, REFIID riid, LPDIRECTINPUTDEVICEA* pdev) +{
- unsigned short index;
- if ((index = get_joystick_index(rguid)) < MAX_JOYDEV) {
- if ((riid == NULL) ||
If you reformat the whole function, please make it 4-space indented.
Vitaliy.
OK. Here is the new patch:
/pedro
Peter Dons Tychsen wrote:
On Tue, 2007-07-31 at 06:34 -0600, Vitaliy Margolen wrote:
Peter Dons Tychsen wrote:
On Mon, 2007-07-30 at 21:20 +0200, Peter Dons Tychsen wrote:
On Sun, 2007-07-29 at 17:43 -0600, Vitaliy Margolen wrote:
Peter Dons Tychsen wrote:
OK. Please review this diff:
I will re-submit it if you like it.
/Pedro
Alright looks good now (you might want to remove the extra white space your patch adds - git complains about those). Just left to make the same change to the other joystick interface :)
BTW don't forget to cc: the wine-devel list when you replying.
Vitaliy.
OK. I still feel that trying to sync joystick_linuxinput.c and joystick_linux.c is out of scope for this patch. But as my steadiness has limits i have done some of it anyway... :). I have kept the changes modest.
Please take a look at the new patch.
On another note i will agree with you that it would be practical if the two files had similar (or maybe even shared) code. Redundant code is never very practical as it always ends up as this very example. The two implementations which were supposed to identical always drift apart. If things are supposed to do the same, keep them together to begin with.
Thanks,
Maybe i would be more successful if i actually attached the patch.... :-)
Here it is....
Just few small things left:
-#undef MAX_JOYSTICKS
As I mentioned earlier you should move this instead of removing it completely.
static HRESULT joydev_create_deviceW(IDirectInputImpl *dinput, REFGUID rguid, REFIID riid, LPDIRECTINPUTDEVICEW* pdev) {
- int i;
- find_joydevs();
You removed a really important function call here.
+static HRESULT joydev_create_deviceA(IDirectInputImpl *dinput, REFGUID rguid, REFIID riid, LPDIRECTINPUTDEVICEA* pdev) +{
- unsigned short index;
- if ((index = get_joystick_index(rguid)) < MAX_JOYDEV) {
- if ((riid == NULL) ||
If you reformat the whole function, please make it 4-space indented.
Vitaliy.
OK. Here is the new patch:
Looks good to me. The problem is, it doesn't work for me (USB joystick). I think you forgot to look at how joystick_linuxinput.c handles that data3 field. It's not just 0 based index...
Vitaliy.
On Tue, 2007-07-31 at 20:05 -0600, Vitaliy Margolen wrote:
Peter Dons Tychsen wrote:
On Tue, 2007-07-31 at 06:34 -0600, Vitaliy Margolen wrote:
Peter Dons Tychsen wrote:
On Mon, 2007-07-30 at 21:20 +0200, Peter Dons Tychsen wrote:
On Sun, 2007-07-29 at 17:43 -0600, Vitaliy Margolen wrote:
Peter Dons Tychsen wrote: > OK. Please review this diff: > > I will re-submit it if you like it. > > /Pedro Alright looks good now (you might want to remove the extra white space your patch adds - git complains about those). Just left to make the same change to the other joystick interface :)
BTW don't forget to cc: the wine-devel list when you replying.
Vitaliy.
OK. I still feel that trying to sync joystick_linuxinput.c and joystick_linux.c is out of scope for this patch. But as my steadiness has limits i have done some of it anyway... :). I have kept the changes modest.
Please take a look at the new patch.
On another note i will agree with you that it would be practical if the two files had similar (or maybe even shared) code. Redundant code is never very practical as it always ends up as this very example. The two implementations which were supposed to identical always drift apart. If things are supposed to do the same, keep them together to begin with.
Thanks,
Maybe i would be more successful if i actually attached the patch.... :-)
Here it is....
Just few small things left:
-#undef MAX_JOYSTICKS
As I mentioned earlier you should move this instead of removing it completely.
static HRESULT joydev_create_deviceW(IDirectInputImpl *dinput, REFGUID rguid, REFIID riid, LPDIRECTINPUTDEVICEW* pdev) {
- int i;
- find_joydevs();
You removed a really important function call here.
+static HRESULT joydev_create_deviceA(IDirectInputImpl *dinput, REFGUID rguid, REFIID riid, LPDIRECTINPUTDEVICEA* pdev) +{
- unsigned short index;
- if ((index = get_joystick_index(rguid)) < MAX_JOYDEV) {
- if ((riid == NULL) ||
If you reformat the whole function, please make it 4-space indented.
Vitaliy.
OK. Here is the new patch:
Looks good to me. The problem is, it doesn't work for me (USB joystick). I think you forgot to look at how joystick_linuxinput.c handles that data3 field. It's not just 0 based index...
Vitaliy.
Oh no!
I told you i should bot have merged the changes over to joystick_linuxinput as they were too different... :-)
OK, so how do i force my system to use the other implementation (so i can test it) ?
I have a Logitech WingMan Extreme (old version).
/pedro
Peter Dons Tychsen wrote:
On Tue, 2007-07-31 at 20:05 -0600, Vitaliy Margolen wrote:
Peter Dons Tychsen wrote:
On Tue, 2007-07-31 at 06:34 -0600, Vitaliy Margolen wrote:
Peter Dons Tychsen wrote:
On Mon, 2007-07-30 at 21:20 +0200, Peter Dons Tychsen wrote:
On Sun, 2007-07-29 at 17:43 -0600, Vitaliy Margolen wrote: > Peter Dons Tychsen wrote: >> OK. Please review this diff: >> >> I will re-submit it if you like it. >> >> /Pedro > Alright looks good now (you might want to remove the extra white space your > patch adds - git complains about those). Just left to make the same change > to the other joystick interface :) > > BTW don't forget to cc: the wine-devel list when you replying. > > Vitaliy. OK. I still feel that trying to sync joystick_linuxinput.c and joystick_linux.c is out of scope for this patch. But as my steadiness has limits i have done some of it anyway... :). I have kept the changes modest.
Please take a look at the new patch.
On another note i will agree with you that it would be practical if the two files had similar (or maybe even shared) code. Redundant code is never very practical as it always ends up as this very example. The two implementations which were supposed to identical always drift apart. If things are supposed to do the same, keep them together to begin with.
Thanks,
Maybe i would be more successful if i actually attached the patch.... :-)
Here it is....
Just few small things left:
-#undef MAX_JOYSTICKS
As I mentioned earlier you should move this instead of removing it completely.
static HRESULT joydev_create_deviceW(IDirectInputImpl *dinput, REFGUID rguid, REFIID riid, LPDIRECTINPUTDEVICEW* pdev) {
- int i;
- find_joydevs();
You removed a really important function call here.
+static HRESULT joydev_create_deviceA(IDirectInputImpl *dinput, REFGUID rguid, REFIID riid, LPDIRECTINPUTDEVICEA* pdev) +{
- unsigned short index;
- if ((index = get_joystick_index(rguid)) < MAX_JOYDEV) {
- if ((riid == NULL) ||
If you reformat the whole function, please make it 4-space indented.
OK. Here is the new patch:
Looks good to me. The problem is, it doesn't work for me (USB joystick). I think you forgot to look at how joystick_linuxinput.c handles that data3 field. It's not just 0 based index...
I told you i should bot have merged the changes over to joystick_linuxinput as they were too different... :-)
OK, so how do i force my system to use the other implementation (so i can test it) ?
I have a Logitech WingMan Extreme (old version).
Just (re)move /dev/input/js*. Or in dinput change device name to point to non-existent directory/device (in joystick_linux.c).
Vitaliy.
On Thu, Aug 02, 2007 at 06:54:12AM -0600, Vitaliy Margolen wrote:
OK, so how do i force my system to use the other implementation (so i can test it) ? I have a Logitech WingMan Extreme (old version).
Just (re)move /dev/input/js*. Or in dinput change device name to point to non-existent directory/device (in joystick_linux.c).
or on systems with udev and friends just dont load joydev. just evdev. then this devices will not be created (even on non-udev boxes /dev/input/js* would not work).
On Thu, 2007-08-02 at 06:54 -0600, Vitaliy Margolen wrote:
Peter Dons Tychsen wrote:
On Tue, 2007-07-31 at 20:05 -0600, Vitaliy Margolen wrote:
Peter Dons Tychsen wrote:
On Tue, 2007-07-31 at 06:34 -0600, Vitaliy Margolen wrote:
Peter Dons Tychsen wrote:
On Mon, 2007-07-30 at 21:20 +0200, Peter Dons Tychsen wrote: > On Sun, 2007-07-29 at 17:43 -0600, Vitaliy Margolen wrote: >> Peter Dons Tychsen wrote: >>> OK. Please review this diff: >>> >>> I will re-submit it if you like it. >>> >>> /Pedro >> Alright looks good now (you might want to remove the extra white space your >> patch adds - git complains about those). Just left to make the same change >> to the other joystick interface :) >> >> BTW don't forget to cc: the wine-devel list when you replying. >> >> Vitaliy. > OK. I still feel that trying to sync joystick_linuxinput.c and > joystick_linux.c is out of scope for this patch. But as my steadiness > has limits i have done some of it anyway... :). I have kept the changes > modest. > > Please take a look at the new patch. > > On another note i will agree with you that it would be practical if the > two files had similar (or maybe even shared) code. Redundant code is > never very practical as it always ends up as this very example. The two > implementations which were supposed to identical always drift apart. If > things are supposed to do the same, keep them together to begin with. > > Thanks, > Maybe i would be more successful if i actually attached the patch.... :-)
Here it is....
Just few small things left:
-#undef MAX_JOYSTICKS
As I mentioned earlier you should move this instead of removing it completely.
static HRESULT joydev_create_deviceW(IDirectInputImpl *dinput, REFGUID rguid, REFIID riid, LPDIRECTINPUTDEVICEW* pdev) {
- int i;
- find_joydevs();
You removed a really important function call here.
+static HRESULT joydev_create_deviceA(IDirectInputImpl *dinput, REFGUID rguid, REFIID riid, LPDIRECTINPUTDEVICEA* pdev) +{
- unsigned short index;
- if ((index = get_joystick_index(rguid)) < MAX_JOYDEV) {
- if ((riid == NULL) ||
If you reformat the whole function, please make it 4-space indented.
OK. Here is the new patch:
Looks good to me. The problem is, it doesn't work for me (USB joystick). I think you forgot to look at how joystick_linuxinput.c handles that data3 field. It's not just 0 based index...
I told you i should bot have merged the changes over to joystick_linuxinput as they were too different... :-)
OK, so how do i force my system to use the other implementation (so i can test it) ?
I have a Logitech WingMan Extreme (old version).
Just (re)move /dev/input/js*. Or in dinput change device name to point to non-existent directory/device (in joystick_linux.c).
Vitaliy.
OK, fair enough. Even though i did'nt like messing around with joystick_linuxinput.c i should have been smarter than trying to submit something i could not test... :-(
But... tada!... now i have re-fixed it and re-tested both implementations. Its seems stable now. :-)
Please give it another go on your machine Vitaliy.
Cheers,
/Pedro
On Fri, 2007-08-03 at 01:02 +0200, Peter Dons Tychsen wrote:
On Thu, 2007-08-02 at 06:54 -0600, Vitaliy Margolen wrote:
Peter Dons Tychsen wrote:
On Tue, 2007-07-31 at 20:05 -0600, Vitaliy Margolen wrote:
Peter Dons Tychsen wrote:
On Tue, 2007-07-31 at 06:34 -0600, Vitaliy Margolen wrote:
Peter Dons Tychsen wrote: > On Mon, 2007-07-30 at 21:20 +0200, Peter Dons Tychsen wrote: >> On Sun, 2007-07-29 at 17:43 -0600, Vitaliy Margolen wrote: >>> Peter Dons Tychsen wrote: >>>> OK. Please review this diff: >>>> >>>> I will re-submit it if you like it. >>>> >>>> /Pedro >>> Alright looks good now (you might want to remove the extra white space your >>> patch adds - git complains about those). Just left to make the same change >>> to the other joystick interface :) >>> >>> BTW don't forget to cc: the wine-devel list when you replying. >>> >>> Vitaliy. >> OK. I still feel that trying to sync joystick_linuxinput.c and >> joystick_linux.c is out of scope for this patch. But as my steadiness >> has limits i have done some of it anyway... :). I have kept the changes >> modest. >> >> Please take a look at the new patch. >> >> On another note i will agree with you that it would be practical if the >> two files had similar (or maybe even shared) code. Redundant code is >> never very practical as it always ends up as this very example. The two >> implementations which were supposed to identical always drift apart. If >> things are supposed to do the same, keep them together to begin with. >> >> Thanks, >> > Maybe i would be more successful if i actually attached the > patch.... :-) > > Here it is.... Just few small things left:
> -#undef MAX_JOYSTICKS As I mentioned earlier you should move this instead of removing it completely.
> static HRESULT joydev_create_deviceW(IDirectInputImpl *dinput, REFGUID rguid, REFIID riid, LPDIRECTINPUTDEVICEW* pdev) > { > - int i; > - > - find_joydevs(); You removed a really important function call here.
> +static HRESULT joydev_create_deviceA(IDirectInputImpl *dinput, REFGUID rguid, REFIID riid, LPDIRECTINPUTDEVICEA* pdev) > +{ > + unsigned short index; > + > + if ((index = get_joystick_index(rguid)) < MAX_JOYDEV) { > + if ((riid == NULL) || If you reformat the whole function, please make it 4-space indented.
OK. Here is the new patch:
Looks good to me. The problem is, it doesn't work for me (USB joystick). I think you forgot to look at how joystick_linuxinput.c handles that data3 field. It's not just 0 based index...
I told you i should bot have merged the changes over to joystick_linuxinput as they were too different... :-)
OK, so how do i force my system to use the other implementation (so i can test it) ?
I have a Logitech WingMan Extreme (old version).
Just (re)move /dev/input/js*. Or in dinput change device name to point to non-existent directory/device (in joystick_linux.c).
Vitaliy.
OK, fair enough. Even though i did'nt like messing around with joystick_linuxinput.c i should have been smarter than trying to submit something i could not test... :-(
But... tada!... now i have re-fixed it and re-tested both implementations. Its seems stable now. :-)
Please give it another go on your machine Vitaliy.
Cheers,
/Pedro
As usual, i forgot the patch.... getting late inside my head :-)
Here it is...
/p
Peter Dons Tychsen wrote:
OK, fair enough. Even though i did'nt like messing around with joystick_linuxinput.c i should have been smarter than trying to submit something i could not test... :-(
But... tada!... now i have re-fixed it and re-tested both implementations. Its seems stable now. :-)
Please give it another go on your machine Vitaliy.
As usual, i forgot the patch.... getting late inside my head :-)
Here it is...
Looks good now. And it even works :) Send it it.
Vitaliy.