From 9967581aa8a94dd44afebe5e082304e9aa95b6c2 Mon Sep 17 00:00:00 2001 From: vadosnaprimer Date: Mon, 25 Mar 2019 19:23:38 +0300 Subject: [PATCH] support sample series having just digits in filenames: "0.wav" --- desmume/src/windows/mic.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/desmume/src/windows/mic.cpp b/desmume/src/windows/mic.cpp index bb6149284..da27c20ef 100644 --- a/desmume/src/windows/mic.cpp +++ b/desmume/src/windows/mic.cpp @@ -231,7 +231,8 @@ bool LoadSamples(const char *name) if (!name || !*name) return true; //analyze the filename for _0 at the end. anything with _0 at the end is assumed to be the beginning of a series of files - //(and if not, it can still be loaded just fine) + //series with just digits in filenames also work: "0.wav". in those \ would be a remainder from the path + //(and if neither, it can still be loaded just fine) const char* ext = strrchr(name,'.'); //in case the filename had no extension... it's an error. @@ -243,13 +244,13 @@ bool LoadSamples(const char *name) if(ext