summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2014-09-20 13:38:38 +0100
committerChris Young <chris@unsatisfactorysoftware.co.uk>2014-09-20 13:38:38 +0100
commit1b2225ea076e32412cdde273ea59510e571d84c2 (patch)
treeb6745ae8364c27db49c165d29c53baad24198030
parent2551885fd6c168b6b2738e6197325324e1d52a00 (diff)
downloadnetsurf-1b2225ea076e32412cdde273ea59510e571d84c2.tar.gz
netsurf-1b2225ea076e32412cdde273ea59510e571d84c2.tar.bz2
Move log init so it starts earlier
-rw-r--r--amiga/gui.c23
-rw-r--r--amiga/plugin_hack.c2
2 files changed, 16 insertions, 9 deletions
diff --git a/amiga/gui.c b/amiga/gui.c
index 7ababdf74..09b731010 100644
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -4985,6 +4985,7 @@ Object *ami_gui_splash_open(void)
LayoutEnd,
EndWindow;
+ LOG(("Attempting to open splash window..."));
win = RA_OpenWindow(win_obj);
GetAttrs(bm_obj, IA_Top, &top,
@@ -5038,13 +5039,16 @@ Object *ami_gui_splash_open(void)
void ami_gui_splash_close(Object *win_obj)
{
- if(win_obj) DisposeObject(win_obj);
+ if(win_obj == NULL) return;
+
+ LOG(("Closing splash window"));
+ DisposeObject(win_obj);
}
static void gui_file_gadget_open(struct gui_window *g, hlcache_handle *hl,
struct form_control *gadget)
{
- LOG(("File open dialog rquest for %p/%p", g, gadget));
+ LOG(("File open dialog request for %p/%p", g, gadget));
if(AslRequestTags(filereq,
ASLFR_Window, g->shared->win,
@@ -5126,7 +5130,7 @@ int main(int argc, char** argv)
BPTR lock = 0;
int32 user = 0;
nserror ret;
- Object *splash_window = ami_gui_splash_open();
+
struct netsurf_table amiga_table = {
.browser = &amiga_browser_table,
.window = &amiga_window_table,
@@ -5147,6 +5151,14 @@ int main(int argc, char** argv)
die("NetSurf operation table failed registration");
}
+ /* initialise logging. Not fatal if it fails but not much we
+ * can do about it either.
+ */
+ nslog_init(NULL, &argc, argv);
+
+ /* Open splash window */
+ Object *splash_window = ami_gui_splash_open();
+
/* Open popupmenu.library just to check the version.
* Versions older than 53.11 are dangerous, so we
* forcibly disable context menus if these are in use.
@@ -5183,11 +5195,6 @@ int main(int argc, char** argv)
amiga_plugin_hack_init();
ret = amiga_datatypes_init();
- /* initialise logging. Not fatal if it fails but not much we
- * can do about it either.
- */
- nslog_init(NULL, &argc, argv);
-
/* user options setup */
ret = nsoption_init(ami_set_options, &nsoptions, &nsoptions_default);
if (ret != NSERROR_OK) {
diff --git a/amiga/plugin_hack.c b/amiga/plugin_hack.c
index 9bfd7a3d3..389cc118e 100644
--- a/amiga/plugin_hack.c
+++ b/amiga/plugin_hack.c
@@ -77,7 +77,7 @@ nserror amiga_plugin_hack_init(void)
if(node)
{
- LOG(("plugin_hack registered %s\n",lwc_string_data(type)));
+ LOG(("plugin_hack registered %s",lwc_string_data(type)));
error = content_factory_register_handler(
lwc_string_data(type),