input: fix keyboard handler port status

🤦
This commit is contained in:
Megamouse 2021-08-26 04:20:41 +02:00
parent ae1729bd8a
commit 38097783b8
2 changed files with 3 additions and 4 deletions

View File

@ -856,8 +856,8 @@ void keyboard_pad_handler::ThreadProc()
if (last_connection_status[i] == false) if (last_connection_status[i] == false)
{ {
pad.m_port_status |= CELL_PAD_STATUS_CONNECTED; m_bindings[i]->m_port_status |= CELL_PAD_STATUS_CONNECTED;
pad.m_port_status |= CELL_PAD_STATUS_ASSIGN_CHANGES; m_bindings[i]->m_port_status |= CELL_PAD_STATUS_ASSIGN_CHANGES;
last_connection_status[i] = true; last_connection_status[i] = true;
connected_devices++; connected_devices++;
} }
@ -950,6 +950,5 @@ void keyboard_pad_handler::ThreadProc()
auto& pad = m_bindings[i]; auto& pad = m_bindings[i];
pad->m_buttons = m_pads_internal[i].m_buttons; pad->m_buttons = m_pads_internal[i].m_buttons;
pad->m_sticks = m_pads_internal[i].m_sticks; pad->m_sticks = m_pads_internal[i].m_sticks;
pad->m_port_status = m_pads_internal[i].m_port_status;
} }
} }

View File

@ -110,7 +110,7 @@ private:
void release_all_keys(); void release_all_keys();
std::vector<std::shared_ptr<Pad>> m_bindings; std::vector<std::shared_ptr<Pad>> m_bindings;
std::vector<Pad> m_pads_internal; // Accumulates input until the next poll std::vector<Pad> m_pads_internal; // Accumulates input until the next poll. Only used for user input!
// Button Movements // Button Movements
steady_clock::time_point m_button_time; steady_clock::time_point m_button_time;