From 3a41ade9fab0556d0d025c0b0e81834436a4f2e8 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Mon, 8 Sep 2008 17:55:12 +0000 Subject: Remove i_system.c dependency on doom/ code and add a generic I_AtExit() API for scheduling functions to call on quit. Subversion-branch: /branches/raven-branch Subversion-revision: 1216 --- src/i_system.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/i_system.h') diff --git a/src/i_system.h b/src/i_system.h index a5e06a50..3f114fd0 100644 --- a/src/i_system.h +++ b/src/i_system.h @@ -32,6 +32,7 @@ #include "d_event.h" +typedef void (*atexit_func_t)(void); // Called by DoomMain. void I_Init (void); @@ -86,6 +87,11 @@ void I_Tactile (int on, int off, int total); void I_Error (char *error, ...); +// Schedule a function to be called when the program exits. +// If run_if_error is true, the function is called if the exit +// is due to an error (I_Error) + +void I_AtExit(atexit_func_t func, boolean run_if_error); #endif -- cgit v1.2.3