mirror of
https://github.com/86Box/86Box.git
synced 2026-02-22 09:35:32 -07:00
Merge machine_getname_ex into machine_getname
This commit is contained in:
@@ -1353,7 +1353,7 @@ pc_init_roms(void)
|
||||
while (machine_get_internal_name_ex(c) != NULL) {
|
||||
m = machine_available(c);
|
||||
if (!m)
|
||||
pclog("Missing machine: %s\n", machine_getname_ex(c));
|
||||
pclog("Missing machine: %s\n", machine_getname(c));
|
||||
c++;
|
||||
}
|
||||
|
||||
@@ -1394,7 +1394,7 @@ pc_init_modules(void)
|
||||
|
||||
/* Load the ROMs for the selected machine. */
|
||||
if (!machine_available(machine)) {
|
||||
swprintf(temp, sizeof_w(temp), plat_get_string(STRING_HW_NOT_AVAILABLE_MACHINE), machine_getname());
|
||||
swprintf(temp, sizeof_w(temp), plat_get_string(STRING_HW_NOT_AVAILABLE_MACHINE), machine_getname(machine));
|
||||
c = 0;
|
||||
machine = -1;
|
||||
while (machine_get_internal_name_ex(c) != NULL) {
|
||||
@@ -1816,7 +1816,7 @@ update_mouse_msg(void)
|
||||
wchar_t wmachine[2048];
|
||||
wchar_t *wcp;
|
||||
|
||||
mbstowcs(wmachine, machine_getname(), strlen(machine_getname()) + 1);
|
||||
mbstowcs(wmachine, machine_getname(machine), strlen(machine_getname(machine)) + 1);
|
||||
|
||||
if (!cpu_override)
|
||||
mbstowcs(wcpufamily, cpu_f->name, strlen(cpu_f->name) + 1);
|
||||
|
||||
@@ -191,7 +191,7 @@ postcard_init(UNUSED(const device_t *info))
|
||||
if (machine_has_bus(machine, MACHINE_BUS_MCA))
|
||||
postcard_port = 0x680; /* MCA machines */
|
||||
else if (strstr(machines[machine].name, " PS/2 ") ||
|
||||
strstr(machine_getname_ex(machine), " PS/1 "))
|
||||
strstr(machine_getname(machine), " PS/1 "))
|
||||
postcard_port = 0x190; /* ISA PS/2 machines */
|
||||
else if (strstr(machines[machine].name, " IBM XT "))
|
||||
postcard_port = 0x60; /* IBM XT */
|
||||
|
||||
@@ -91,9 +91,9 @@ discord_update_activity(int paused)
|
||||
#endif
|
||||
if (strlen(vm_name) < 100) {
|
||||
snprintf(activity.details, sizeof(activity.details), "Running \"%s\"", vm_name);
|
||||
snprintf(activity.state, sizeof(activity.state), "%s (%s/%s)", strchr(machine_getname(), ']') + 2, cpufamily, cpu_s->name);
|
||||
snprintf(activity.state, sizeof(activity.state), "%s (%s/%s)", strchr(machine_getname(machine), ']') + 2, cpufamily, cpu_s->name);
|
||||
} else {
|
||||
strncpy(activity.details, strchr(machine_getname(), ']') + 2, sizeof(activity.details) - 1);
|
||||
strncpy(activity.details, strchr(machine_getname(machine), ']') + 2, sizeof(activity.details) - 1);
|
||||
snprintf(activity.state, sizeof(activity.state), "%s/%s", cpufamily, cpu_s->name);
|
||||
}
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
@@ -484,7 +484,7 @@ fdd_type_invert_densel(int type)
|
||||
int ret;
|
||||
|
||||
if (drive_types[type].flags & FLAG_PS2)
|
||||
ret = (!!strstr(machine_getname(), "PS/1")) || (!!strstr(machine_getname(), "PS/2")) || (!!strstr(machine_getname(), "PS/55"));
|
||||
ret = (!!strstr(machine_getname(machine), "PS/1")) || (!!strstr(machine_getname(machine), "PS/2")) || (!!strstr(machine_getname(machine), "PS/55"));
|
||||
else
|
||||
ret = drive_types[type].flags & FLAG_INVERT_DENSEL;
|
||||
|
||||
|
||||
@@ -387,8 +387,7 @@ extern void * machine_snd;
|
||||
/* Core functions. */
|
||||
extern int machine_count(void);
|
||||
extern int machine_available(int m);
|
||||
extern const char * machine_getname(void);
|
||||
extern const char * machine_getname_ex(int m);
|
||||
extern const char * machine_getname(int m);
|
||||
extern const char * machine_get_internal_name(void);
|
||||
extern const char * machine_get_nvr_name(void);
|
||||
extern int machine_get_machine_from_internal_name(const char *s);
|
||||
|
||||
@@ -69,7 +69,7 @@ machine_init_ex(int m)
|
||||
int ret = 0;
|
||||
|
||||
if (!bios_only) {
|
||||
machine_log("Initializing as \"%s\"\n", machine_getname());
|
||||
machine_log("Initializing as \"%s\"\n", machine_getname(machine));
|
||||
|
||||
machine_init_p1();
|
||||
|
||||
|
||||
@@ -20472,13 +20472,7 @@ machine_count(void)
|
||||
}
|
||||
|
||||
const char *
|
||||
machine_getname(void)
|
||||
{
|
||||
return (machines[machine].name);
|
||||
}
|
||||
|
||||
const char *
|
||||
machine_getname_ex(int m)
|
||||
machine_getname(int m)
|
||||
{
|
||||
return (machines[m].name);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user