summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/hid
diff options
context:
space:
mode:
authorgerman77 <juangerman-13@hotmail.com>2021-11-04 21:43:08 +0100
committerNarr the Reg <juangerman-13@hotmail.com>2021-11-25 03:30:27 +0100
commitb21fcd952721af357d50d487ffba9580e5a6bf00 (patch)
tree2a8cd332b11ba01a422ed61e406445a025e4cc93 /src/core/hle/service/hid
parentsettings: Fix controller preview not displaying the correct controller (diff)
downloadyuzu-b21fcd952721af357d50d487ffba9580e5a6bf00.tar
yuzu-b21fcd952721af357d50d487ffba9580e5a6bf00.tar.gz
yuzu-b21fcd952721af357d50d487ffba9580e5a6bf00.tar.bz2
yuzu-b21fcd952721af357d50d487ffba9580e5a6bf00.tar.lz
yuzu-b21fcd952721af357d50d487ffba9580e5a6bf00.tar.xz
yuzu-b21fcd952721af357d50d487ffba9580e5a6bf00.tar.zst
yuzu-b21fcd952721af357d50d487ffba9580e5a6bf00.zip
Diffstat (limited to 'src/core/hle/service/hid')
-rw-r--r--src/core/hle/service/hid/controllers/npad.cpp31
1 files changed, 30 insertions, 1 deletions
diff --git a/src/core/hle/service/hid/controllers/npad.cpp b/src/core/hle/service/hid/controllers/npad.cpp
index e4a3d9163..fcc36bbc1 100644
--- a/src/core/hle/service/hid/controllers/npad.cpp
+++ b/src/core/hle/service/hid/controllers/npad.cpp
@@ -221,7 +221,6 @@ void Controller_NPad::InitNewlyAddedController(std::size_t controller_idx) {
break;
case Core::HID::NpadStyleIndex::GameCube:
shared_memory.style_set.gamecube.Assign(1);
- // The GC Controller behaves like a wired Pro Controller
shared_memory.device_type.fullkey.Assign(1);
shared_memory.system_properties.is_vertical.Assign(1);
shared_memory.system_properties.use_plus.Assign(1);
@@ -231,6 +230,24 @@ void Controller_NPad::InitNewlyAddedController(std::size_t controller_idx) {
shared_memory.device_type.palma.Assign(1);
shared_memory.assignment_mode = NpadJoyAssignmentMode::Single;
break;
+ case Core::HID::NpadStyleIndex::NES:
+ shared_memory.style_set.lark.Assign(1);
+ shared_memory.device_type.fullkey.Assign(1);
+ break;
+ case Core::HID::NpadStyleIndex::SNES:
+ shared_memory.style_set.lucia.Assign(1);
+ shared_memory.device_type.fullkey.Assign(1);
+ shared_memory.applet_footer.type = AppletFooterUiType::Lucia;
+ break;
+ case Core::HID::NpadStyleIndex::N64:
+ shared_memory.style_set.lagoon.Assign(1);
+ shared_memory.device_type.fullkey.Assign(1);
+ shared_memory.applet_footer.type = AppletFooterUiType::Lagon;
+ break;
+ case Core::HID::NpadStyleIndex::SegaGenesis:
+ shared_memory.style_set.lager.Assign(1);
+ shared_memory.device_type.fullkey.Assign(1);
+ break;
default:
break;
}
@@ -431,6 +448,10 @@ void Controller_NPad::OnUpdate(const Core::Timing::CoreTiming& core_timing, u8*
UNREACHABLE();
break;
case Core::HID::NpadStyleIndex::ProController:
+ case Core::HID::NpadStyleIndex::NES:
+ case Core::HID::NpadStyleIndex::SNES:
+ case Core::HID::NpadStyleIndex::N64:
+ case Core::HID::NpadStyleIndex::SegaGenesis:
pad_state.connection_status.raw = 0;
pad_state.connection_status.is_connected.Assign(1);
pad_state.connection_status.is_wired.Assign(1);
@@ -1108,6 +1129,14 @@ bool Controller_NPad::IsControllerSupported(Core::HID::NpadStyleIndex controller
return style.gamecube;
case Core::HID::NpadStyleIndex::Pokeball:
return style.palma;
+ case Core::HID::NpadStyleIndex::NES:
+ return style.lark;
+ case Core::HID::NpadStyleIndex::SNES:
+ return style.lucia;
+ case Core::HID::NpadStyleIndex::N64:
+ return style.lagoon;
+ case Core::HID::NpadStyleIndex::SegaGenesis:
+ return style.lager;
default:
return false;
}