Mouse Speed Functions Additions
BlitzMax Forums/BlitzMax Module Tweaks/Mouse Speed Functions Additions
| ||
Hey! After reading in the code archives that people were having trouble getting MouseXSpeed(), MouseYSpeed(), and MouseZSpeed() to work like the Blitz3D functions, I went into the BlitzMax source to see if I could help. I modified BRL.System and BRL.PolledInput and got everything working like it should. (I tested them with a MiniB3D example.) BRL.System BRL.PolledInput Since this is a private forum, I hope I'm allowed to post the source to these modules! Hopefully, these modifications can be added to SVN? |
| ||
Does it provide the same results on all platforms? |
| ||
I only have a Windows computer, but it should. I didn't add any platform specific code. |
| ||
Can I have some test code for Linux then, coz I'm lazy. |
| ||
Hmmm...I obviously didn't give enough detail in the other thread, so I fixed the incorrect Z axis handling... |
| ||
Can I have some test code for Linux then, coz I'm lazy. Sure. Here's the MiniB3D example I used: |
| ||
Tested in window/fullscreen on ubuntu hardy, also tested Yan's version. Both work fine. Fixed the incorrect Z axis handling... I'm not sure those two additions are necessary since mouse z state resets itself. |
| ||
I'm afraid, you're mistaken. ;op Try this with the original version... ...Play around with the zoom and then press 'M'...Oops... ;o) The same thing will happen when focus is lost too. Hence the *necessary* modifications. :o) [edit] You may have to increase the scale multiplier to see the effect clearly as I haven't actually tried either version, TBH. [/edit] |
| ||
Ok, thanks. I see what you mean. |
| ||
Can someone with a Mac test this? |
| ||
It would be very helpful if someone with a Mac could test this. I really would like for this to be included in the next update. |
| ||
Hi Ked, works as expected on my panther g3 ppc laptop. I only tested mousex and y because of the trackpad though. I'll try to get a usb mouse to test mouse z. I used Yan's tweaked code and your basic test code as I don't have minib3d installed. Also, could you wrap your code in codebox tags? Would be nice. |
| ||
Thanks, markcw! Let me know what you get with the usb mouse. Updated top. |
| ||
Ok, I got a usb mouse this morning and mouse z also works fine in your basic test code. Cheers for the edit. |
| ||
Awesome! I have a question, though: What kind of results were you getting? Mark wanted to make sure it worked on Mac because: Mac ... seems to sample mouse at more frequent intervals... |
| ||
Well I'm not sure what you mean. The basic test code really only prints negative or positive values and then returns to zero, as for the values I didn't notice anything unusual. |
| ||
Well I'm not sure what you mean. The basic test code really only prints negative or positive values and then returns to zero, as for the values I didn't notice anything unusual. I meant if you were getting any doubled return values or something like that. Anyway, thanks again for your help! Emailing Mark now... |