diff --git a/common/include/event.h b/common/include/event.h index 0b83d26f7..090b3eabe 100644 --- a/common/include/event.h +++ b/common/include/event.h @@ -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 diff --git a/similar/arch/sdl/event.cpp b/similar/arch/sdl/event.cpp index 9ca66bd31..0c98d49f1 100644 --- a/similar/arch/sdl/event.cpp +++ b/similar/arch/sdl/event.cpp @@ -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) diff --git a/similar/main/inferno.cpp b/similar/main/inferno.cpp index a9a3cd8f1..1449c28d3 100644 --- a/similar/main/inferno.cpp +++ b/similar/main/inferno.cpp @@ -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