Some keyboard-related special casing for the PC5086, so the keyboard is locked to PC/XT but PS/2 mouse remains usable.

This commit is contained in:
OBattler
2025-08-03 00:40:14 +02:00
parent 2f7d0ea25e
commit 8222bd1dba
3 changed files with 11 additions and 5 deletions

View File

@@ -484,6 +484,8 @@ load_input_devices(void)
p = ini_section_get_string(cat, "keyboard_type", NULL);
if (p != NULL)
keyboard_type = keyboard_get_from_internal_name(p);
else if (strstr(machine_get_internal_name(), "pc5086"))
keyboard_type = KEYBOARD_TYPE_PC_XT;
else if (machine_has_bus(machine, MACHINE_BUS_PS2_PORTS)) {
if (machine_has_flags(machine, MACHINE_KEYBOARD_JIS))
keyboard_type = KEYBOARD_TYPE_PS55;

View File

@@ -18374,8 +18374,9 @@ machine_has_bus(int m, int bus_flags)
/* TODO: Move the KBD flags to the machine table! */
if ((bus_flags & MACHINE_BUS_XT_KBD) &&
!(machines[m].bus_flags & MACHINE_BUS_ISA16) &&
!(machines[m].bus_flags & MACHINE_BUS_PS2_PORTS))
ret |= MACHINE_BUS_XT_KBD;
(!(machines[m].bus_flags & MACHINE_BUS_PS2_PORTS) ||
!(strcmp(machine_get_internal_name(), "pc5086"))))
ret |= MACHINE_BUS_XT_KBD;
#ifdef ONLY_AT_KBD_ON_AT_KBC
if ((bus_flags & MACHINE_BUS_AT_KBD) &&

View File

@@ -121,10 +121,13 @@ SettingsInput::onCurrentMachineChanged(int machineId)
int has_int_kbd = !!machine_has_flags(machineId, MACHINE_KEYBOARD);
for (int i = 0; i < keyboard_get_ndev(); ++i) {
const auto *dev = keyboard_get_device(i);
int ikbd = (i == KEYBOARD_TYPE_INTERNAL);
const auto *dev = keyboard_get_device(i);
int ikbd = (i == KEYBOARD_TYPE_INTERNAL);
if ((ikbd != has_int_kbd) || !device_is_valid(dev, machineId))
int pc5086_filter = (strstr(keyboard_get_internal_name(i), "ps") &&
strstr(machine_get_internal_name_ex(machineId), "pc5086"));
if ((ikbd != has_int_kbd) || !device_is_valid(dev, machineId) || pc5086_filter)
continue;
QString name = DeviceConfig::DeviceName(dev, keyboard_get_internal_name(i), 0);