diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2012-09-27 13:46:10 +0100 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2012-09-27 13:46:10 +0100 |
commit | 46f3c9ea3793d146337c81bf8858d99238c05e86 (patch) | |
tree | 7fd5c6aaeed21e01f8ea5565d9b65016f34657ec /src/libnsfb.c | |
parent | 1983c37933d2a753c4c913527c94392682bf7b98 (diff) | |
download | libnsfb-46f3c9ea3793d146337c81bf8858d99238c05e86.tar.gz libnsfb-46f3c9ea3793d146337c81bf8858d99238c05e86.tar.bz2 |
Add palette object. Optimise matching colour in case where we chose the palette. In other cases, we still have to seach all the colours, but that doesn't ever seem to be used.
Diffstat (limited to 'src/libnsfb.c')
-rw-r--r-- | src/libnsfb.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libnsfb.c b/src/libnsfb.c index 6f14c99..a341088 100644 --- a/src/libnsfb.c +++ b/src/libnsfb.c @@ -15,6 +15,7 @@ #include "libnsfb_plot.h" #include "libnsfb_event.h" #include "nsfb.h" +#include "palette.h" #include "surface.h" /* exported interface documented in libnsfb.h */ @@ -50,6 +51,10 @@ int nsfb_free(nsfb_t *nsfb) { int ret; + + if (nsfb->palette != NULL) + nsfb_palette_free(nsfb->palette); + ret = nsfb->surface_rtns->finalise(nsfb); free(nsfb); return ret; |