diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2016-07-08 19:21:53 +0100 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2016-07-08 19:21:53 +0100 |
commit | dc633bc154b913f8f5b6ce33ee34eb1dcfee75d4 (patch) | |
tree | 281621f82eb0949ec6c957c67e6dd9fd8378e8d3 /frontends/amiga | |
parent | 796974521786d65f1117cf22c23bb1592a27b6f0 (diff) | |
download | netsurf-dc633bc154b913f8f5b6ce33ee34eb1dcfee75d4.tar.gz netsurf-dc633bc154b913f8f5b6ce33ee34eb1dcfee75d4.tar.bz2 |
Force friend BitMap usage at depths>8bpp
Fix logic so this forced usage actually applies
Diffstat (limited to 'frontends/amiga')
-rw-r--r-- | frontends/amiga/plotters.c | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/frontends/amiga/plotters.c b/frontends/amiga/plotters.c index 2ad7f2b54..9076eeadc 100644 --- a/frontends/amiga/plotters.c +++ b/frontends/amiga/plotters.c @@ -106,18 +106,31 @@ void ami_init_layers(struct gui_globals *gg, ULONG width, ULONG height, bool for if(force32bit == false) depth = GetBitMapAttr(scrn->RastPort.BitMap, BMA_DEPTH); LOG("Screen depth = %d", depth); +#ifdef __amigaos4__ if(depth < 16) { gg->palette_mapped = true; } else { gg->palette_mapped = false; } - -#ifndef __amigaos4__ +#else + /* Friend BitMaps are weird. + * For OS4, we shouldn't use a friend BitMap here (see below). + * For OS3 AGA, we get no display blitted if we use a friend BitMap, + * however on RTG it seems to be a benefit. + */ + if(nsoption_bool(friend_bitmap) == true) { + friend = scrn->RastPort.BitMap; + } else { + /* Force friend BitMaps on for obvious RTG screens under OS3. + * If we get a bit smarter about this we can lose the user option. */ + if((depth > 8) && (force32bit == false)) friend = scrn->RastPort.BitMap; + } #warning OS3 locked to palette-mapped modes gg->palette_mapped = true; if(depth > 8) depth = 8; #endif + /* Probably need to fix this next line */ if(gg->palette_mapped == true) nsoption_set_bool(font_antialiasing, false); @@ -136,21 +149,6 @@ void ami_init_layers(struct gui_globals *gg, ULONG width, ULONG height, bool for gg->tmprasbuf = AllocVec(width * height, MEMF_CHIP); #endif - /* Friend BitMaps are weird. - * For OS4, we shouldn't use a friend BitMap here (see below). - * For OS3 AGA, we get no display blitted if we use a friend BitMap, - * however on RTG it seems to be a benefit. - */ -#ifndef __amigaos4__ - if(nsoption_bool(friend_bitmap) == true) { - friend = scrn->RastPort.BitMap; - } else { - /* Force friend BitMaps on for obvious RTG screens under OS3. - * If we get a bit smarter about this we can lose the user option. */ - if((depth >= 16) && (force32bit == false)) friend = scrn->RastPort.BitMap; - } -#endif - if(gg->palette_mapped == true) { gg->bm = AllocBitMap(width, height, depth, 0, friend); } else { |