r5419 dsilvers - in /branches/vince/netsurf-fb: Makefile desktop/options.c framebuffer/fb_frontend_linuxfb.c framebuffer/fb_gui.c framebuffer/fb_options.h

netsurf at semichrome.net netsurf at semichrome.net
Tue Sep 23 14:20:07 BST 2008


Author: dsilvers
Date: Tue Sep 23 08:20:07 2008
New Revision: 5419

URL: http://source.netsurf-browser.org?rev=5419&view=rev
Log:
Support fb_mode and fb_device options

Added:
    branches/vince/netsurf-fb/framebuffer/fb_options.h
Modified:
    branches/vince/netsurf-fb/Makefile
    branches/vince/netsurf-fb/desktop/options.c
    branches/vince/netsurf-fb/framebuffer/fb_frontend_linuxfb.c
    branches/vince/netsurf-fb/framebuffer/fb_gui.c

Modified: branches/vince/netsurf-fb/Makefile
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/Makefile?rev=5419&r1=5418&r2=5419&view=diff
==============================================================================
--- branches/vince/netsurf-fb/Makefile (original)
+++ branches/vince/netsurf-fb/Makefile Tue Sep 23 08:20:07 2008
@@ -457,6 +457,7 @@
 
   CFLAGS += '-DNETSURF_FB_RESPATH="$(NETSURF_FB_RESPATH_$(NETSURF_FB_FRONTEND))"'
   CFLAGS += '-DNETSURF_FB_HOMEPATH="$(NETSURF_FB_HOMEPATH_$(NETSURF_FB_FRONTEND))"'
+  CFLAGS += -Dnsfb
 
   ifeq ($(NETSURF_FB_FRONTEND),linux)
     $(eval $(call pkg_config_find_and_add,RSVG,librsvg-2.0,SVG rendering))

Modified: branches/vince/netsurf-fb/desktop/options.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/desktop/options.c?rev=5419&r1=5418&r2=5419&view=diff
==============================================================================
--- branches/vince/netsurf-fb/desktop/options.c (original)
+++ branches/vince/netsurf-fb/desktop/options.c Tue Sep 23 08:20:07 2008
@@ -49,6 +49,8 @@
 #include "beos/options.h"
 #elif defined(nsamiga)
 #include "amiga/options.h"
+#elif defined(nsfb)
+#include "framebuffer/fb_options.h"
 #else
 #define EXTRA_OPTION_DEFINE
 #define EXTRA_OPTION_TABLE

Modified: branches/vince/netsurf-fb/framebuffer/fb_frontend_linuxfb.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/fb_frontend_linuxfb.c?rev=5419&r1=5418&r2=5419&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/fb_frontend_linuxfb.c (original)
+++ branches/vince/netsurf-fb/framebuffer/fb_frontend_linuxfb.c Tue Sep 23 08:20:07 2008
@@ -46,6 +46,7 @@
 #include "framebuffer/fb_schedule.h"
 #include "framebuffer/fb_cursor.h"
 #include "framebuffer/fb_frontend.h"
+#include "framebuffer/fb_options.h"
 
 #include "utils/log.h"
 #include "utils/messages.h"
@@ -513,7 +514,7 @@
         framebuffer_t *newfb;
         int ploop;
 
-        fb_init("/dev/fb0", "800x600-70", 16, 1);
+        fb_init(option_fb_device, option_fb_mode ? option_fb_mode : "800x600-70", 16, 1);
         fb_switch_init();
         fb_catch_exit_signals();
 

Modified: branches/vince/netsurf-fb/framebuffer/fb_gui.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/fb_gui.c?rev=5419&r1=5418&r2=5419&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/fb_gui.c (original)
+++ branches/vince/netsurf-fb/framebuffer/fb_gui.c Tue Sep 23 08:20:07 2008
@@ -138,8 +138,6 @@
 {
         LOG(("argc %d, argv %p", argc, argv));
 
-        framebuffer = fb_os_init(argc, argv);
-        
         /* load browser messages */
         messages_load(fb_findfile("messages"));
 
@@ -147,6 +145,8 @@
 	options_read(fb_findfile("Options"));
 
         default_stylesheet_url = fb_findfile_asurl("default.css");
+        
+        framebuffer = fb_os_init(argc, argv);
         
         fb_os_option_override();
         

Added: branches/vince/netsurf-fb/framebuffer/fb_options.h
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/fb_options.h?rev=5419&view=auto
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/fb_options.h (added)
+++ branches/vince/netsurf-fb/framebuffer/fb_options.h Tue Sep 23 08:20:07 2008
@@ -1,0 +1,35 @@
+/*
+ * Copyright 2008 Daniel Silverstone <dsilvers at netsurf-browser.org>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef _NETSURF_FRAMEBUFFER_OPTIONS_H_
+#define _NETSURF_FRAMEBUFFER_OPTIONS_H_
+
+#include "desktop/options.h"
+
+extern char *option_fb_mode;
+extern char *option_fb_device;
+
+#define EXTRA_OPTION_DEFINE \
+char *option_fb_mode = 0; \
+char *option_fb_device = 0;
+
+#define EXTRA_OPTION_TABLE \
+  { "fb_mode", OPTION_STRING,	&option_fb_mode },      \
+  { "fb_device", OPTION_STRING, &option_fb_device },
+
+#endif




More information about the netsurf-commits mailing list