Ensure on OS3 we don't try to create a BitMap with a depth of more than 8

This commit is contained in:
Chris Young 2015-01-31 20:14:09 +00:00
parent 9ac9866521
commit 6389b0f7d6
1 changed files with 4 additions and 1 deletions

View File

@ -113,14 +113,17 @@ void ami_init_layers(struct gui_globals *gg, ULONG width, ULONG height)
struct BitMap *friend = NULL;
depth = GetBitMapAttr(scrn->RastPort.BitMap, BMA_DEPTH);
#ifdef __amigaos4__
if(depth < 16) {
palette_mapped = true;
} else {
palette_mapped = false;
}
#ifndef __amigaos4__
#else
palette_mapped = true; /* only supporting palette mapped screens on OS3 for now */
if(depth > 8) depth = 8;
#endif
if(!width) width = nsoption_int(redraw_tile_size_x);
if(!height) height = nsoption_int(redraw_tile_size_y);