hm just an head up: your rfx_apply_screen() and rfx_draw_surface() need a proper clean up surface which it's something like this:
in clean up event:
if (surf_rfx != -1) {
surface_free(surf_rfx);
}
i hope that will help solve a good number of problem.