small improvements to libretro.c