PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Screen tear

I'm having trouble using PHAL 0.7.7 with the screen updates tearing on 3 different devices I've tried now - so it's something I've done wrong but I'm not sure where - have been comparing with a project I did a while back that didn't (and still doesn't) have the same issue. It's not just slightly noticible - it really stands out.

Has anyone else experienced this problem and know the solution off the top of your head?

I've tried the following:
- handling WM_ERASEBKGND, WM_PAINT
- using VSYNC option on Swap()
- slowing framerate to 10fps - doesn't matter what the frame rate is, and I can put sleeps in everywhere it still does it.

Thanks.
Unfortunately it is not possible to sync the update on most devices (especially newer ones).
Thanks for your reply, but I don't think it's PocketHAL's problem because I wrote a game a while back using PHAL and it at around 40fps with no screen tear at all on the same devices I've tested my new app on.

I think I've done something wrong with creating the window - but I've tried an app that just stays in a loop without processing any windows msgs and it still has the screen tearing.

Is there any specific settings / things that need to be done / not done when creating the main app window?
I don't know if this is the case, but when I was developing walls&balls I had a similar problem. The problem was that the framerate was higher than 50, and the hp1940 gave problems.
My 3630 (I think, it's been 2 years I haven't even open it) didn't show that problem, but I can't say it was because it didn't reach 50fps , or just the problem was not there.

I limited the framerate and everything run smoothly from that moment (beware, by limiting I mean not giving the chance to pocketHAL to update the screen faster than X FPS, painting over the same screen doesn't count as limiting ;) ) However if you say you're putting sleeps, the screen is probably not updating so often, so this is probably not the problem :(
PDA screens typically update at 50-60 Hz. Maybe you are around that frequency and this is causing what you see?

Otherwise I can only suggest looking at the PocketHAL samples and compare how the window is created.