now automounts the newly created image
This commit is contained in:
parent
876f417edd
commit
d8135fbf1e
3 changed files with 10 additions and 15 deletions
|
@ -902,7 +902,7 @@ void FileBrowser::UpdateInputFolders()
|
|||
char newFileName[64];
|
||||
strncpy (newFileName, options.GetAutoBaseName(), 63);
|
||||
int num = folder.FindNextAutoName( newFileName );
|
||||
m_IEC_Commands.CreateD64(newFileName, "42");
|
||||
m_IEC_Commands.CreateD64(newFileName, "42", true);
|
||||
FolderChanged();
|
||||
}
|
||||
else
|
||||
|
|
|
@ -1103,24 +1103,13 @@ void IEC_Commands::New(void)
|
|||
if(!(strstr(filenameNew, ".d64") || strstr(filenameNew, ".D64")))
|
||||
strcat(filenameNew, ".d64");
|
||||
|
||||
int ret = CreateD64(filenameNew, ID);
|
||||
int ret = CreateD64(filenameNew, ID, true);
|
||||
|
||||
if (ret==0)
|
||||
{
|
||||
updateAction = REFRESH;
|
||||
|
||||
// Mount the new disk? Shoud we do this or let them do it manually?
|
||||
if (f_stat(filenameNew, &filInfo) == FR_OK)
|
||||
{
|
||||
DIR dir;
|
||||
Enter(dir, filInfo);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Error(ret);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void IEC_Commands::Rename(void)
|
||||
|
@ -1884,7 +1873,7 @@ void IEC_Commands::CloseFile(u8 secondary)
|
|||
channel.Close();
|
||||
}
|
||||
|
||||
int IEC_Commands::CreateD64(char* filenameNew, char* ID)
|
||||
int IEC_Commands::CreateD64(char* filenameNew, char* ID, bool automount)
|
||||
{
|
||||
FILINFO filInfo;
|
||||
FRESULT res;
|
||||
|
@ -1941,6 +1930,12 @@ int IEC_Commands::CreateD64(char* filenameNew, char* ID)
|
|||
}
|
||||
f_close(&fpOut);
|
||||
}
|
||||
// Mount the new disk? Shoud we do this or let them do it manually?
|
||||
if (automount && f_stat(filenameNew, &filInfo) == FR_OK)
|
||||
{
|
||||
DIR dir;
|
||||
Enter(dir, filInfo);
|
||||
}
|
||||
return(ERROR_00_OK);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -79,7 +79,7 @@ public:
|
|||
const FILINFO* GetImageSelected() const { return &filInfoSelectedImage; }
|
||||
void SetStarFileName(const char* fileName) { starFileName = fileName; }
|
||||
|
||||
int CreateD64(char* filenameNew, char* ID);
|
||||
int CreateD64(char* filenameNew, char* ID, bool automount);
|
||||
|
||||
protected:
|
||||
enum ATNSequence
|
||||
|
|
Loading…
Reference in a new issue