diff options
author | Simon Howard | 2008-09-08 17:55:12 +0000 |
---|---|---|
committer | Simon Howard | 2008-09-08 17:55:12 +0000 |
commit | 3a41ade9fab0556d0d025c0b0e81834436a4f2e8 (patch) | |
tree | 0df9a93616e608a679c33e0c32de353cc93220ef /src/i_system.h | |
parent | 0a5d1795ce8fe46e20627f8a7b4ba348f2ec400e (diff) | |
download | chocolate-doom-3a41ade9fab0556d0d025c0b0e81834436a4f2e8.tar.gz chocolate-doom-3a41ade9fab0556d0d025c0b0e81834436a4f2e8.tar.bz2 chocolate-doom-3a41ade9fab0556d0d025c0b0e81834436a4f2e8.zip |
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
Diffstat (limited to 'src/i_system.h')
-rw-r--r-- | src/i_system.h | 6 |
1 files changed, 6 insertions, 0 deletions
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 |