From 72f5f17011dbd5bee22e5209a355ed83757622ee Mon Sep 17 00:00:00 2001 From: Thomas Jentzsch Date: Mon, 27 Sep 2021 22:08:53 +0200 Subject: [PATCH] added regex for PAL-M in filename (->NTSC) --- src/emucore/Console.cxx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/emucore/Console.cxx b/src/emucore/Console.cxx index 511496961..7787e6512 100644 --- a/src/emucore/Console.cxx +++ b/src/emucore/Console.cxx @@ -312,13 +312,14 @@ void Console::redetectFrameLayout() // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - string Console::formatFromFilename() const { - static const BSPF::array2D Pattern = {{ - { R"([ _\-(\[<]+NTSC[ _-]?50)", "NTSC50" }, - { R"([ _\-(\[<]+PAL[ _-]?60)", "PAL60" }, - { R"([ _\-(\[<]+SECAM[ _-]?60)", "SECAM60" }, - { R"([ _\-(\[<]+NTSC[ _\-)\]>.])", "NTSC" }, - { R"([ _\-(\[<]+PAL[ _\-)\]>.])", "PAL" }, - { R"([ _\-(\[<]+SECAM[ _\-)\]>.])", "SECAM" } + static const BSPF::array2D Pattern = {{ + { R"([ _\-(\[<]+NTSC[ _-]?50)", "NTSC50" }, + { R"([ _\-(\[<]+PAL[ _-]?60)", "PAL60" }, + { R"([ _\-(\[<]+SECAM[ _-]?60)", "SECAM60" }, + { R"([ _\-(\[<]+NTSC[ _\-)\]>.])", "NTSC" }, + { R"([ _\-(\[<]+PAL[ _-]?M[ _\-)\]>.])", "NTSC" }, // PAL-M == NTSC + { R"([ _\-(\[<]+PAL[ _\-)\]>.])", "PAL" }, + { R"([ _\-(\[<]+SECAM[ _\-)\]>.])", "SECAM" } }}; // Get filename, and search using regex's above