summaryrefslogtreecommitdiff
path: root/frontends/amiga
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2016-07-02 14:49:18 +0100
committerChris Young <chris@unsatisfactorysoftware.co.uk>2016-07-02 14:49:18 +0100
commit6c8225d3ab17f25aa1e8ed7f22533772c8d98245 (patch)
tree434ae6444455cff1afeec35fd94715c37b04e485 /frontends/amiga
parent65175b4362e01a7bf2f373dc100b7fb0ec4cf44c (diff)
downloadnetsurf-6c8225d3ab17f25aa1e8ed7f22533772c8d98245.tar.gz
netsurf-6c8225d3ab17f25aa1e8ed7f22533772c8d98245.tar.bz2
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 :)
Diffstat (limited to 'frontends/amiga')
-rw-r--r--frontends/amiga/bitmap.c21
-rw-r--r--frontends/amiga/libs.c2
2 files changed, 16 insertions, 7 deletions
diff --git a/frontends/amiga/bitmap.c b/frontends/amiga/bitmap.c
index badd37438..d6d0c76c9 100644
--- a/frontends/amiga/bitmap.c
+++ b/frontends/amiga/bitmap.c
@@ -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;
+ }
}
}
diff --git a/frontends/amiga/libs.c b/frontends/amiga/libs.c
index 993cd3ad0..00facf957 100644
--- a/frontends/amiga/libs.c
+++ b/frontends/amiga/libs.c
@@ -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