Hello all. I have been developing my Pocket PC game on windows happily for several months with zero bugs, I squash them as I find them. Then I made the port to gapidraw and then all kinds of weird bugs started popping up.
At first I thought it was something I might have missed since my game is running slower on the ppc, but then I thought about it and my game is totally event driven and the only other thread is my sound thread, so they should run EXACTLY the same no matter what the processor speed, except for the frame rate of course.
Well I started poking around in CGapiApplication and low and behold it has a multithreaded draw function. I could see why you might want this but it is really not necessary since you can happily put your draw call in the message loop, I am getting over 400fps on my desktop app doing this.
So now my app is crashing in all sorts of weird places since it was designed for single threaded running. So to fix this I modified CGapiApplication to use some critical sections when drawing and dispatching messages, I guess I could also ditch the draw thread which would free up some resources for ce.
Anyways if anyone wants the code I can post it, pretty simple actually, just put a cs around the message loop parts and the processnextframe call.
At first I thought it was something I might have missed since my game is running slower on the ppc, but then I thought about it and my game is totally event driven and the only other thread is my sound thread, so they should run EXACTLY the same no matter what the processor speed, except for the frame rate of course.
Well I started poking around in CGapiApplication and low and behold it has a multithreaded draw function. I could see why you might want this but it is really not necessary since you can happily put your draw call in the message loop, I am getting over 400fps on my desktop app doing this.
So now my app is crashing in all sorts of weird places since it was designed for single threaded running. So to fix this I modified CGapiApplication to use some critical sections when drawing and dispatching messages, I guess I could also ditch the draw thread which would free up some resources for ce.
Anyways if anyone wants the code I can post it, pretty simple actually, just put a cs around the message loop parts and the processnextframe call.