diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2012-08-07 21:09:49 +0100 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2012-08-07 21:09:49 +0100 |
commit | dd7935bb1f8f4437f47a1ebb097afd4c262e107f (patch) | |
tree | d85527ff1f156194f4277139428ab803fda3f648 | |
parent | 391d483c9ded316cd3c40b77d37eb5ed021cd250 (diff) | |
download | netsurf-dd7935bb1f8f4437f47a1ebb097afd4c262e107f.tar.gz netsurf-dd7935bb1f8f4437f47a1ebb097afd4c262e107f.tar.bz2 |
abstract the native bitmap fetcher functions, and make the favicon collection use the new one.
-rw-r--r-- | amiga/bitmap.c | 10 | ||||
-rwxr-xr-x | amiga/bitmap.h | 2 | ||||
-rwxr-xr-x | amiga/gui.c | 2 |
3 files changed, 12 insertions, 2 deletions
diff --git a/amiga/bitmap.c b/amiga/bitmap.c index 0190ed0b3..3358265d1 100644 --- a/amiga/bitmap.c +++ b/amiga/bitmap.c @@ -351,7 +351,15 @@ struct bitmap *ami_bitmap_from_datatype(char *filename) return bm; } - +struct BitMap *ami_bitmap_get_native(struct bitmap *bitmap, + int width, int height, struct BitMap *friendbm) +{ + if(ami_plot_screen_is_palettemapped() == true) { + return ami_bitmap_get_palettemapped(bitmap, width, height); + } else { + return ami_getcachenativebm(bitmap, width, height, friendbm); + } +} struct BitMap *ami_getcachenativebm(struct bitmap *bitmap,int width,int height,struct BitMap *friendbm) { diff --git a/amiga/bitmap.h b/amiga/bitmap.h index 3b6f147ad..ce5624c31 100755 --- a/amiga/bitmap.h +++ b/amiga/bitmap.h @@ -42,6 +42,8 @@ struct bitmap { ULONG *icondata; /* for appicons */ }; +struct BitMap *ami_bitmap_get_native(struct bitmap *bitmap, + int width, int height, struct BitMap *friendbm); struct BitMap *ami_getcachenativebm(struct bitmap *bitmap,int width,int height,struct BitMap *friendbm); struct BitMap *ami_bitmap_get_palettemapped(struct bitmap *bitmap, int width, int height); diff --git a/amiga/gui.c b/amiga/gui.c index 5d1452142..617b44f5d 100755 --- a/amiga/gui.c +++ b/amiga/gui.c @@ -3823,7 +3823,7 @@ void gui_window_set_icon(struct gui_window *g, hlcache_handle *icon) if ((icon != NULL) && (content_get_bitmap(icon) != NULL)) { - bm = ami_getcachenativebm(content_get_bitmap(icon), 16, 16, + bm = ami_bitmap_get_native(content_get_bitmap(icon), 16, 16, g->shared->win->RPort->BitMap); } |