Rewrite libretro.c