Sign in to follow this  

Unity SDL window move event issues

Recommended Posts

CMspice    122
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.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this