libretro/RetroArch — pull request #320 by Themaister (2013-10-01 10:25:03+00:00)
Title: Create default config

A problem right now (on Unix) with a clean retroarch install is that there is no default config file.
/etc/retroarch.cfg will be found as the default config file as-is, and setting config_save_on_exit won't work at all since it's normally read-only.

This fixes the problem by creating a new clean config file in ~/.config/retroarch/retroarch.cfg if no default config is found. Same thing on Windows, just retroarch.cfg in same dir as retroarch.exe.

Previously, Phoenix used to do this for you, but we cannot rely on that anymore.

If RetroArch creates a default config file, it'll have config_save_on_exit set automatically, so RGUI configs "just work" out of the box.

I've also removed a stone dead and broken "per-game config" feature which has been rotting in there for ages.

I had to add recursive mkdir (path_mkdir() in file_path.c). I see there is a trivial mkdir implementation in frontend/frontend.c. The console code should use path_mkdir() instead. I cannot build-test on consoles, so the console implementation is stubbed out in path_mkdir() atm. Squarepusher should look at this.