Changeset 2563
- Timestamp:
- Mar 7, 2013, 12:33:49 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/platform/ps3/ps3input.cpp
r2216 r2563 77 77 CELL_PADFILTER_IIR_CUTOFF_2ND_LPF_BT_010); 78 78 79 /* Try to detect connected pads. We should do this each frame. */80 CellPadInfo2 pad_info2;81 ret = cellPadGetInfo2(&pad_info2);82 if (ret == CELL_PAD_OK)83 {84 for (int i = 0; i < NUM_PADS; i++)85 {86 if (!(pad_info2.port_status[i] & CELL_PAD_STATUS_CONNECTED))87 continue;88 89 Stick *stick = Input::CreateStick();90 stick->SetAxisCount(4);91 stick->SetButtonCount(16);92 m_data->m_joysticks.Push(i, stick);93 }94 }95 96 79 m_data->mousepos = vec2(320.0f, 240.0f); 97 80 m_data->mousebuttons = ivec3(0, 0, 0); … … 111 94 return; 112 95 96 /* Try to detect newly connected pads. */ 97 for (int i = 0; i < NUM_PADS; i++) 98 { 99 if (!(pad_info2.port_status[i] & CELL_PAD_STATUS_CONNECTED)) 100 continue; 101 102 bool new_stick = true; 103 for (int j = 0; j < m_data->m_joysticks.Count(); ++j) 104 if (m_data->m_joysticks[j].m1 == i) 105 new_stick = false; 106 107 if (new_stick) 108 { 109 Stick *stick = Input::CreateStick(); 110 stick->SetAxisCount(4); 111 stick->SetButtonCount(16); 112 m_data->m_joysticks.Push(i, stick); 113 } 114 } 115 116 /* Update pad status */ 113 117 for (int i = 0; i < m_data->m_joysticks.Count(); i++) 114 118 {
Note: See TracChangeset
for help on using the changeset viewer.