diff --git a/amiga/gui.c b/amiga/gui.c index b6de46df9..c3a163fe6 100644 --- a/amiga/gui.c +++ b/amiga/gui.c @@ -17,6 +17,7 @@ */ /* NetSurf core includes */ +#include "content/hlcache.h" #include "content/urldb.h" #include "css/utils.h" #include "desktop/browser_private.h" @@ -2459,8 +2460,14 @@ printf("sig recvd %ld (%ld %ld %ld %ld %ld %ld)\n", signal, winsignal , appsig , } } +static void ami_gui_fetch_callback(void *p) +{ + hlcache_poll(); +} + void gui_poll(bool active) { + if(active) schedule(0, ami_gui_fetch_callback, NULL); ami_get_msg(); } diff --git a/desktop/netsurf.c b/desktop/netsurf.c index 120bda9e3..0b1cffe0a 100644 --- a/desktop/netsurf.c +++ b/desktop/netsurf.c @@ -27,7 +27,6 @@ #include #include "utils/config.h" -#include "utils/schedule.h" #include "utils/utsname.h" #include "content/content_factory.h" #include "content/fetch.h" @@ -240,10 +239,6 @@ nserror netsurf_init(int *pargc, return ret; } -static void netsurf_fetch_callback(void *p) -{ - hlcache_poll(); -} /** * Gui NetSurf main loop. @@ -251,8 +246,6 @@ static void netsurf_fetch_callback(void *p) int netsurf_main_loop(void) { while (!netsurf_quit) { - if(fetch_active) - schedule(0, netsurf_fetch_callback, NULL); gui_poll(fetch_active); hlcache_poll(); }