cfg: Create emu.cfg if missing

This commit is contained in:
Stefanos Kornilios Mitsis Poiitidis 2015-08-24 14:05:51 +02:00
parent 2e28e57be8
commit aa7aa18cab
1 changed files with 4 additions and 0 deletions

View File

@ -74,6 +74,10 @@ bool cfgOpen()
cfgPath=GetPath("/emu.cfg");
FILE* cfgfile = fopen(cfgPath.c_str(),"r");
if (!cfgfile) {
cfgfile = fopen(cfgPath.c_str(), "wt");
}
if(!cfgfile) {
printf("Unable to open the config file for reading or writing\nfile : %s\n",cfgPath.c_str());
return false;