Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Perfect Dark Zero support #37

Merged
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Disable mouse LS emulation if SHIFT is held down
Clippy95 committed Dec 13, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit cc5da4e5ccb6e1246a712854de56a08c5ae0d26a
5 changes: 4 additions & 1 deletion src/xenia/hid/winkey/hookables/PerfectDarkZero.cc
Original file line number Diff line number Diff line change
@@ -35,6 +35,9 @@ const uint32_t kTitleIdPerfectDarkZero = 0x4D5307D3;
namespace xe {
namespace hid {
namespace winkey {
bool __inline IsKeyDown(uint8_t key) {
return (GetAsyncKeyState(key) & 0x8000) == 0x8000;
}
struct GameBuildAddrs {
const char* build_string;
uint32_t build_string_addr;
@@ -492,7 +495,7 @@ void PerfectDarkZeroGame::HandleRightStickEmulation(RawInputState& input_state,
if (!LSmode) {
out_state->gamepad.thumb_rx = static_cast<short>(accumulated_x);
out_state->gamepad.thumb_ry = static_cast<short>(accumulated_y);
} else {
} else if (LSmode && !IsKeyDown(VK_SHIFT)) {
out_state->gamepad.thumb_lx = static_cast<short>(accumulated_x);
out_state->gamepad.thumb_ly = static_cast<short>(accumulated_y);
}