Jump to content
The simFlight Network Forums

FSUIPC C++ Access to Buttons


Recommended Posts

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.

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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 by Tom68
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.