Play-/Source/ControllerInfo.cpp
jpd002 23c91b4ef0 Moved PH_DirectInput related files in a PH_DirectInput folder.
Changed the way keyboard/joystick input is processed. PH_DirectInput::InputManager now keeps track of the current state of the buttons and everyone else polls this state.

git-svn-id: http://svn.purei.org/purei/trunk@883 b36208d7-6611-0410-8bec-b1987f11c4a2
2012-04-05 02:46:13 +00:00

34 lines
568 B
C++

#include "ControllerInfo.h"
using namespace PS2;
const char* CControllerInfo::m_buttonName[CControllerInfo::MAX_BUTTONS] =
{
"analog_left_x",
"analog_left_y",
"analog_right_x",
"analog_right_y",
"dpad_up",
"dpad_down",
"dpad_left",
"dpad_right",
"select",
"start",
"square",
"triangle",
"circle",
"cross",
"l1",
"l2",
"r1",
"r2",
};
bool CControllerInfo::IsAxis(BUTTON button)
{
return
(button == ANALOG_LEFT_X) ||
(button == ANALOG_LEFT_Y) ||
(button == ANALOG_RIGHT_X) ||
(button == ANALOG_RIGHT_Y);
}