mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-20 10:56:58 +02:00
feat(input): add host input remapping
Add compact keyboard and mouse mapping with analog-stick defaults and integrate a global remapping editor into the Qt launcher. Based on the host input remapping work from PR #109. Co-authored-by: DistantMyth <thetarun3@gmail.com>
This commit is contained in:
@@ -85,8 +85,6 @@ private:
|
||||
|
||||
static GameController* g_controller = nullptr;
|
||||
|
||||
static constexpr int KEYBOARD_CONTROLLER_ID = -1000;
|
||||
|
||||
static uint8_t pad_connected_count_to_u8(int connected_count) {
|
||||
return static_cast<uint8_t>(connected_count > 255 ? 255 : connected_count);
|
||||
}
|
||||
@@ -117,7 +115,7 @@ KYTY_SUBSYSTEM_INIT(Controller) {
|
||||
EXIT_IF(g_controller != nullptr);
|
||||
|
||||
g_controller = new GameController;
|
||||
g_controller->Connect(KEYBOARD_CONTROLLER_ID);
|
||||
g_controller->Connect(HOST_INPUT_CONTROLLER_ID);
|
||||
}
|
||||
|
||||
KYTY_SUBSYSTEM_UNEXPECTED_SHUTDOWN(Controller) {}
|
||||
@@ -155,7 +153,7 @@ void GameController::CheckActive() {
|
||||
if (!m_connected_ids.empty()) {
|
||||
new_active_id = m_connected_ids[0];
|
||||
for (const auto id: m_connected_ids) {
|
||||
if (id != KEYBOARD_CONTROLLER_ID) {
|
||||
if (id != HOST_INPUT_CONTROLLER_ID) {
|
||||
new_active_id = id;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user