Remove set_default_handler

standard_handler is the only handler.  Use it directly.
This commit is contained in:
Kp 2015-05-14 02:23:13 +00:00
parent 7f403bc1af
commit 265ad59e9c
3 changed files with 1 additions and 14 deletions

View file

@ -83,7 +83,6 @@ void event_poll();
void event_flush();
// Set and call the default event handler
void set_default_handler(int (*handler)(const d_event &event));
int call_default_handler(const d_event &event);
// Send an event to the front window as first priority, then to the windows behind if it's not modal (editor), then the default handler

View file

@ -102,19 +102,9 @@ int event_init()
return 0;
}
int (*default_handler)(const d_event &event) = NULL;
void set_default_handler(int (*handler)(const d_event &event))
{
default_handler = handler;
}
int call_default_handler(const d_event &event)
{
if (default_handler)
return (*default_handler)(event);
return 0;
return standard_handler(event);
}
void event_send(const d_event &event)

View file

@ -458,8 +458,6 @@ int main(int argc, char *argv[])
con_printf(CON_DEBUG, "Initializing font system..." );
gamefont_init(); // must load after palette data loaded.
set_default_handler(standard_handler);
#if defined(DXX_BUILD_DESCENT_II)
con_printf( CON_DEBUG, "Initializing movie libraries..." );
init_movies(); //init movie libraries