[SDL] Not Response on Window Mode (on WindowsXP)
9tawan at gmail.com
Sat Nov 12 06:51:28 PST 2005
Bill Kendrick wrote:
> On Sat, Nov 12, 2005 at 03:18:43AM +0700, Wutipong Wongsakuldej wrote:
>> This problem is not found on Full-Screen Mode.
> You are doing SDL_Flip() a _lot_, even when nothing has changed
> and it hasn't been "33" ms. (e.g., if there were no events, it still
> SDL_Flip()'s, which might be expensive, esp. in windowed / software surface
> Try only SDL_Flip()'ing when you actually do the SDL_BlitSurface() stuff.
I've changed to this :-
int UpdateScreen(void* data)
static long exframe = SDL_GetTicks();
//Delay each frame for approx 33ms
//Start Render new Frame
long now = SDL_GetTicks();
exframe = now;
//Clear Frame Buffer
//Draw Text to Screen
//Flip Frame Buffer
//Finish Render Frame
And the result is still the same (I mean, window is not movable, and
become not respond).
>> Here is the rendering code :-
>> <code snip>....
> SDL mailing list
> SDL at libsdl.org
More information about the SDL