From 963fb48ba7ca0eba3f723ecd598e9a7200101a16 Mon Sep 17 00:00:00 2001 From: AJR Date: Sun, 31 Jan 2016 12:41:18 -0500 Subject: [PATCH] Ignore invalid default slot options in software lists This prevents software lists from (e.g.) trying to put a Zapper into ctrl1 on the Famicom. --- src/emu/emuopts.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/emu/emuopts.cpp b/src/emu/emuopts.cpp index 725f002aa00..af0e790b525 100644 --- a/src/emu/emuopts.cpp +++ b/src/emu/emuopts.cpp @@ -262,7 +262,7 @@ bool emu_options::add_slot_options(const software_part *swpart) { std::string featurename = std::string(name).append("_default"); const char *value = swpart->feature(featurename.c_str()); - if (value != nullptr) + if (value != nullptr && (*value == '\0' || slot->option(value) != nullptr)) set_default_value(name, value); } }