mirror of https://github.com/PCSX2/pcsx2.git
ZeroSPU2: Fix saving options in the Windows version.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@649 a6443dda-0b58-4228-96e9-037be469359c
This commit is contained in:
parent
c09f69f242
commit
4575351e36
|
@ -303,12 +303,12 @@ void SaveConfig()
|
||||||
|
|
||||||
if(!szTemp) return;
|
if(!szTemp) return;
|
||||||
szTemp[0] = 0; // this modifies szInitFile also.
|
szTemp[0] = 0; // this modifies szInitFile also.
|
||||||
|
|
||||||
strcat_s(szIniFile, "\\inis\\zerospu2.ini");
|
strcat_s(szIniFile, "\\inis\\zerospu2.ini");
|
||||||
sprintf_s(szValue,"%u",Conf1->Log);
|
sprintf_s(szValue,"%u",Conf1->Log);
|
||||||
WritePrivateProfileString("Interface", "Logging",szValue,szIniFile);
|
WritePrivateProfileString("Interface", "Logging",szValue,szIniFile);
|
||||||
sprintf_s(szValue,"%u",Conf1->options);
|
sprintf_s(szValue,"%u",Conf1->options);
|
||||||
WritePrivateProfileString("Interface", "Options",szValue,szIniFile);
|
WritePrivateProfileString("Interface", "Options",szValue,szIniFile);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LoadConfig()
|
void LoadConfig()
|
||||||
|
@ -317,14 +317,16 @@ void LoadConfig()
|
||||||
Config *Conf1 = &conf;
|
Config *Conf1 = &conf;
|
||||||
char *szTemp;
|
char *szTemp;
|
||||||
char szIniFile[256], szValue[256];
|
char szIniFile[256], szValue[256];
|
||||||
|
int err;
|
||||||
|
|
||||||
GetModuleFileName(GetModuleHandle((LPCSTR)hInst), szIniFile, 256);
|
GetModuleFileName(GetModuleHandle((LPCSTR)hInst), szIniFile, 256);
|
||||||
szTemp = strrchr(szIniFile, '\\');
|
szTemp = strrchr(szIniFile, '\\');
|
||||||
|
|
||||||
if(!szTemp) return ;
|
if(!szTemp) return ;
|
||||||
szTemp[0] = 0;
|
szTemp[0] = 0;
|
||||||
strcpy_s(szIniFile, "\\inis\\zerospu2.ini");
|
|
||||||
fopen_s(&fp, "inis\\zerospu2.ini","rt");//check if usbnull.ini really exists
|
strcat_s(szIniFile, "\\inis\\zerospu2.ini");
|
||||||
|
fopen_s(&fp, "inis\\zerospu2.ini","rt");//check if zerospu2.ini really exists
|
||||||
if (!fp)
|
if (!fp)
|
||||||
{
|
{
|
||||||
CreateDirectory("inis",NULL);
|
CreateDirectory("inis",NULL);
|
||||||
|
|
Loading…
Reference in New Issue