Skip to content

Fix setting libretro device types with a device subclass#155

Open
garbear wants to merge 2 commits intokodi-game:Piersfrom
garbear:fix-subclass
Open

Fix setting libretro device types with a device subclass#155
garbear wants to merge 2 commits intokodi-game:Piersfrom
garbear:fix-subclass

Conversation

@garbear
Copy link
Member

@garbear garbear commented Mar 17, 2026

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes libretro device subclass handling when connecting controllers, and aligns keyboard/mouse port identifiers with the Kodi Game API while reducing noisy error logs for keyboard/mouse “ports”.

Changes:

  • Fix incorrect parameter passed to CLibretroDevice::SetSubclass() when a subclass override is present.
  • Switch keyboard/mouse port type matching to use Game API constants (KEYBOARD_PORT_ID, MOUSE_PORT_ID) and remove local duplicates.
  • Suppress “invalid port address” error logging when ConnectController() is invoked for keyboard/mouse addresses.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/input/InputTranslator.cpp Uses Game API keyboard/mouse port ID constants when translating port types.
src/input/InputManager.h Adds helpers to identify keyboard/mouse port addresses.
src/input/InputManager.cpp Fixes subclass override assignment and implements keyboard/mouse address helpers.
src/input/InputDefinitions.h Removes local keyboard/mouse port string macros and relies on Game API definitions.
src/client.cpp Avoids logging invalid-port errors for keyboard/mouse port addresses.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants