summaryrefslogtreecommitdiff
path: root/amiga
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2012-08-06 19:40:51 +0100
committerChris Young <chris@unsatisfactorysoftware.co.uk>2012-08-06 19:40:51 +0100
commit6ceb8ca9ebacc16a39e4ce93843df62e40e79bbf (patch)
tree67098e8c1d691b4d6a693b3307daf3fc0eef37c8 /amiga
parent8c6dab520d92b4149fd74c01f883bdc87245fd5c (diff)
downloadnetsurf-6ceb8ca9ebacc16a39e4ce93843df62e40e79bbf.tar.gz
netsurf-6ceb8ca9ebacc16a39e4ce93843df62e40e79bbf.tar.bz2
fix depth detection
Diffstat (limited to 'amiga')
-rwxr-xr-xamiga/plotters.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/amiga/plotters.c b/amiga/plotters.c
index e784e5cdb..ff7aa09af 100755
--- a/amiga/plotters.c
+++ b/amiga/plotters.c
@@ -136,15 +136,12 @@ void ami_init_layers(struct gui_globals *gg, ULONG width, ULONG height)
struct DrawInfo *dri;
struct BitMap *friend = NULL; /* Required to be NULL for Cairo and ARGB bitmaps */
- if(dri = GetScreenDrawInfo(scrn)) {
- if((dri->dri_Depth < 16) || (nsoption_int(cairo_renderer) == -1)) {
- palette_mapped = true;
- depth = dri->dri_Depth; /* this is always wrong */
- // friend = scrn->RastPort.BitMap;
- } else {
- palette_mapped = false;
- }
- FreeScreenDrawInfo(scrn, dri);
+ depth = GetBitMapAttr(scrn->RastPort.BitMap, BMA_DEPTH);
+ if((depth < 16) || (nsoption_int(cairo_renderer) == -1)) {
+ palette_mapped = true;
+ // friend = scrn->RastPort.BitMap;
+ } else {
+ palette_mapped = false;
}
if(nsoption_int(redraw_tile_size_x) <= 0) nsoption_set_int(redraw_tile_size_x, scrn->Width);