mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-07-04 22:32:57 +12:00
More CPP fixes
This commit is contained in:
parent
a3f9ced3aa
commit
935e088ca1
5 changed files with 36 additions and 10 deletions
|
@ -28,8 +28,14 @@ namespace IR {
|
|||
ButtonState() {
|
||||
// Response header for button state reads
|
||||
cStick.header = static_cast<u8>(CPPResponseID::PollButtons);
|
||||
cStick.x = static_cast<u32>(CirclePadPro::ButtonState::C_STICK_CENTER);
|
||||
cStick.y = static_cast<u32>(CirclePadPro::ButtonState::C_STICK_CENTER);
|
||||
|
||||
// Fully charged
|
||||
buttons.batteryLevel = 0x1F;
|
||||
buttons.zrNotPressed = 1;
|
||||
buttons.zlNotPressed = 1;
|
||||
buttons.rNotPressed = 1;
|
||||
unknown = 0;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -79,6 +79,11 @@ class IRUserService {
|
|||
IRUserService(Memory& mem, const EmulatorConfig& config, Kernel& kernel)
|
||||
: mem(mem), config(config), kernel(kernel), cpp([&](IR::Device::Payload payload) { sendPayload(payload); }) {}
|
||||
|
||||
void setZRPressed(bool pressed) { cpp.state.buttons.zrNotPressed = pressed ? 0 : 1; }
|
||||
void setZLPressed(bool pressed) { cpp.state.buttons.zrNotPressed = pressed ? 0 : 1; }
|
||||
void setCStickX(s16 value) { cpp.state.cStick.x = value; }
|
||||
void setCStickY(s16 value) { cpp.state.cStick.y = value; }
|
||||
|
||||
void reset();
|
||||
void handleSyncRequest(u32 messagePointer);
|
||||
void updateCirclePadPro();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue