Load_GIF(): Be more tolerant on ratio values

This commit is contained in:
Thomas Bernard 2018-03-05 23:53:37 +01:00
parent 4338d31f04
commit f9dc86eb87

View File

@ -4087,18 +4087,14 @@ void Load_GIF(T_IO_Context * context)
Original_screen_X=LSDB.Width; Original_screen_X=LSDB.Width;
Original_screen_Y=LSDB.Height; Original_screen_Y=LSDB.Height;
switch(LSDB.Aspect) { ratio=PIXEL_SIMPLE; // (49 + 15) / 64 = 1:1
case 17: // (17 + 15) / 64 = 1:2 if (LSDB.Aspect != 0) {
ratio=PIXEL_TALL; if (LSDB.Aspect < 25) // (17 + 15) / 64 = 1:2
break; ratio=PIXEL_TALL;
case 33: // (33 + 15) / 64 = 3:4 else if (LSDB.Aspect < 41) // (33 + 15) / 64 = 3:4
ratio=PIXEL_TALL3; ratio=PIXEL_TALL3;
break; else if (LSDB.Aspect > 82) // (113 + 15) / 64 = 2:1
case 113: // (113 + 15) / 64 = 2:1 ratio=PIXEL_WIDE;
ratio=PIXEL_WIDE;
break;
default:
ratio=PIXEL_SIMPLE;
} }
Pre_load(context, LSDB.Width,LSDB.Height,file_size,FORMAT_GIF,ratio,(LSDB.Resol&7)+1); Pre_load(context, LSDB.Width,LSDB.Height,file_size,FORMAT_GIF,ratio,(LSDB.Resol&7)+1);