mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-25 07:49:38 +03:00
Don't abort on startup if GuiGFX is not available
Most OS4 users won't need it, everybody else might like the opportunity of using NetSurf to download it :)
This commit is contained in:
parent
65175b4362
commit
6c8225d3ab
@ -80,6 +80,7 @@ enum {
|
||||
};
|
||||
|
||||
static APTR pool_bitmap = NULL;
|
||||
static bool guigfx_warned = false;
|
||||
|
||||
/* exported function documented in amiga/bitmap.h */
|
||||
void *amiga_bitmap_create(int width, int height, unsigned int state)
|
||||
@ -416,16 +417,19 @@ static inline struct BitMap *ami_bitmap_get_generic(struct bitmap *bitmap, int w
|
||||
|
||||
if(tbm == NULL) {
|
||||
if(type == AMI_NSBM_TRUECOLOUR) {
|
||||
if((tbm = ami_rtg_allocbitmap(bitmap->width, bitmap->height, 32, 0,
|
||||
friendbm, AMI_BITMAP_FORMAT))) {
|
||||
ami_rtg_writepixelarray(amiga_bitmap_get_buffer(bitmap),
|
||||
tbm = ami_rtg_allocbitmap(bitmap->width, bitmap->height, 32, 0,
|
||||
friendbm, AMI_BITMAP_FORMAT);
|
||||
if(tbm == NULL) return NULL;
|
||||
|
||||
ami_rtg_writepixelarray(amiga_bitmap_get_buffer(bitmap),
|
||||
tbm, bitmap->width, bitmap->height,
|
||||
bitmap->width * 4, AMI_BITMAP_FORMAT);
|
||||
}
|
||||
} else {
|
||||
if((tbm = ami_rtg_allocbitmap(bitmap->width, bitmap->height,
|
||||
8, 0, friendbm, AMI_BITMAP_FORMAT))) {
|
||||
tbm = ami_rtg_allocbitmap(bitmap->width, bitmap->height,
|
||||
8, 0, friendbm, AMI_BITMAP_FORMAT);
|
||||
if(tbm == NULL) return NULL;
|
||||
|
||||
if(GuiGFXBase != NULL) {
|
||||
struct RastPort rp;
|
||||
InitRastPort(&rp);
|
||||
rp.BitMap = tbm;
|
||||
@ -450,6 +454,11 @@ static inline struct BitMap *ami_bitmap_get_generic(struct bitmap *bitmap, int w
|
||||
DirectDrawTrueColor(ddh, (ULONG *)amiga_bitmap_get_buffer(bitmap), 0, 0, TAG_DONE);
|
||||
DeleteDirectDrawHandle(ddh);
|
||||
ami_bitmap_argb_to_rgba(bitmap);
|
||||
} else {
|
||||
if(guigfx_warned == false) {
|
||||
amiga_warn_user("BMConvErr", NULL);
|
||||
guigfx_warned = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -227,7 +227,7 @@ bool ami_libs_open(void)
|
||||
AMINS_LIB_OPEN("Picasso96API.library", 0, P96, "main", 1, false)
|
||||
|
||||
/* Non-OS provided libraries */
|
||||
AMINS_LIB_OPEN("guigfx.library", 9, GuiGFX, "main", 1, true)
|
||||
AMINS_LIB_OPEN("guigfx.library", 9, GuiGFX, "main", 1, false)
|
||||
|
||||
/* NB: timer.device is opened in schedule.c (ultimately by the scheduler process).
|
||||
* The library base and interface are obtained there, rather than here, due to
|
||||
|
@ -3314,6 +3314,11 @@ de.ami.CompError:Nicht zu öffnen
|
||||
fr.ami.CompError:Unable to open
|
||||
it.ami.CompError:Impossibile aprire
|
||||
nl.ami.CompError:Niet te openen
|
||||
en.ami.BMConvErr:NetSurf requires guigfx.library to display images in this mode
|
||||
de.ami.BMConvErr:NetSurf requires guigfx.library to display images in this mode
|
||||
fr.ami.BMConvErr:NetSurf requires guigfx.library to display images in this mode
|
||||
it.ami.BMConvErr:NetSurf requires guigfx.library to display images in this mode
|
||||
nl.ami.BMConvErr:NetSurf requires guigfx.library to display images in this mode
|
||||
en.ami.MultiTabClose:Are you sure you want to close multiple tabs?
|
||||
de.ami.MultiTabClose:Are you sure you want to close multiple tabs?
|
||||
fr.ami.MultiTabClose:Are you sure you want to close multiple tabs?
|
||||
|
Loading…
Reference in New Issue
Block a user