Changeset 2812 for trunk/src/platform/d3d9
- Timestamp:
- Jul 23, 2013, 9:39:21 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/platform/d3d9/d3d9input.cpp
r2810 r2812 60 60 continue; 61 61 #if defined LOL_INPUT_V2 62 63 64 65 66 67 62 // TODO: we can put more friendly name here, such as LeftAxisX, ButtonX... 63 InputDeviceInternal* stick = new InputDeviceInternal(String::Printf("Joystick%d", i+1).C()); 64 for (int j = 0; j < 4; ++j) 65 stick->AddAxis(String::Printf("Axis%d", j+1).C()); 66 for (int j = 0; j < 16; ++j) 67 stick->AddKey(String::Printf("Button%d", j+1).C()); 68 68 69 69 m_data->m_joysticks.Push(i, stick); 70 70 #else 71 71 Stick *stick = Input::CreateStick(); … … 87 87 { 88 88 #if defined LOL_INPUT_V2 89 89 delete m_data->m_joysticks[0].m2; 90 90 #else 91 91 Input::DestroyStick(m_data->m_joysticks[0].m2); 92 92 #endif // LOL_INPUT_V2 93 93 m_data->m_joysticks.Remove(0); 94 94 } 95 95 #endif … … 120 120 for (int b = 0; b < 16; b++) 121 121 #if defined LOL_INPUT_V2 122 122 m_data->m_joysticks[i].m2->SetKey(b, ((uint16_t)(state.Gamepad.wButtons) >> b) & 1); 123 123 #else 124 124 m_data->m_joysticks[i].m2->SetButton(b, ((uint16_t)(state.Gamepad.wButtons) >> b) & 1); 125 125 #endif // LOL_INPUT_V2 126 126 } 127 127 #endif 128 128 }
Note: See TracChangeset
for help on using the changeset viewer.