GUI skins: The loader now recovers cleanly from errors and displays a message that says what's the problem in the image.

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@881 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Yves Rizoud
2009-06-21 18:34:57 +00:00
parent 0d54a9524f
commit f683d9ff2e
7 changed files with 244 additions and 126 deletions

11
main.c
View File

@@ -534,12 +534,13 @@ int Init_program(int argc,char * argv[])
Analyze_command_line(argc,argv);
// Load sprites, palette etc.
Gfx = (T_Gui_skin *)malloc(sizeof(T_Gui_skin));
if (Gfx == NULL)
Error(ERROR_MEMORY);
strcpy(Gui_skin_file+6,Config.SkinFile);
Load_graphics(Gfx, Gui_skin_file);
Gfx = Load_graphics(Gui_skin_file);
if (Gfx == NULL)
{
printf("%s", Gui_loading_error_message);
Error(ERROR_GUI_MISSING);
}
// Infos sur les trames (Sieve)
Sieve_mode=0;
Copy_preset_sieve(0);