From 9c2fbde9173fec32e60e69b5d6f8e0041d6e28f6 Mon Sep 17 00:00:00 2001 From: Chris Young Date: Sun, 16 Aug 2015 12:48:06 +0100 Subject: Put the memory areas, rather than the structures, into chip RAM as required. --- amiga/plotters.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/amiga/plotters.c b/amiga/plotters.c index 26479ad20..bc4babe63 100644 --- a/amiga/plotters.c +++ b/amiga/plotters.c @@ -119,8 +119,15 @@ void ami_init_layers(struct gui_globals *gg, ULONG width, ULONG height) gg->height = height; gg->layerinfo = NewLayerInfo(); + +#ifdef __amigaos4__ gg->areabuf = AllocVecTagList(AREA_SIZE, NULL); gg->tmprasbuf = AllocVecTagList(width * height, NULL); +#else + /* OS3/AGA requries these to be in chip mem */ + gg->areabuf = AllocVec(AREA_SIZE, MEMF_CHIP); + gg->tmprasbuf = AllocVec(width * height, MEMF_CHIP); +#endif /* Friend BitMaps are weird. * For OS4, we shouldn't use a friend BitMap here (see below). @@ -163,17 +170,11 @@ void ami_init_layers(struct gui_globals *gg, ULONG width, ULONG height) InstallLayerHook(gg->rp->Layer,LAYERS_NOBACKFILL); gg->rp->AreaInfo = AllocVecTagList(sizeof(struct AreaInfo), NULL); - if((!gg->areabuf) || (!gg->rp->AreaInfo)) warn_user("NoMemory",""); InitArea(gg->rp->AreaInfo,gg->areabuf, AREA_SIZE/5); -#ifdef __amigaos4__ - gg->rp->TmpRas = AllocVecTagList(sizeof(struct TmpRas), NULL); -#else - /* TmpRas needs to be in chip mem on OS3 */ - gg->rp->TmpRas = AllocVec(sizeof(struct TmpRas), MEMF_CHIP); -#endif + gg->rp->TmpRas = AllocVecTagList(sizeof(struct TmpRas), NULL); if((!gg->tmprasbuf) || (!gg->rp->TmpRas)) warn_user("NoMemory",""); InitTmpRas(gg->rp->TmpRas, gg->tmprasbuf, width*height); -- cgit v1.2.3