diff --git a/zsnes/src/cfgload.c b/zsnes/src/cfgload.c index 96483921..bd649128 100644 --- a/zsnes/src/cfgload.c +++ b/zsnes/src/cfgload.c @@ -141,14 +141,17 @@ extern unsigned int ZCloseFile(); //Close_File #ifdef __LINUX__ extern char zcfgdir[1024]; +unsigned char changedsavedir = 1; //Set to yes, since savedir is always set and considered to be changed +#else +unsigned char changedsavedir = 0; //Only set to yes if modified in the paths window #endif + char SRAMDir[1024]; char LoadDriveB[2]; char LoadDirB[128]; -//extern "C"{ unsigned char cfgsoundon = 0; unsigned char cfgSoundQuality = 5; unsigned char cfgStereoSound = 1; @@ -170,8 +173,6 @@ unsigned char JoyStatRead = 0; unsigned char pl12s34 = 0; unsigned char cfgdontsave = 0; unsigned char cfgreinittime = 30; -//} - #define ConvertJoyMapHelp(a,b,c)\ if(b == c) \ @@ -561,7 +562,14 @@ void DOScreatenewcfg() WRITE_LINE("; Savefile directory. Leave it blank if you want the save files to be in the\r\n"); WRITE_LINE("; same directory as the games. It should be in a format like : C:\\dir\\dir\r\n\r\n"); - sprintf(buffer, "SaveDirectory = %s\r\n\r\n", SRAMDir); + if (changedsavedir) + { + sprintf(buffer, "SaveDirectory = %s\r\n\r\n", SRAMDir); + } + else + { + sprintf(buffer, "SaveDirectory = \r\n\r\n"); + } SAVE_LINE(buffer); WRITE_LINE("; Game directory. This is the directory where the GUI starts at.\r\n"); diff --git a/zsnes/src/gui/gui.asm b/zsnes/src/gui/gui.asm index 2cd1c04c..3f5ad950 100644 --- a/zsnes/src/gui/gui.asm +++ b/zsnes/src/gui/gui.asm @@ -166,7 +166,8 @@ EXTSYM GUIHQ3X EXTSYM GUIHQ4X EXTSYM firstsaveinc EXTSYM nssdip1,nssdip2,nssdip3,nssdip4,nssdip5,nssdip6 -;EXTSYM st010difficulty +EXTSYM changedsavedir + %ifdef __LINUX__ EXTSYM numlockptr %endif diff --git a/zsnes/src/gui/guikeys.inc b/zsnes/src/gui/guikeys.inc index 8f524921..892a5889 100644 --- a/zsnes/src/gui/guikeys.inc +++ b/zsnes/src/gui/guikeys.inc @@ -1684,6 +1684,7 @@ GUIPathKeys: cmp dword[GUIInputBox],1 jne .notBox1 + mov byte[changedsavedir],1 ;Need this to know if we should save the path mov eax,SRAMDir jmp .boxselected .notBox1