remove use of deprecated netsurf_quit variable in riscos

The core no longer needs to run the event polling loop as fetches are now
scheduler driven. This is part of a series which will ultimately remove
netsurf_poll callback altogether.
This commit is contained in:
Vincent Sanders 2014-10-13 00:56:09 +01:00
parent 34fdedba78
commit d0655bafc2
4 changed files with 11 additions and 6 deletions

View File

@ -1599,7 +1599,7 @@ void ro_gui_download_close_confirmed(query_id id, enum query_response res, void
/* and restart the shutdown */ /* and restart the shutdown */
if (ro_gui_prequit()) if (ro_gui_prequit())
netsurf_quit = true; riscos_done = true;
} }
else else
ro_gui_download_window_destroy(dw, false); ro_gui_download_window_destroy(dw, false);

View File

@ -85,6 +85,8 @@
#include "riscos/content-handlers/draw.h" #include "riscos/content-handlers/draw.h"
#include "riscos/content-handlers/sprite.h" #include "riscos/content-handlers/sprite.h"
bool riscos_done = false;
extern bool ro_plot_patterned_lines; extern bool ro_plot_patterned_lines;
int os_version = 0; int os_version = 0;
@ -1777,7 +1779,7 @@ static void ro_gui_user_message(wimp_event_no event, wimp_message *message)
ro_gui_hotlist_add_cleanup(); ro_gui_hotlist_add_cleanup();
break; break;
case message_QUIT: case message_QUIT:
netsurf_quit = true; riscos_done = true;
break; break;
} }
} }
@ -1854,7 +1856,7 @@ static void ro_gui_handle_event(wimp_event_no event, wimp_block *block)
/** /**
* Poll the RISC OS wimp for events. * Poll the RISC OS wimp for events.
*/ */
static void riscos_poll(bool active) static void riscos_poll(void)
{ {
wimp_event_no event; wimp_event_no event;
wimp_block block; wimp_block block;
@ -2401,7 +2403,6 @@ static struct gui_fetch_table riscos_fetch_table = {
}; };
static struct gui_browser_table riscos_browser_table = { static struct gui_browser_table riscos_browser_table = {
.poll = riscos_poll,
.schedule = riscos_schedule, .schedule = riscos_schedule,
.quit = gui_quit, .quit = gui_quit,
@ -2524,7 +2525,9 @@ int main(int argc, char** argv)
warn_user(messages_get_errorcode(ret), 0); warn_user(messages_get_errorcode(ret), 0);
} }
netsurf_main_loop(); while (!riscos_done) {
riscos_poll();
}
netsurf_exit(); netsurf_exit();

View File

@ -72,6 +72,8 @@ typedef enum { GUI_DRAG_NONE, GUI_DRAG_DOWNLOAD_SAVE, GUI_DRAG_SAVE }
extern ro_gui_drag_type gui_current_drag_type; extern ro_gui_drag_type gui_current_drag_type;
extern bool riscos_done;
/** RISC OS data for a browser window. */ /** RISC OS data for a browser window. */
struct gui_window { struct gui_window {
/** Associated platform-independent browser window data. */ /** Associated platform-independent browser window data. */

View File

@ -239,7 +239,7 @@ bool ro_gui_iconbar_menu_select(wimp_w w, wimp_i i, wimp_menu *menu,
case APPLICATION_QUIT: case APPLICATION_QUIT:
if (ro_gui_prequit()) { if (ro_gui_prequit()) {
LOG(("QUIT in response to user request")); LOG(("QUIT in response to user request"));
netsurf_quit = true; riscos_done = true;
} }
return true; return true;
default: default: