From 35b115a4077923145c91d0c93955d8243a4aeece Mon Sep 17 00:00:00 2001 From: OBattler Date: Thu, 21 Nov 2024 14:59:19 +0100 Subject: [PATCH] And the device config section migration for it. --- src/device.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/device.c b/src/device.c index 46125f58e..2f5a3cdad 100644 --- a/src/device.c +++ b/src/device.c @@ -111,6 +111,14 @@ device_set_context(device_context_t *c, const device_t *dev, int inst) void * old_sec = config_find_section("Standard PS/2 Mouse"); if ((sec == NULL) && (old_sec != NULL)) config_rename_section(old_sec, c->name); + } else if (!strcmp(dev->name, "Microsoft RAMCard")) { + sprintf(c->name, "%s", dev->name); + + /* Migrate the old "Standard PS/2 Mouse" section */ + const void *sec = config_find_section(c->name); + void * old_sec = config_find_section("Microsoft RAMCard for IBM PC"); + if ((sec == NULL) && (old_sec != NULL)) + config_rename_section(old_sec, c->name); } else sprintf(c->name, "%s", dev->name); }