Fix issue 515: Opening a 24bit image in command-line gives wrong mouse cursor (arrow)

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2035 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Yves Rizoud 2012-10-18 23:21:02 +00:00
parent aa0ce85706
commit 62c3d09569

View File

@ -586,6 +586,7 @@ void Load_image(T_IO_Context *context)
unsigned int index; // index de balayage des formats unsigned int index; // index de balayage des formats
T_Format *format = &(File_formats[2]); // Format du fichier à charger T_Format *format = &(File_formats[2]); // Format du fichier à charger
int i; int i;
byte old_cursor_shape;
// Not sure it's the best place... // Not sure it's the best place...
context->Color_cycles=0; context->Color_cycles=0;
@ -664,6 +665,7 @@ void Load_image(T_IO_Context *context)
{ {
case CONTEXT_MAIN_IMAGE: case CONTEXT_MAIN_IMAGE:
// Cas d'un chargement dans l'image // Cas d'un chargement dans l'image
old_cursor_shape=Cursor_shape;
Hide_cursor(); Hide_cursor();
Cursor_shape=CURSOR_SHAPE_HOURGLASS; Cursor_shape=CURSOR_SHAPE_HOURGLASS;
Display_cursor(); Display_cursor();
@ -675,12 +677,13 @@ void Load_image(T_IO_Context *context)
Palette_loaded(context); Palette_loaded(context);
} }
Hide_cursor(); Hide_cursor();
Cursor_shape=CURSOR_SHAPE_ARROW; Cursor_shape=old_cursor_shape;
Display_cursor(); Display_cursor();
break; break;
case CONTEXT_BRUSH: case CONTEXT_BRUSH:
// Cas d'un chargement dans la brosse // Cas d'un chargement dans la brosse
old_cursor_shape=Cursor_shape;
Hide_cursor(); Hide_cursor();
Cursor_shape=CURSOR_SHAPE_HOURGLASS; Cursor_shape=CURSOR_SHAPE_HOURGLASS;
Display_cursor(); Display_cursor();
@ -688,7 +691,7 @@ void Load_image(T_IO_Context *context)
if (Convert_24b_bitmap_to_256(context->Buffer_image,context->Buffer_image_24b,context->Width,context->Height,context->Palette)) if (Convert_24b_bitmap_to_256(context->Buffer_image,context->Buffer_image_24b,context->Width,context->Height,context->Palette))
File_error=2; File_error=2;
Hide_cursor(); Hide_cursor();
Cursor_shape=CURSOR_SHAPE_ARROW; Cursor_shape=old_cursor_shape;
Display_cursor(); Display_cursor();
break; break;