From d5647ce997b2fdb5cbc7c468107fff1a1c89d0fa Mon Sep 17 00:00:00 2001 From: dapetcu21 Date: Fri, 20 Aug 2010 14:14:27 +0000 Subject: [PATCH] Just got my iPhone back from repairs and noticed something was not quite right... The Z axis from UDPWii were inverted... oops... X_X ...hopefully I got it right this time... Homebrew doesn't work and I don't have any way to test it... I did some improvements on the IR pointer math, but they are on my desktop and I'm away on vacation for a few weeks... X_X ... next time... WOL git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6112 8ced0084-cf51-0410-be5f-012b33b47a6e --- .../Plugin_WiimoteNew/Src/WiimoteEmu/Attachment/Nunchuk.cpp | 2 +- Source/Plugins/Plugin_WiimoteNew/Src/WiimoteEmu/UDPTLayer.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteEmu/Attachment/Nunchuk.cpp b/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteEmu/Attachment/Nunchuk.cpp index c486c5cdb5..03e929799c 100644 --- a/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteEmu/Attachment/Nunchuk.cpp +++ b/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteEmu/Attachment/Nunchuk.cpp @@ -111,7 +111,7 @@ void Nunchuk::GetState(u8* const data, const bool focus) m_udpWrap->inst->getNunchuckAccel(x,y,z); accel->x=u8(x*(calib->one_g.x-calib->zero_g.x)+calib->zero_g.x); accel->y=u8(y*(calib->one_g.y-calib->zero_g.y)+calib->zero_g.y); - accel->z=u8(z*(calib->one_g.z-calib->zero_g.z)+calib->zero_g.z); + accel->z=u8(-z*(calib->one_g.z-calib->zero_g.z)+calib->zero_g.z); } } //End UDPNunchuck diff --git a/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteEmu/UDPTLayer.h b/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteEmu/UDPTLayer.h index 89212a3423..cd0db9c119 100644 --- a/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteEmu/UDPTLayer.h +++ b/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteEmu/UDPTLayer.h @@ -36,7 +36,7 @@ namespace UDPTLayer m->inst->getAccel(x,y,z); data->x=u8(x*(calib->one_g.x-calib->zero_g.x)+calib->zero_g.x); data->y=u8(y*(calib->one_g.y-calib->zero_g.y)+calib->zero_g.y); - data->z=u8(z*(calib->one_g.z-calib->zero_g.z)+calib->zero_g.z); + data->z=u8(-z*(calib->one_g.z-calib->zero_g.z)+calib->zero_g.z); } void GetIR( UDPWrapper * m, float * x, float * y, float * z)