kind of works? reading multiple mice: any c programmers want to look at this?
#3
(09-06-2022, 09:07 PM)JRace Wrote:
(09-06-2022, 08:08 PM)madscijr Wrote: Thanks to the help from the kind folks here with compiling C with QB64's built in compiler, I made some progress compiling this Raw Input API multi-mouse code, and got 2 of the examples "HelloRawInput.c" and "ShowMultipleMiceValues.c" to compile and run.
...
and was hoping someone more familiar with that stuff might be able to help figure it out or guide me through some/any of it? 

Looking at the errors, raw_mouse.c has no WinMain function, so it needs to be compiled to an object (".o") file, then linked to a Windows GUI program which uses it.  In this case, that Windows GUI program is raw_mouse_test.c.

I've modified the batch file to get everything compiled.  The compiler issues a few warnings, but finishes compilation.  raw_mouse_test.exe seems to work, although I only have one mouse to test it on.  ZIP file attached to post.
...

Thanks so much for taking the time to look at this and get it compiling. 
I'm away from the PC, but can't wait to give raw_mouse_test a spin with both mice plugged in!

UPDATE: Well, it runs! But due to Windows having one mouse pointer, it seems to be writing the values for whichever was the last mouse moved, for all the mice. At least it can differentiate between them - I'm going to play with the code and try to get it to track the values for each mouse individually, and only update mouse n's value when that mouse is the one being moved. Wish me good luck :-)
Reply


Messages In This Thread
RE: kind of works? reading multiple mice: any c programmers want to look at this? - by madscijr - 09-06-2022, 09:31 PM



Users browsing this thread: 45 Guest(s)