Hello all, I’m newbie here and I have some problem.
First, I google and found this message :-
http://www.devolution.com/pipermail/sdl/2003-July/055521.html
It show the same problem that i faced, but no solution there.
My problem is , in Window Mode, application seems like it does not
response to mouse event (it does not generate mouse event when mouse is
clicked) even if
SDL_WM_GrabInput is called. And also , after some click or draging the
title bar, the window become white and “Not Responding” is shown on
title (but it is still draw and get input from keyboard).
This problem is not found on Full-Screen Mode.
Here is the rendering code :-
int UpdateScreen(void* data)
{
static long exframe = SDL_GetTicks();
while(true)
{
//Delay each frame for approx 33ms
//SDL_Delay(33);
//Start Render new Frame
SDL_LockMutex(mutex);
long now = SDL_GetTicks();
if(now-exframe >=33)
{
exframe = now;
//Clear Frame Buffer
SDL_FillRect(backBuffer,NULL,0xffffffff);
//Draw Text to Screen
SDL_BlitSurface(background,NULL,backBuffer,NULL);
box->Draw(backBuffer);
SDL_BlitSurface(messageBuffer,NULL,backBuffer,NULL);
}
//Do Event
SDL_Event event;
while(SDL_PollEvent(&event)==1)
{
box->ActionPerformed(event);
};
//Flip Frame Buffer
SDL_Flip(backBuffer);
SDL_UnlockMutex(mutex);
//Finish Render Frame
}
return 0;
}
working on the separated Thread.
Using SDL 1.2.9 with SDL_TTF and SDL_image, GCC 3.4.2 (MINGW), WindowsXP
Pro SP2 and DirectX9.0c.