summaryrefslogtreecommitdiff
path: root/src/frontend_sdl.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@netsurf-browser.org>2009-04-24 13:42:40 +0000
committerVincent Sanders <vince@netsurf-browser.org>2009-04-24 13:42:40 +0000
commit3d5b21e1473dbdee6c3df66d9ba2a9d657f1b486 (patch)
treef88a339bd1510e9cf5cf1a2a33e345dd8014d513 /src/frontend_sdl.c
parent2b303df06ea14e99e41b118b299bb0bcf58aafd5 (diff)
downloadlibnsfb-3d5b21e1473dbdee6c3df66d9ba2a9d657f1b486.tar.gz
libnsfb-3d5b21e1473dbdee6c3df66d9ba2a9d657f1b486.tar.bz2
add legacy plotter API
svn path=/trunk/libnsfb/; revision=7304
Diffstat (limited to 'src/frontend_sdl.c')
-rw-r--r--src/frontend_sdl.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/frontend_sdl.c b/src/frontend_sdl.c
index 82342d3..ca98199 100644
--- a/src/frontend_sdl.c
+++ b/src/frontend_sdl.c
@@ -13,6 +13,7 @@
#include "libnsfb_event.h"
#include "nsfb.h"
#include "frontend.h"
+#include "plotters.h"
enum nsfb_key_code_e sdl_nsfb_map[] = {
NSFB_KEY_UNKNOWN,
@@ -378,6 +379,9 @@ static int sdl_set_geometry(nsfb_t *nsfb, int width, int height, int bpp)
nsfb->height = height;
nsfb->bpp = bpp;
+ /* select default sw plotters for bpp */
+ select_plotters(nsfb);
+
return 0;
}
@@ -390,7 +394,7 @@ static int sdl_initialise(nsfb_t *nsfb)
/* sanity checked depth. */
if ((nsfb->bpp != 32) && (nsfb->bpp != 16) && (nsfb->bpp != 8))
- nsfb->bpp = 16;
+ return -1;
/* initialise SDL library */
if (SDL_Init(SDL_INIT_VIDEO) < 0 ) {