Fixed #351: Create Hardfile didn't work as expected

This commit is contained in:
Dimitris Panokostas 2018-08-25 12:19:28 +02:00
parent cb3f211695
commit 81148e06d5

View file

@ -372,22 +372,18 @@ bool CreateFilesysHardfile()
SDL_UpdateTexture(gui_texture, nullptr, gui_screen->pixels, gui_screen->pitch);
#endif
UpdateGuiScreen();
CreateFilesysHardfileLoop();
ExitCreateFilesysHardfile();
if (dialogResult)
{
char buffer[512];
auto size = atoi(txtSize->getText().c_str());
if (size < 1)
size = 1;
if (size > 2048)
size = 2048;
const auto bp = tweakbootpri(atoi(txtBootPri->getText().c_str()), 1, 0);
extractPath(const_cast<char *>(txtPath->getText().c_str()), currentDir);
const auto newFile = fopen(txtPath->getText().c_str(), "wb");
const auto newFile = fopen(txtPath->getText().c_str(), "wbe");
if (!newFile)
{
ShowMessage("Create Hardfile", "Unable to create new file.", "", "Ok", "");
@ -414,5 +410,6 @@ bool CreateFilesysHardfile()
}
}
ExitCreateFilesysHardfile();
return dialogResult;
}