parent
ba8cd2f672
commit
c55cc8b2ea
3 changed files with 21 additions and 5 deletions
|
|
@ -4760,18 +4760,17 @@ bool FurnaceGUI::importLayout(String path) {
|
|||
fclose(f);
|
||||
return false;
|
||||
}
|
||||
unsigned char* file=new unsigned char[len];
|
||||
if (fread(file,1,(size_t)len,f)!=(size_t)len) {
|
||||
pendingLayoutImport=new unsigned char[len];
|
||||
if (fread(pendingLayoutImport,1,(size_t)len,f)!=(size_t)len) {
|
||||
perror("read error");
|
||||
lastError=fmt::sprintf("on read: %s",strerror(errno));
|
||||
fclose(f);
|
||||
delete[] file;
|
||||
delete[] pendingLayoutImport;
|
||||
return false;
|
||||
}
|
||||
fclose(f);
|
||||
|
||||
ImGui::LoadIniSettingsFromMemory((const char*)file,len);
|
||||
delete[] file;
|
||||
pendingLayoutImportLen=len;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue