20 this->
function =
function;
31 #define MAXOR( A, B ) ( ( (A) < (B) ) ? (B) : (A) )
47 JoystickState[whichswitch][
joystick][key] =
UP;
92 #ifndef NO_SDL_JOYSTICK
107 if (
joystick[
i]->debug_digital_hatswitch) {
109 sprintf( buf,
"hsw: %d", hsw );
110 std::cout<<buf<<std::endl;
115 #ifndef NO_SDL_JOYSTICK
118 if (
joystick[
i]->debug_digital_hatswitch)
119 std::cout<<
"center"<<std::endl;
122 if ( dir_index ==
VS_HAT_LEFT && (hsw&SDL_HAT_LEFT) )
126 if ( dir_index ==
VS_HAT_DOWN && (hsw&SDL_HAT_DOWN) )
128 if ( dir_index ==
VS_HAT_UP && (hsw&SDL_HAT_UP) )
143 &JoystickBindings[
DIGHATSWITCH][
i][
h*MAX_DIGITAL_VALUES+dir_index];
162 if ( ( buttons&(1<<
j) ) ) {
183 if (
joystick[hs_joy]->isAvailable() ) {
187 if (fabs( hs_val ) <= 1.0) {
191 if (hs_val-margin <= axevalue && axevalue <= hs_val+margin) {