Jump to content
  • Advertisement
Sign in to follow this  

Unity SDL window move event issues

This topic is 3623 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!