new function Set_image_mode() to set image mode in Load_XXX() functions

This commit is contained in:
Thomas Bernard
2018-12-10 21:34:35 +01:00
parent 2d392fb7b1
commit 2a6f0e3a27
4 changed files with 17 additions and 26 deletions

View File

@@ -312,6 +312,15 @@ int Get_frame_duration(T_IO_Context *context)
}
}
void Set_image_mode(T_IO_Context *context, enum IMAGE_MODES mode)
{
if (context->Type == CONTEXT_MAIN_IMAGE)
{
Main.backups->Pages->Image_mode = mode;
Update_screen_targets();
}
}
///
/// Generic allocation and similar stuff, done at beginning of image load,
/// as soon as size is known.