summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xamiga/gui.c2
-rwxr-xr-xamiga/plotters.c8
-rwxr-xr-xamiga/plotters.h3
3 files changed, 10 insertions, 3 deletions
diff --git a/amiga/gui.c b/amiga/gui.c
index d77210541..6278f283d 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -3561,6 +3561,7 @@ void ami_refresh_window(struct gui_window_2 *gwin)
GetAttr(SPACE_AreaBox, (Object *)gwin->objects[GID_BROWSER], (ULONG *)&bbox);
+ browserglob.locked_layers = true;
BeginRefresh(gwin->win);
x0 = ((gwin->win->RPort->Layer->DamageList->bounds.MinX - bbox->Left) /
@@ -3593,6 +3594,7 @@ void ami_refresh_window(struct gui_window_2 *gwin)
}
EndRefresh(gwin->win, TRUE);
+ browserglob.locked_layers = false;
}
void ami_get_hscroll_pos(struct gui_window_2 *gwin, ULONG *xs)
diff --git a/amiga/plotters.c b/amiga/plotters.c
index 5825f4c41..0078f0c8e 100755
--- a/amiga/plotters.c
+++ b/amiga/plotters.c
@@ -194,6 +194,8 @@ void ami_init_layers(struct gui_globals *gg, ULONG width, ULONG height)
gg->surface = cairo_amigaos_surface_create(gg->rp->BitMap);
gg->cr = cairo_create(gg->surface);
#endif
+
+ gg->locked_layers = false;
}
void ami_free_layers(struct gui_globals *gg)
@@ -644,7 +646,8 @@ static bool ami_bitmap(int x, int y, int width, int height, struct bitmap *bitma
if(palette_mapped == false) {
tbm = ami_getcachenativebm(bitmap, width, height, glob->rp->BitMap);
} else {
- tbm = ami_bitmap_get_palettemapped(bitmap, width, height);
+ if(glob->locked_layers == false)
+ tbm = ami_bitmap_get_palettemapped(bitmap, width, height);
}
if(!tbm) return true;
@@ -733,7 +736,8 @@ bool ami_bitmap_tile(int x, int y, int width, int height,
if(palette_mapped == false) {
tbm = ami_getcachenativebm(bitmap,width,height,glob->rp->BitMap);
} else {
- tbm = ami_bitmap_get_palettemapped(bitmap, width, height);
+ if(glob->locked_layers == false)
+ tbm = ami_bitmap_get_palettemapped(bitmap, width, height);
}
if(!tbm) return true;
diff --git a/amiga/plotters.h b/amiga/plotters.h
index 94dfaee6e..e1d2d048d 100755
--- a/amiga/plotters.h
+++ b/amiga/plotters.h
@@ -34,7 +34,8 @@ struct gui_globals
APTR tmprasbuf;
struct Rectangle rect;
struct MinList *shared_pens;
-#ifdef NS_AMIGA_CAIRO
+ bool locked_layers;
+ #ifdef NS_AMIGA_CAIRO
cairo_surface_t *surface;
cairo_t *cr;
#endif