73 #pragma warning(disable:181) // "invalid printf conversion" - but wchar_t* and %ls are legit
119 #define OVERRIDE_IF_NONZERO(HOOKNAME) if(new_ah->HOOKNAME) ah.HOOKNAME = new_ah->HOOKNAME;
131 const u8* ah_bytes = (
const u8*)&ah;
132 const u8* default_ah_bytes = (
const u8*)&default_ah;
134 if(*(FP)(ah_bytes+offset_in_struct) != *(FP)(default_ah_bytes+offset_in_struct))
#define UNUSED(param)
mark a function parameter as unused and avoid the corresponding compiler warning. ...
static void def_translate_free(const wchar_t *text)
ErrorReactionInternal(* display_error)(const wchar_t *text, size_t flags)
const wchar_t *(* translate)(const wchar_t *text)
special return value for the display_error app hook stub to indicate that it has done nothing and tha...
const OsPath &(* get_log_dir)()
void ah_log(const wchar_t *text)
write text to the app's log.
void ah_override_gl_upload_caps()
override default decision on using OpenGL extensions relating to texture upload.
void(* override_gl_upload_caps)()
static const OsPath & def_get_log_dir()
void ah_translate_free(const wchar_t *text)
free text that was returned by translate.
#define ENSURE(expr)
ensure the expression <expr> evaluates to non-zero.
static ErrorReactionInternal def_display_error(const wchar_t *text, size_t flags)
ErrorReactionInternal ah_display_error(const wchar_t *text, size_t flags)
display an error dialog, thus overriding sys_display_error.
void(* translate_free)(const wchar_t *text)
void(* bundle_logs)(FILE *f)
static void def_override_gl_upload_caps()
static void def_bundle_logs(FILE *f)
static AppHooks default_ah
OsPath sys_ExecutablePathname()
static const wchar_t * def_translate(const wchar_t *text)
const OsPath & ah_get_log_dir()
return path to directory into which crash dumps should be written.
bool app_hook_was_redefined(size_t offset_in_struct)
was the app hook changed via app_hooks_update from its default value?
holds a function pointer (allowed to be NULL) for each hook.
void app_hooks_update(AppHooks *new_ah)
update the app hook function pointers.
void(* log)(const wchar_t *text)
static void def_log(const wchar_t *text)
const wchar_t * ah_translate(const wchar_t *text)
translate text to the current locale.
ErrorReactionInternal
all choices offered by the error dialog.
void ah_bundle_logs(FILE *f)
gather all app-related logs/information and write it to file.
#define OVERRIDE_IF_NONZERO(HOOKNAME)