summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar bunnei2018-12-26 15:47:11 -0500
committerGravatar bunnei2018-12-26 15:47:11 -0500
commit7e622c55758c55e0fdb7a7cc42886272d4187f06 (patch)
tree7cf0a88357b490aabbcd4df1642ef64c249bf3ce /src
parentMerge pull request #1886 from FearlessTobi/port-4164 (diff)
downloadyuzu-7e622c55758c55e0fdb7a7cc42886272d4187f06.tar.gz
yuzu-7e622c55758c55e0fdb7a7cc42886272d4187f06.tar.xz
yuzu-7e622c55758c55e0fdb7a7cc42886272d4187f06.zip
npad: Remove code to invert input in horizontal mode.
- This was incorrect, the game appears to handle this for us. - Fixes horizontal mode with Puyo Puyo Tetris and Super Mario Odyssey.
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/hid/controllers/npad.cpp46
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) {