mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-23 20:46:50 +03:00
fix depth detection
This commit is contained in:
parent
8c6dab520d
commit
6ceb8ca9eb
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user