Tom68 Posted January 9, 2019 Report Posted January 9, 2019 I've looked at the Lua examples and I can build and run the C++ example in Visual Studio. So I know how to read/write the offsets. In Lua, there are events that can be used to read input from joystick buttons. What's the equivalent in C++? I've searched and really can't find anything. Thanks.
Tom68 Posted January 9, 2019 Author Report Posted January 9, 2019 I guess I should add I'm using FSX with a registered version of FSUIPC 4.973. I just want my C++ program to know when a joystick button is presses.
Pete Dowson Posted January 10, 2019 Report Posted January 10, 2019 4 hours ago, Tom68 said: I've searched and really can't find anything. Then you didn't find offset 03C0! Note that, as it says, you need to actually have the relevant joysticks actually scanned by FSUIPC, which means at least something assigned. But then the same applies in the Lua library facilities. BTW the FSUIPC you are using is out of date. You should update. Pete
Tom68 Posted January 10, 2019 Author Report Posted January 10, 2019 (edited) OK, with 60 pages of numbers, I did miss that one. Thanks. Part of my question was also that Lua seems to have a library call that allows attaching a callback function to provide notification if a button changes. (I think) For C/C++, with just access to an offset, it must be polled to detect when a button changes. True? Also, I just downloaded & registered FSUIPC in the last week or so. I misspoke I actually have 4.974. Is that the latest? Awesome program, by the way! Edited January 10, 2019 by Tom68
John Dowson Posted January 10, 2019 Report Posted January 10, 2019 Quote For C/C++, with just access to an offset, it must be polled to detect when a button changes. True? Yes! You could, of course, write a wrapper around the provided functions to implement a callback mechanism if required... 4.974 is the latest supported version, however there is a version 4.974b which contains an improved Lua ext library (see the 'Updated Modules' support page: ). Cheers, John
Tom68 Posted January 10, 2019 Author Report Posted January 10, 2019 OK. Thanks for you help. And a cool product.
John Dowson Posted January 10, 2019 Report Posted January 10, 2019 Maybe you should take a look at Paul Henty's client dll for .net - I haven't checked myself but I think thats more OO and may have callback facilities....of course, c# not c++. Cheers, John
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now