Skip to main content
gamedev.net
🔒 Locked

SDL window move event issues

Started by CMspice Aug 14, 2008 at 10:59 PM 0 replies 750+ views
Original Post
CMspice
CMspice
Hi, I suppose I should introduce myself. I'm an aspiring indy game developer (go ahead, laugh). I haven't been taking too big a part in the community yet since I don't have much to show. Anyways, I bumped into a technical issue in the engine I'm working on with SDL and I'm hoping someone with experience will know whats happening and what to do. So right now, I'm using a double buffer since that's what all the tutorials told me to use. I'm unfamiliar with the alternatives but I'm pretty happy with double buff. My code runs an indefinite loop that blanks the screen, renders everything, and then flips the screen using SDL_Flip. My sprite is 12 frames and the code will wait so many milliseconds before switching over to render the next frame. My engine doesn't use the halt function because I wanted everything to be frame rate independent. The problem I'm having is whenever I move the window. The game pauses and the screen stops updating, but when I let go, it'll suddenly render all the frames that it was suppose to have rendered while I was moving the window in very quick succession. I have a bunch of theories as to why this happens but that's pretty unimportant (although if someone could explain to me why, that'd be great). I just want to be able to pause my engine entirely when the window is being moved. Thanks in advance.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.