ares: support disconnecting controller from emulated device
Selecting "nothing" for a controller port from the UI only consistently blocked input from the host, and it did not reliably do the extra work required to actually disconnect the controller from the perspective of the emulated device. This was handled only by the MD and N64 cores, but now all cores are standardized on the disconnection method originally implemented for MD.
このコミットが含まれているのは:
コミット
a63d20c0d1
|
@ -10,6 +10,7 @@ auto ControllerPort::load(Node::Object parent) -> void {
|
|||
port->setType("Controller");
|
||||
port->setHotSwappable(true);
|
||||
port->setAllocate([&](auto name) { return allocate(name); });
|
||||
port->setDisconnect([&] { device.reset(); });
|
||||
port->setSupported({"Gamepad"});
|
||||
}
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ auto ControllerPort::load(Node::Object parent) -> void {
|
|||
port->setType("Controller");
|
||||
port->setHotSwappable(true);
|
||||
port->setAllocate([&](auto name) { return allocate(name); });
|
||||
port->setDisconnect([&] { device.reset(); });
|
||||
port->setSupported({"Gamepad"});
|
||||
}
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ auto ControllerPort::load(Node::Object parent) -> void {
|
|||
port->setType("Controller");
|
||||
port->setHotSwappable(true);
|
||||
port->setAllocate([&](auto name) { return allocate(name); });
|
||||
port->setDisconnect([&] { device.reset(); });
|
||||
port->setSupported({"Gamepad"});
|
||||
}
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ auto ExpansionPort::load(Node::Object parent) -> void {
|
|||
port->setType("Expansion");
|
||||
port->setHotSwappable(true);
|
||||
port->setAllocate([&](auto name) { return allocate(name); });
|
||||
port->setDisconnect([&] { device.reset(); });
|
||||
port->setSupported({"Family Keyboard"});
|
||||
}
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ auto ControllerPort::load(Node::Object parent) -> void {
|
|||
port->setType("Controller");
|
||||
port->setHotSwappable(true);
|
||||
port->setAllocate([&](auto name) { return allocate(name); });
|
||||
port->setDisconnect([&] { device.reset(); });
|
||||
port->setSupported({"Gamepad", "Light Phaser", "Paddle", "Sports Pad", "MD Control Pad", "MD Fighting Pad", "Mega Mouse"});
|
||||
}
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ auto ControllerPort::load(Node::Object parent) -> void {
|
|||
port->setType("Controller");
|
||||
port->setHotSwappable(true);
|
||||
port->setAllocate([&](auto name) { return allocate(name); });
|
||||
port->setDisconnect([&] { device.reset(); });
|
||||
port->setSupported({"Gamepad","Arkanoid Vaus Paddle"});
|
||||
}
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ auto ControllerPort::load(Node::Object parent) -> void {
|
|||
port->setType("Controller");
|
||||
port->setHotSwappable(true);
|
||||
port->setAllocate([&](auto name) { return allocate(name); });
|
||||
port->setDisconnect([&] { device.reset(); });
|
||||
port->setSupported({"Gamepad", "Mouse"});
|
||||
}
|
||||
|
||||
|
@ -25,7 +26,6 @@ auto ControllerPort::save() -> void {
|
|||
}
|
||||
|
||||
auto ControllerPort::allocate(string name) -> Node::Peripheral {
|
||||
device = {};
|
||||
if(name == "Gamepad") device = new Gamepad(port);
|
||||
if(name == "Mouse" ) device = new Mouse(port);
|
||||
if(device) return device->node;
|
||||
|
|
|
@ -9,6 +9,7 @@ auto CardSlot::load(Node::Object parent) -> void {
|
|||
port->setType("Memory Card");
|
||||
port->setHotSwappable(true);
|
||||
port->setAllocate([&](auto name) { return allocate(name); });
|
||||
port->setDisconnect([&] { device.reset(); });
|
||||
port->setSupported({"Memory Card"});
|
||||
}
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ auto ControllerPort::load(Node::Object parent) -> void {
|
|||
port->setType("Controller");
|
||||
port->setHotSwappable(true);
|
||||
port->setAllocate([&](auto name) { return allocate(name); });
|
||||
port->setDisconnect([&] { device.reset(); });
|
||||
port->setSupported({"Arcade Stick"});
|
||||
}
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ auto ControllerPort::load(Node::Object parent) -> void {
|
|||
port->setType("Controller");
|
||||
port->setHotSwappable(true);
|
||||
port->setAllocate([&](auto name) { return allocate(name); });
|
||||
port->setDisconnect([&] { device.reset(); });
|
||||
port->setSupported({"Gamepad", "Avenue Pad 6", "Multitap"});
|
||||
}
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ auto PeripheralPort::load(Node::Object parent) -> void {
|
|||
port->setType(type);
|
||||
port->setHotSwappable(true);
|
||||
port->setAllocate([&](auto name) { return allocate(name); });
|
||||
port->setDisconnect([&] { device.reset(); });
|
||||
if(type == "Controller") {
|
||||
port->setSupported({"Digital Gamepad"});
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ auto ControllerPort::load(Node::Object parent) -> void {
|
|||
port->setType("Controller");
|
||||
port->setHotSwappable(true);
|
||||
port->setAllocate([&](auto name) { return allocate(name); });
|
||||
port->setDisconnect([&] { device.reset(); });
|
||||
port->setSupported({
|
||||
"Gamepad",
|
||||
"Justifier",
|
||||
|
|
|
@ -10,6 +10,7 @@ auto ControllerPort::load(Node::Object parent) -> void {
|
|||
port->setType("Controller");
|
||||
port->setHotSwappable(true);
|
||||
port->setAllocate([&](auto name) { return allocate(name); });
|
||||
port->setDisconnect([&] { device.reset(); });
|
||||
port->setSupported({"Gamepad"});
|
||||
}
|
||||
|
||||
|
|
|
@ -401,8 +401,6 @@ auto Presentation::loadEmulator() -> void {
|
|||
peripheralItem.onActivate([=] {
|
||||
auto port = peripheralItem.attribute<ares::Node::Port>("port");
|
||||
port->disconnect();
|
||||
port->allocate(peripheralItem.text());
|
||||
port->connect();
|
||||
});
|
||||
peripheralGroup.append(peripheralItem);
|
||||
}
|
||||
|
|
読み込み中…
新しいイシューから参照