Sign in to follow this  

SDL Splash Screens

This topic is 2055 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
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

This topic is 2055 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.

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