abstract the native bitmap fetcher functions, and make the favicon collection use the new one.
This commit is contained in:
parent
391d483c9d
commit
dd7935bb1f
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue