diff options
| author | Matthew Parlane <parlane@gmail.com> | 2014-07-22 11:57:12 +1200 |
|---|---|---|
| committer | Matthew Parlane <parlane@gmail.com> | 2014-07-22 11:57:12 +1200 |
| commit | 954e61949f1c8e83f4805e830af8ea7b587ff10f (patch) | |
| tree | df99918acee9f271332596017ba52a0051b35ab1 /Source/Core | |
| parent | d369627d703a9380ccbbbba4be52a043e26b0e8d (diff) | |
Use new stick/trigger constants for Classic.cpp
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/HW/WiimoteEmu/Attachment/Classic.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/Core/Core/HW/WiimoteEmu/Attachment/Classic.cpp b/Source/Core/Core/HW/WiimoteEmu/Attachment/Classic.cpp index 80673c8f6a..ff4e640916 100644 --- a/Source/Core/Core/HW/WiimoteEmu/Attachment/Classic.cpp +++ b/Source/Core/Core/HW/WiimoteEmu/Attachment/Classic.cpp @@ -92,8 +92,8 @@ void Classic::GetState(u8* const data) double x, y; m_left_stick->GetState(&x, &y); - ccdata->lx = (x * 0x1F) + 0x20; - ccdata->ly = (y * 0x1F) + 0x20; + ccdata->lx = LEFT_STICK_CENTER_X + (x * LEFT_STICK_RADIUS); + ccdata->ly = LEFT_STICK_CENTER_Y + (y * LEFT_STICK_RADIUS); } // right stick @@ -102,8 +102,8 @@ void Classic::GetState(u8* const data) u8 x_, y_; m_right_stick->GetState(&x, &y); - x_ = (x * 0x1F) + 0x20; - y_ = (y * 0x1F) + 0x20; + x_ = RIGHT_STICK_CENTER_X + (x * RIGHT_STICK_RADIUS); + y_ = RIGHT_STICK_CENTER_Y + (y * RIGHT_STICK_RADIUS); ccdata->rx1 = x_; ccdata->rx2 = x_ >> 1; @@ -117,8 +117,8 @@ void Classic::GetState(u8* const data) u8 lt, rt; m_triggers->GetState(&ccdata->bt, classic_trigger_bitmasks, trigs); - lt = trigs[0] * 0x1F; - rt = trigs[1] * 0x1F; + lt = trigs[0] * LEFT_TRIGGER_RANGE; + rt = trigs[1] * RIGHT_TRIGGER_RANGE; ccdata->lt1 = lt; ccdata->lt2 = lt >> 3; |
