diff options
| author | 2018-12-27 11:04:40 -0500 | |
|---|---|---|
| committer | 2018-12-27 11:04:40 -0500 | |
| commit | 2991c747c9cc37f4bfac5aadcd60e829caeb38f3 (patch) | |
| tree | fcd1c359f0be3f667925601b47efcc32618d58a4 | |
| parent | Merge pull request #1949 from lioncash/unmap (diff) | |
| parent | npad: Remove code to invert input in horizontal mode. (diff) | |
| download | yuzu-2991c747c9cc37f4bfac5aadcd60e829caeb38f3.tar.gz yuzu-2991c747c9cc37f4bfac5aadcd60e829caeb38f3.tar.xz yuzu-2991c747c9cc37f4bfac5aadcd60e829caeb38f3.zip | |
Merge pull request #1945 from bunnei/fix-hid-horiz
npad: Remove code to invert input in horizontal mode.
| -rw-r--r-- | src/core/hle/service/hid/controllers/npad.cpp | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/src/core/hle/service/hid/controllers/npad.cpp b/src/core/hle/service/hid/controllers/npad.cpp index d6829d0b8..75fdb861a 100644 --- a/src/core/hle/service/hid/controllers/npad.cpp +++ b/src/core/hle/service/hid/controllers/npad.cpp | |||
| @@ -339,52 +339,6 @@ void Controller_NPad::OnUpdate(u8* data, std::size_t data_len) { | |||
| 339 | npad.pokeball_states.npad[npad.pokeball_states.common.last_entry_index]; | 339 | npad.pokeball_states.npad[npad.pokeball_states.common.last_entry_index]; |
| 340 | auto& libnx_entry = npad.libnx.npad[npad.libnx.common.last_entry_index]; | 340 | auto& libnx_entry = npad.libnx.npad[npad.libnx.common.last_entry_index]; |
| 341 | 341 | ||
| 342 | if (hold_type == NpadHoldType::Horizontal) { | ||
| 343 | ControllerPadState state{}; | ||
| 344 | AnalogPosition temp_lstick_entry{}; | ||
| 345 | AnalogPosition temp_rstick_entry{}; | ||
| 346 | if (controller_type == NPadControllerType::JoyLeft) { | ||
| 347 | state.d_down.Assign(pad_state.pad_states.d_left.Value()); | ||
| 348 | state.d_left.Assign(pad_state.pad_states.d_up.Value()); | ||
| 349 | state.d_right.Assign(pad_state.pad_states.d_down.Value()); | ||
| 350 | state.d_up.Assign(pad_state.pad_states.d_right.Value()); | ||
| 351 | state.l.Assign(pad_state.pad_states.l.Value() | | ||
| 352 | pad_state.pad_states.left_sl.Value()); | ||
| 353 | state.r.Assign(pad_state.pad_states.r.Value() | | ||
| 354 | pad_state.pad_states.left_sr.Value()); | ||
| 355 | |||
| 356 | state.zl.Assign(pad_state.pad_states.zl.Value()); | ||
| 357 | state.plus.Assign(pad_state.pad_states.minus.Value()); | ||
| 358 | |||
| 359 | temp_lstick_entry = pad_state.l_stick; | ||
| 360 | temp_rstick_entry = pad_state.r_stick; | ||
| 361 | std::swap(temp_lstick_entry.x, temp_lstick_entry.y); | ||
| 362 | std::swap(temp_rstick_entry.x, temp_rstick_entry.y); | ||
| 363 | temp_lstick_entry.y *= -1; | ||
| 364 | } else if (controller_type == NPadControllerType::JoyRight) { | ||
| 365 | state.x.Assign(pad_state.pad_states.a.Value()); | ||
| 366 | state.a.Assign(pad_state.pad_states.b.Value()); | ||
| 367 | state.b.Assign(pad_state.pad_states.y.Value()); | ||
| 368 | state.y.Assign(pad_state.pad_states.b.Value()); | ||
| 369 | |||
| 370 | state.l.Assign(pad_state.pad_states.l.Value() | | ||
| 371 | pad_state.pad_states.right_sl.Value()); | ||
| 372 | state.r.Assign(pad_state.pad_states.r.Value() | | ||
| 373 | pad_state.pad_states.right_sr.Value()); | ||
| 374 | state.zr.Assign(pad_state.pad_states.zr.Value()); | ||
| 375 | state.plus.Assign(pad_state.pad_states.plus.Value()); | ||
| 376 | |||
| 377 | temp_lstick_entry = pad_state.l_stick; | ||
| 378 | temp_rstick_entry = pad_state.r_stick; | ||
| 379 | std::swap(temp_lstick_entry.x, temp_lstick_entry.y); | ||
| 380 | std::swap(temp_rstick_entry.x, temp_rstick_entry.y); | ||
| 381 | temp_rstick_entry.x *= -1; | ||
| 382 | } | ||
| 383 | pad_state.pad_states.raw = state.raw; | ||
| 384 | pad_state.l_stick = temp_lstick_entry; | ||
| 385 | pad_state.r_stick = temp_rstick_entry; | ||
| 386 | } | ||
| 387 | |||
| 388 | libnx_entry.connection_status.raw = 0; | 342 | libnx_entry.connection_status.raw = 0; |
| 389 | 343 | ||
| 390 | switch (controller_type) { | 344 | switch (controller_type) { |