Fix issue 310:Lua's 'getbackuppixel' that returns wrong data, and Picture Scroll that shows garbage; both after Load/Reload/Resize.

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1317 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Yves Rizoud 2010-02-04 01:07:42 +00:00
parent de2096c711
commit 5678f0712d
2 changed files with 9 additions and 0 deletions

View File

@ -1911,7 +1911,10 @@ void Button_Resolution(void)
if ( (chosen_width!=Main_image_width) if ( (chosen_width!=Main_image_width)
|| (chosen_height!=Main_image_height) ) || (chosen_height!=Main_image_height) )
{
Resize_image(chosen_width,chosen_height); Resize_image(chosen_width,chosen_height);
End_of_modification();
}
if ((Video_mode[selected_mode].State & 3) == 3 || if ((Video_mode[selected_mode].State & 3) == 3 ||
Init_mode_video( Init_mode_video(
@ -2764,6 +2767,8 @@ void Load_picture(byte image)
{ {
if (image) if (image)
{ {
End_of_modification();
if (Main_magnifier_mode) if (Main_magnifier_mode)
{ {
Draw_menu_button_frame(BUTTON_MAGNIFIER,0); Draw_menu_button_frame(BUTTON_MAGNIFIER,0);
@ -2866,6 +2871,8 @@ void Button_Reload(void)
if (File_error!=1) if (File_error!=1)
{ {
End_of_modification();
if (Main_magnifier_mode) if (Main_magnifier_mode)
{ {
Draw_menu_button_frame(BUTTON_MAGNIFIER,0); Draw_menu_button_frame(BUTTON_MAGNIFIER,0);

2
main.c
View File

@ -784,6 +784,7 @@ int Init_program(int argc,char * argv[])
Init_context_layered_image(&context, spare_filename, spare_directory); Init_context_layered_image(&context, spare_filename, spare_directory);
Load_image(&context); Load_image(&context);
Destroy_context(&context); Destroy_context(&context);
End_of_modification();
Redraw_layered_image(); Redraw_layered_image();
Button_Page(); Button_Page();
@ -792,6 +793,7 @@ int Init_program(int argc,char * argv[])
Init_context_layered_image(&context, main_filename, main_directory); Init_context_layered_image(&context, main_filename, main_directory);
Load_image(&context); Load_image(&context);
Destroy_context(&context); Destroy_context(&context);
End_of_modification();
Redraw_layered_image(); Redraw_layered_image();
Hide_cursor(); Hide_cursor();