From 4575351e361ff0105095154fd9cdd2e9fb596442 Mon Sep 17 00:00:00 2001 From: arcum42 Date: Wed, 28 Jan 2009 11:17:38 +0000 Subject: [PATCH] ZeroSPU2: Fix saving options in the Windows version. git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@649 a6443dda-0b58-4228-96e9-037be469359c --- plugins/zerospu2/Win32.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/zerospu2/Win32.cpp b/plugins/zerospu2/Win32.cpp index dbfd03406c..9e24627c9d 100644 --- a/plugins/zerospu2/Win32.cpp +++ b/plugins/zerospu2/Win32.cpp @@ -303,12 +303,12 @@ void SaveConfig() if(!szTemp) return; szTemp[0] = 0; // this modifies szInitFile also. + strcat_s(szIniFile, "\\inis\\zerospu2.ini"); sprintf_s(szValue,"%u",Conf1->Log); WritePrivateProfileString("Interface", "Logging",szValue,szIniFile); sprintf_s(szValue,"%u",Conf1->options); WritePrivateProfileString("Interface", "Options",szValue,szIniFile); - } void LoadConfig() @@ -317,14 +317,16 @@ void LoadConfig() Config *Conf1 = &conf; char *szTemp; char szIniFile[256], szValue[256]; + int err; GetModuleFileName(GetModuleHandle((LPCSTR)hInst), szIniFile, 256); szTemp = strrchr(szIniFile, '\\'); if(!szTemp) return ; 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) { CreateDirectory("inis",NULL);