The NVR name is now obtained from the selected machine BIOS type if applicable.

This commit is contained in:
OBattler
2025-02-13 00:45:10 +01:00
parent 4806519388
commit 187a1ca416
11 changed files with 40 additions and 15 deletions

View File

@@ -696,7 +696,7 @@ static const device_config_t pb450_config[] = {
.file_filter = "",
.spinner = { 0 },
.bios = {
{ .name = "PCI 1.0A", .internal_name = "pci10a", .bios_type = BIOS_NORMAL,
{ .name = "PCI 1.0A", .internal_name = "pb450" /*"pci10a"*/, .bios_type = BIOS_NORMAL,
.files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/pb450/OPTI802.bin", "" } },
{ .name = "PNP 1.1A", .internal_name = "pnp11a", .bios_type = BIOS_NORMAL,
.files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/pb450/PNP11A.bin", "" } },

View File

@@ -16565,3 +16565,26 @@ machine_is_sony(void)
{
return (!strcmp(machines[machine].internal_name, "pcv90"));
}
const char *
machine_get_nvr_name_ex(int m)
{
const char *ret = machines[m].internal_name;
const device_t *dev = machine_get_device(m);
if (dev != NULL) {
device_context(dev);
const char *bios = device_get_config_string("bios");
if ((bios != NULL) && (strcmp(bios, "") != 0))
ret = bios;
device_context_restore();
}
return ret;
}
const char *
machine_get_nvr_name(void)
{
return machine_get_nvr_name_ex(machine);
}