summaryrefslogtreecommitdiffhomepage
path: root/tracker-wii/wii_camera.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-04-14 05:33:24 +0200
committerStanislaw Halik <sthalik@misaki.pl>2019-04-14 06:16:41 +0200
commitc9a486401d6d2fb71034b456854f4fe7e8478f6d (patch)
treefdbb977527186184a2a6414c801d67832c67d06f /tracker-wii/wii_camera.cpp
parent6d8321785f34f7cad6c02c2d91fc3961f57a853c (diff)
tracker/wii: kill static variables
Diffstat (limited to 'tracker-wii/wii_camera.cpp')
-rw-r--r--tracker-wii/wii_camera.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/tracker-wii/wii_camera.cpp b/tracker-wii/wii_camera.cpp
index cc019992..06a607c0 100644
--- a/tracker-wii/wii_camera.cpp
+++ b/tracker-wii/wii_camera.cpp
@@ -274,16 +274,14 @@ void WIICamera::get_status(struct wii_info& wii)
wii.bBatteryDrained = m_pDev->bBatteryDrained;
//draw horizon
- static int p = 0;
- static int r = 0;
if (m_pDev->Nunchuk.Acceleration.Orientation.UpdateAge < 10)
{
- p = m_pDev->Acceleration.Orientation.Pitch;
- r = m_pDev->Acceleration.Orientation.Roll;
+ pitch_ = m_pDev->Acceleration.Orientation.Pitch;
+ roll_ = m_pDev->Acceleration.Orientation.Roll;
}
- wii.Pitch = p;
- wii.Roll = r;
+ wii.Pitch = pitch_;
+ wii.Roll = roll_;
}
void WIICamera::on_state_change(wiimote &remote,