mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-03 17:54:33 +03:00
Sprite content handler: Convert to using content_broadcast_errorcode().
This commit is contained in:
parent
cde300133e
commit
36c01fc03b
@ -95,7 +95,6 @@ static nserror nssprite_create(const content_handler *handler,
|
|||||||
static bool nssprite_convert(struct content *c)
|
static bool nssprite_convert(struct content *c)
|
||||||
{
|
{
|
||||||
nssprite_content *nssprite = (nssprite_content *) c;
|
nssprite_content *nssprite = (nssprite_content *) c;
|
||||||
union content_msg_data msg_data;
|
|
||||||
|
|
||||||
struct rosprite_mem_context* ctx;
|
struct rosprite_mem_context* ctx;
|
||||||
|
|
||||||
@ -118,14 +117,12 @@ static bool nssprite_convert(struct content *c)
|
|||||||
|
|
||||||
nssprite->bitmap = guit->bitmap->create(sprite->width, sprite->height, BITMAP_NEW);
|
nssprite->bitmap = guit->bitmap->create(sprite->width, sprite->height, BITMAP_NEW);
|
||||||
if (!nssprite->bitmap) {
|
if (!nssprite->bitmap) {
|
||||||
msg_data.error = messages_get("NoMemory");
|
content_broadcast_errorcode(c, NSERROR_NOMEM);
|
||||||
content_broadcast(c, CONTENT_MSG_ERROR, &msg_data);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
uint32_t* imagebuf = (uint32_t *)guit->bitmap->get_buffer(nssprite->bitmap);
|
uint32_t* imagebuf = (uint32_t *)guit->bitmap->get_buffer(nssprite->bitmap);
|
||||||
if (!imagebuf) {
|
if (!imagebuf) {
|
||||||
msg_data.error = messages_get("NoMemory");
|
content_broadcast_errorcode(c, NSERROR_NOMEM);
|
||||||
content_broadcast(c, CONTENT_MSG_ERROR, &msg_data);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
unsigned char *spritebuf = (unsigned char *)sprite->image;
|
unsigned char *spritebuf = (unsigned char *)sprite->image;
|
||||||
|
Loading…
Reference in New Issue
Block a user