mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-15 17:25:06 +00:00
fix improper dir sep when loading sample on Win
This commit is contained in:
parent
f75803c3b2
commit
df97142157
2 changed files with 7 additions and 1 deletions
|
@ -4833,7 +4833,7 @@ bool DivEngine::addSampleFromFile(const char* path) {
|
|||
sf_close(f);
|
||||
DivSample* sample=new DivSample;
|
||||
int sampleCount=(int)song.sample.size();
|
||||
const char* sName=strrchr(path,'/');
|
||||
const char* sName=strrchr(path,DIR_SEPARATOR);
|
||||
if (sName==NULL) {
|
||||
sName=path;
|
||||
} else {
|
||||
|
|
|
@ -9,6 +9,12 @@
|
|||
typedef SSIZE_T ssize_t;
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#define DIR_SEPARATOR '\\'
|
||||
#else
|
||||
#define DIR_SEPARATOR '/'
|
||||
#endif
|
||||
|
||||
typedef std::string String;
|
||||
|
||||
#define MIN(a,b) (((a)<(b))?(a):(b))
|
||||
|
|
Loading…
Reference in a new issue