Start backporting some stuff from windows/main.cpp to libretro.cpp