mirror of https://github.com/snes9xgit/snes9x.git
Fixes issue where non-archive msu-1 files would have improper file extensions
This commit is contained in:
parent
55d50c7fbd
commit
86ab38408c
|
@ -121,8 +121,15 @@ const char *S9xGetFilename(const char *ex, enum s9x_getdirtype dirtype)
|
|||
static std::string filename;
|
||||
fs::path path(S9xGetDirectory(dirtype));
|
||||
path /= fs::path(Memory.ROMFilename).filename();
|
||||
path.replace_extension(ex);
|
||||
filename = path.string();
|
||||
//Fixes issue with MSU-1 on linux
|
||||
if(ex[0] == '-') {
|
||||
path.replace_extension("");
|
||||
filename = path.string();
|
||||
filename.append(ex);
|
||||
} else {
|
||||
path.replace_extension(ex);
|
||||
filename = path.string();
|
||||
}
|
||||
return filename.c_str();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue