mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Do not close game if custom level has assets issues
It's quite rude to close the game entirely if there is trouble with assets. Instead, just unload the assets and gracefully return to the title screen.
This commit is contained in:
@@ -483,7 +483,19 @@ int main(int argc, char *argv[])
|
||||
game.init();
|
||||
|
||||
// This loads music too...
|
||||
graphics.reloadresources();
|
||||
if (!graphics.reloadresources())
|
||||
{
|
||||
/* Something wrong with the default assets? We can't use them to
|
||||
* display the error message, and we have to bail. */
|
||||
SDL_ShowSimpleMessageBox(
|
||||
SDL_MESSAGEBOX_ERROR,
|
||||
graphics.error_title,
|
||||
graphics.error,
|
||||
NULL
|
||||
);
|
||||
|
||||
VVV_exit(1);
|
||||
}
|
||||
|
||||
game.gamestate = PRELOADER;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user