Jump to content
  • Advertisement
Sign in to follow this  

Question on refresh rate

This topic is 5193 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello guys, I have been working on a GDI+ gauge for a game called Flight Simulator 2004. This gauge is compiled as a .dll in C++. Unfortunately I have some problems with coding a refresh rate for the gauge. I have a windows timer set to 100ms. Every time 100ms pass, a variable is updated. If the variable is bigger than the previous variable's value(when the class was drawn, then I draw the class. ex:
if(pfd_tmr_upd > pfd_tmr_upd_old)
		cxpfd.render(pelement->hdc, &pelement->image_data.final->dim);
		pfd_tmr_upd_old = pfd_tmr_upd;

I set the timer with the Win32 API function SetTimer. I need a pop-up for this gauge, so I have the same gauge being run as a pop-up. The problem is that the whole class is NOT being called when the pop-up is displayed. I differentiate between the pop-up and original gauge with a special parameter, but for some odd reason, the whole class will not render. If I comment out the if statement, then everything is fine, but I really need this timer for performance issues. I double checked that I am not calling the same timer more than once before killing it. Thank you very much for your help in advance. Sincerely, Tiberiu Brasov [Edited by - tiberiu11 on July 28, 2005 10:39:23 AM]

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!