LV2 Config
| 68 | |
| 69 | // LV2 Config |
| 70 | void lv2_config::initialize() { |
| 71 | if (m_state || !m_state.compare_and_swap_test(0, 1)) { |
| 72 | return; |
| 73 | } |
| 74 | |
| 75 | // Register padmanager service, notifying vsh that a controller is connected |
| 76 | static const u8 hid_info[0x1a] = { |
| 77 | 0x01, 0x01, // 2 unk |
| 78 | 0x02, 0x02, // 4 |
| 79 | 0x00, 0x00, // 6 |
| 80 | 0x00, 0x00, // 8 |
| 81 | 0x00, 0x00, // 10 |
| 82 | 0x05, 0x4c, // 12 vid |
| 83 | 0x02, 0x68, // 14 pid |
| 84 | 0x00, 0x10, // 16 unk2 |
| 85 | 0x91, 0x88, // 18 |
| 86 | 0x04, 0x00, // 20 |
| 87 | 0x00, 0x07, // 22 |
| 88 | 0x00, 0x00, // 24 |
| 89 | 0x00, 0x00 // 26 |
| 90 | }; |
| 91 | |
| 92 | // user_id for the padmanager seems to signify the controller port number, and |
| 93 | // the buffer contains some sort of HID descriptor |
| 94 | lv2_config_service::create(SYS_CONFIG_SERVICE_PADMANAGER, 0, 1, 0, hid_info, |
| 95 | 0x1a) |
| 96 | ->notify(); |
| 97 | lv2_config_service::create(SYS_CONFIG_SERVICE_PADMANAGER2, 0, 1, 0, hid_info, |
| 98 | 0x1a) |
| 99 | ->notify(); |
| 100 | } |
| 101 | |
| 102 | void lv2_config::add_service_event(shared_ptr<lv2_config_service_event> event) { |
| 103 | std::lock_guard lock(m_mutex); |
no test coverage detected