diff options
-rw-r--r-- | sound/fmopl.cpp | 6 | ||||
-rw-r--r-- | sound/fmopl.h | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/sound/fmopl.cpp b/sound/fmopl.cpp index d97ab48e81..f8f6b97fcc 100644 --- a/sound/fmopl.cpp +++ b/sound/fmopl.cpp @@ -90,6 +90,8 @@ Config::DriverId Config::detect(OplType type) { } // Detect the first matching emulator + drv = -1; + for (int i = 1; _drivers[i].name; ++i) { if (_drivers[i].flags & flags) { drv = _drivers[i].id; @@ -100,6 +102,10 @@ Config::DriverId Config::detect(OplType type) { return drv; } +OPL *Config::create(OplType type) { + return create(kAuto, type); +} + OPL *Config::create(DriverId driver, OplType type) { // On invalid driver selection, we try to do some fallback detection if (driver == -1) { diff --git a/sound/fmopl.h b/sound/fmopl.h index 7abba50188..2b0e9c1ab2 100644 --- a/sound/fmopl.h +++ b/sound/fmopl.h @@ -85,7 +85,7 @@ public: * Wrapper to easily init an OPL chip, without specifing an emulator. * By default it will try to initialize an OPL2 emulator, thus an AdLib card. */ - static OPL *create(OplType type = kOpl2) { return create(detect(type), type); } + static OPL *create(OplType type = kOpl2); private: static const EmulatorDescription _drivers[]; |