summaryrefslogtreecommitdiff
path: root/framebuffer/framebuffer.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@netsurf-browser.org>2010-01-20 17:07:26 +0000
committerVincent Sanders <vince@netsurf-browser.org>2010-01-20 17:07:26 +0000
commit192d05c20c60dd827e48b0802855ebfca4dccc45 (patch)
treedf044b3040428b76dd098885fadf68669a3e3e71 /framebuffer/framebuffer.c
parent185465df3d6a7a83f3c0cfa0b8169d37039e9f37 (diff)
downloadnetsurf-192d05c20c60dd827e48b0802855ebfca4dccc45.tar.gz
netsurf-192d05c20c60dd827e48b0802855ebfca4dccc45.tar.bz2
fix framebuffer command line/default option usage
svn path=/trunk/netsurf/; revision=9849
Diffstat (limited to 'framebuffer/framebuffer.c')
-rw-r--r--framebuffer/framebuffer.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/framebuffer/framebuffer.c b/framebuffer/framebuffer.c
index ec86cf01e..0400a1abe 100644
--- a/framebuffer/framebuffer.c
+++ b/framebuffer/framebuffer.c
@@ -341,26 +341,10 @@ struct plotter_table plot = {
nsfb_t *
-framebuffer_initialise(int argc, char** argv)
+framebuffer_initialise(const char *fename, int width, int height, int bpp)
{
- const char *fename;
enum nsfb_frontend_e fetype;
- /* select frontend from commandline */
- if ((argc > 2) && (argv[1][0] == '-') &&
- (argv[1][1] == 'f') &&
- (argv[1][2] == 'e') &&
- (argv[1][3] == 0)) {
- int argcmv;
- fename = (const char *)argv[2];
- for (argcmv = 3; argcmv < argc; argcmv++) {
- argv[argcmv - 2] = argv[argcmv];
- }
- argc-=2;
- } else {
- fename="sdl";
- }
-
fetype = nsfb_frontend_from_name(fename);
if (fetype == NSFB_FRONTEND_NONE) {
LOG(("The %s frontend is not available from libnsfb\n", fename));
@@ -373,7 +357,7 @@ framebuffer_initialise(int argc, char** argv)
return NULL;
}
- if (nsfb_set_geometry(nsfb, 0, 0, 32) == -1) {
+ if (nsfb_set_geometry(nsfb, width, height, bpp) == -1) {
LOG(("Unable to set geometry\n"));
nsfb_finalise(nsfb);
return NULL;