-
-
Notifications
You must be signed in to change notification settings - Fork 212
GB_set_log_callback
typedef void (*GB_log_callback_t)(GB_gameboy_t *gb, const char *string, GB_log_attributes_t attributes);
void GB_set_log_callback(GB_gameboy_t *gb, GB_log_callback_t callback);
In gb.h
Sets a callback that will be called whenever the emulator instance wants to output information such as errors, warnings and debugger output. Logs are formatted, and each string
is accompanied with a bitfield of attributes determining its visual style. Do not implicitly add new lines ('\n'
) after string
, string
will include a '\n'
suffix if and only if it's required.
If callback
is not NULL, GB_set_log_callback
is thread-safe and can be called from any thread and context. Otherwise, it must not be called if the instance is being run in another thread, but may be called from the current one (via a callback).