Sign in to follow this  

Performance Problem

This topic is 3863 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

Hiya, I just converted my engine from a static library to a DLL, but now I'm having a really weird problem... The main processing loop checks for windows messages using PeekMessage(), and processes a frame if none are present. It worked fine until now, when the application seems to just hang when it is started. After stepping through parts of the code, it seems that no frames are ever processed because the message queue is constantly filled with message '275', which I believe is a WM_TIMER event. I have no idea what's going on, as the only timing function I use is timeGetTime(). Does anyone have any suggestions as to what the problem might be? Many thanks for any help [smile] - this is doing my head in!

Share this post


Link to post
Share on other sites
Windows sends lots of messages to your application and it has its own reasons for doing so; you're probably best off not trying to understand why in too much detail for now.

IIRC you need to actually consume messages with GetMessage() as well (or TranslateMessage() and DispatchMessage()), according to which messages you're actually interested in. Also, you might receive more than one in the same game loop, so it's typical to use a nested while-loop to clear the queue each game loop.

Share this post


Link to post
Share on other sites

This topic is 3863 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.

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

Sign in to follow this