summaryrefslogtreecommitdiff
path: root/plugins/dfsound/cfg.c
diff options
context:
space:
mode:
authorSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2009-10-05 08:12:50 +0000
committerSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2009-10-05 08:12:50 +0000
commitb59859784f3d86b70fbf024fcce878c44a92d9e8 (patch)
tree77834ec5205dcdb4136ef69465412236e1a045d8 /plugins/dfsound/cfg.c
parent224fc8b2fef21ac5506cba0579f622e8c5a39b1a (diff)
downloadpcsxr-b59859784f3d86b70fbf024fcce878c44a92d9e8.tar.gz
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@31115 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'plugins/dfsound/cfg.c')
-rw-r--r--plugins/dfsound/cfg.c29
1 files changed, 16 insertions, 13 deletions
diff --git a/plugins/dfsound/cfg.c b/plugins/dfsound/cfg.c
index 6f092e54..142494f9 100644
--- a/plugins/dfsound/cfg.c
+++ b/plugins/dfsound/cfg.c
@@ -33,18 +33,19 @@
void StartCfgTool(char * pCmdLine)
{
- FILE * cf;char filename[255],t[255];
+ FILE * cf;
+ char filename[255];
strcpy(filename,"cfg/cfgDFSound");
cf=fopen(filename,"rb");
if(cf!=NULL)
{
fclose(cf);
- getcwd(t,255);
- chdir("cfg");
- sprintf(filename,"./cfgDFSound %s",pCmdLine);
- system(filename);
- chdir(t);
+ if(fork()==0)
+ {
+ chdir("cfg");
+ execl(filename,"cfgDFSound",pCmdLine,NULL);
+ }
}
else
{
@@ -53,8 +54,10 @@ void StartCfgTool(char * pCmdLine)
if(cf!=NULL)
{
fclose(cf);
- sprintf(filename,"./cfgDFSound %s",pCmdLine);
- system(filename);
+ if(fork()==0)
+ {
+ execl(filename,"cfgDFSound",pCmdLine,NULL);
+ }
}
else
{
@@ -63,11 +66,11 @@ void StartCfgTool(char * pCmdLine)
if(cf!=NULL)
{
fclose(cf);
- getcwd(t,255);
- chdir(getenv("HOME"));
- sprintf(filename,"./cfgDFSound %s",pCmdLine);
- system(filename);
- chdir(t);
+ if(fork()==0)
+ {
+ chdir(getenv("HOME"));
+ execl(filename,"cfgDFSound",pCmdLine,NULL);
+ }
}
else printf("Sound error: cfgDFSound not found!\n");
}