Index: trunk/src/plug_io.c =================================================================== --- trunk/src/plug_io.c (revision 627) +++ trunk/src/plug_io.c (revision 628) @@ -30,6 +30,7 @@ #include #include +#include #include #include "plug_io.h" @@ -101,8 +102,14 @@ continue; rewind(f); if ((io->test_load == NULL) || (io->test_load(camv, fn, f) != 0)) { + int res; rewind(f); - if (io->load(camv, fn, f) == 0) { + + rnd_event(&camv->hidlib, RND_EVENT_LOAD_PRE, "s", fn); + res = io->load(camv, fn, f); + rnd_event(&camv->hidlib, RND_EVENT_LOAD_POST, "si", fn, res); + + if (res == 0) { fclose(f); post_load(camv); return 0;