1
Window / Switching between event processors
« on: March 17, 2014, 07:42:00 am »
Is there a best practice for switching between event handling functions?
I'm working on an application with several different modes that I need to switch between, each with different requirements for event processing. (They each have their own "game loop")
Currently, these event processors are member functions of different classes. I flip a boolean inside of an event processor when it's time to move to the next, exiting that game loop. When that loop exits, it sends a code that instantiates an object of the corresponding mode, and the next loop starts.
What I'm worried about is the delay between the different game loops. If it's too long, will the window start "Not Responding"? I'm experiencing some fairly hard to reproduce "not responding" crashes now, and I'm wondering if this is the problem.
Any alternate techniques or critiques of my design will be greatly appreciated. Thank you.
I'm working on an application with several different modes that I need to switch between, each with different requirements for event processing. (They each have their own "game loop")
Currently, these event processors are member functions of different classes. I flip a boolean inside of an event processor when it's time to move to the next, exiting that game loop. When that loop exits, it sends a code that instantiates an object of the corresponding mode, and the next loop starts.
What I'm worried about is the delay between the different game loops. If it's too long, will the window start "Not Responding"? I'm experiencing some fairly hard to reproduce "not responding" crashes now, and I'm wondering if this is the problem.
Any alternate techniques or critiques of my design will be greatly appreciated. Thank you.