[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] Popups
On Thu, 2013-03-28 at 03:25 +0100, Helmut Karlowski wrote:
> What exactly causes your program to stop? I just made a test with an own
> app, and the TIMER-events from evnt_mult arrived while the popup was
> opened (I logged the time), so I don't see any reason to change something.
I was 100% sure that you were wrong here, so I wrote my own test-app.
But you're right, timer events are delivered even when the Thing! popups
were open.
But if you try to lock the screen in your test-app, e.g. something
like...
while(evnt_mesag(2000,0))
{
wind_update(BEG_UPDATE);
printf("evnt_timer returned at %ld\n", Gettime());
wind_update(END_UPDATE);
}
...you will see that the timer-events are *not* delivered when your
test-app tries to lock the screen while it's already locked.
wind_update() will block until the screen is released by the other
application.
I think this is the real problem with mxPlay.
Mikro should call wind_update() like this instead:
wind_update(BEG_UPDATE|0x100)
This will not block, instead it will return with an error value (0). So
check the return-value of wind_update(BEG_UPDATE|0x100) and just return
if it returns 0. If not, continue as normal. I think this will fix the
problem.
Jo Even