GCPadStatus: coalescing magic numbers into consts

This commit is contained in:
booto
2014-07-21 18:37:21 +08:00
parent 38d5197a2c
commit 0d2bef2743
4 changed files with 23 additions and 16 deletions

View File

@ -244,7 +244,7 @@ void TASInputDlg::ResetValues()
void TASInputDlg::GetKeyBoardInput(GCPadStatus* PadStatus)
{
if (PadStatus->stickX != 128)
if (PadStatus->stickX != GCPadStatus::MAIN_STICK_CENTER_X)
{
mainX = PadStatus->stickX;
mstickx = true;
@ -254,11 +254,11 @@ void TASInputDlg::GetKeyBoardInput(GCPadStatus* PadStatus)
else if (mstickx)
{
mstickx = false;
mainX = 128;
mainX = GCPadStatus::MAIN_STICK_CENTER_X;
wx_mainX_t->SetValue(wxString::Format("%i", mainX));
}
if (PadStatus->stickY != 128)
if (PadStatus->stickY != GCPadStatus::MAIN_STICK_CENTER_Y)
{
mainY = PadStatus->stickY;
msticky = true;
@ -267,11 +267,11 @@ void TASInputDlg::GetKeyBoardInput(GCPadStatus* PadStatus)
else if (msticky)
{
msticky = false;
mainY = 128;
mainY = GCPadStatus::MAIN_STICK_CENTER_Y;
wx_mainY_t->SetValue(wxString::Format("%i", mainY));
}
if (PadStatus->substickX != 128)
if (PadStatus->substickX != GCPadStatus::C_STICK_CENTER_X)
{
cX = PadStatus->substickX;
cstickx = true;
@ -280,11 +280,11 @@ void TASInputDlg::GetKeyBoardInput(GCPadStatus* PadStatus)
else if (cstickx)
{
cstickx = false;
cX = 128;
cX = GCPadStatus::C_STICK_CENTER_X;
wx_cX_t->SetValue(wxString::Format("%i", cX));
}
if (PadStatus->substickY != 128)
if (PadStatus->substickY != GCPadStatus::C_STICK_CENTER_Y)
{
cY = PadStatus->substickY;
csticky = true;
@ -293,7 +293,7 @@ void TASInputDlg::GetKeyBoardInput(GCPadStatus* PadStatus)
else if (csticky)
{
csticky = false;
cY = 128;
cY = GCPadStatus::C_STICK_CENTER_Y;
wx_cY_t->SetValue(wxString::Format("%i", cY));
}