diff options
Diffstat (limited to 'frontends/riscos/content-handlers/sprite.c')
-rw-r--r-- | frontends/riscos/content-handlers/sprite.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/frontends/riscos/content-handlers/sprite.c b/frontends/riscos/content-handlers/sprite.c index 3556aa555..f6ab68451 100644 --- a/frontends/riscos/content-handlers/sprite.c +++ b/frontends/riscos/content-handlers/sprite.c @@ -16,7 +16,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -/** \file +/** + * \file * Content for image/x-riscos-sprite (RISC OS implementation). * * No conversion is necessary: we can render RISC OS sprites directly under @@ -35,7 +36,9 @@ #include "netsurf/plotters.h" #include "netsurf/content.h" #include "content/llcache.h" +#include "content/content.h" #include "content/content_protected.h" +#include "content/content_factory.h" #include "riscos/gui.h" #include "riscos/image.h" @@ -112,8 +115,8 @@ bool sprite_convert(struct content *c) os_error *error; int w, h; union content_msg_data msg_data; - const char *source_data; - unsigned long source_size; + const uint8_t *source_data; + size_t source_size; const void *sprite_data; char *title; @@ -125,7 +128,8 @@ bool sprite_convert(struct content *c) /* check for bad data */ if ((int)source_size + 4 != area->used) { - msg_data.error = messages_get("BadSprite"); + msg_data.errordata.errorcode = NSERROR_UNKNOWN; + msg_data.errordata.errormsg = messages_get("BadSprite"); content_broadcast(c, CONTENT_MSG_ERROR, &msg_data); return false; } @@ -139,7 +143,8 @@ bool sprite_convert(struct content *c) "xosspriteop_read_sprite_info: 0x%x: %s", error->errnum, error->errmess); - msg_data.error = error->errmess; + msg_data.errordata.errorcode = NSERROR_UNKNOWN; + msg_data.errordata.errormsg = error->errmess; content_broadcast(c, CONTENT_MSG_ERROR, &msg_data); return false; } |