Rebase fix and move reused fileIns lambdas into cpp static functions (since effectively private)

This commit is contained in:
James Alan Nguyen 2022-05-08 14:50:18 +10:00
parent 7cd0d728b2
commit 7ae72f0fe4
3 changed files with 52 additions and 162 deletions

View file

@ -1749,13 +1749,13 @@ int DivEngine::addSampleFromFile(const char* path) {
}
extS+=i;
}
if (extS==String(".dmc")) { // read as .dmc
if (extS==".dmc") { // read as .dmc
size_t len=0;
DivSample* sample=new DivSample;
int sampleCount=(int)song.sample.size();
sample->name=stripPath;
FILE* f=fopen(path,"rb");
FILE* f=ps_fopen(path,"rb");
if (f==NULL) {
BUSY_END;
lastError=fmt::sprintf("could not open file! (%s)",strerror(errno));