Jump to content
  • Advertisement
Sign in to follow this  
MrChrisnis

SDL Splash Screens

This topic is 2182 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 have an SDL game with a splash screen on right now, but for my splash screen I have created a new SDL_Event and a while loop for the splash screen separate to that of the game loop. I was just wondering if there is an easier way of creating the splash screen as right now the game requires two presses of Escape of the X button to quit out (Which I am guessing is because of the loop not properly closing?)

Thanks
Chris

Share this post


Link to post
Share on other sites
Advertisement
It is hard to say why it is happening without seeing the code, but the core problem is that when you detect such a "exit event", you must not only close the splash screen but you must ensure that the rest of the application isn't started. A simple way would be to return from main(), if your splash screen event loop is in main() (obviously you'll need to run any necessary cleanup code).

If your splash screen is in a function or class, you need a way to return the fact that it was closed, rather than completing.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!