[RESOLVED] How to read the frame rate using simconnect?

ppp333ddd_
Posts: 58
Joined: Fri Aug 18, 2017 1:04 am

[RESOLVED] How to read the frame rate using simconnect?

Postby ppp333ddd_ » Fri May 25, 2018 9:49 am

Hi,
Does SimConnect provide a var for users to read the frame rate of P3D? In var list I cannot find it. I only found a structure

Code: Select all

struct SIMCONNECT_RECV_EVENT_FRAME : public SIMCONNECT_RECV_EVENT { float fFrameRate; float fSimSpeed; };
So I tried to read SIMCONNECT_RECV_EVENT_FRAME.fFrameRate as other variables which are listed in the variable table but failed. I did not find any working examples for similar situations. Thanks for any help.

Jeff

adiemus
Posts: 116
Joined: Fri Mar 16, 2012 4:19 am
Contact:

Re: How to read the frame rate using simconnect?

Postby adiemus » Fri May 25, 2018 3:20 pm

Works fine here in P3D v4, going all the way back to FSX.

That structure is returned by the "Frame" event you can subscribe to via SimConnect_SubscribeToSystemEvent(). This will call your SimConnect callback with RECV_ID set to SIMCONNECT_RECV_ID_EVENT_FRAME, which in turn carries a populated SIMCONNECT_RECV_EVENT_FRAME structure that you can read the actual data from.

ppp333ddd_
Posts: 58
Joined: Fri Aug 18, 2017 1:04 am

Re: How to read the frame rate using simconnect?

Postby ppp333ddd_ » Tue May 29, 2018 2:31 am

Hi adiemus,

Thanks. And I also found an SDK example called Managed System Event which is very helpful.

Jeff


Return to “Software Development Kit (SDK) Questions”

Who is online

Users browsing this forum: No registered users and 2 guests