cfg: Create emu.cfg if missing
This commit is contained in:
parent
2e28e57be8
commit
aa7aa18cab
|
@ -74,6 +74,10 @@ bool cfgOpen()
|
||||||
cfgPath=GetPath("/emu.cfg");
|
cfgPath=GetPath("/emu.cfg");
|
||||||
FILE* cfgfile = fopen(cfgPath.c_str(),"r");
|
FILE* cfgfile = fopen(cfgPath.c_str(),"r");
|
||||||
|
|
||||||
|
if (!cfgfile) {
|
||||||
|
cfgfile = fopen(cfgPath.c_str(), "wt");
|
||||||
|
}
|
||||||
|
|
||||||
if(!cfgfile) {
|
if(!cfgfile) {
|
||||||
printf("Unable to open the config file for reading or writing\nfile : %s\n",cfgPath.c_str());
|
printf("Unable to open the config file for reading or writing\nfile : %s\n",cfgPath.c_str());
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue