GSOC20 query: Controller configuration - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93) +---- Forum: GSoC (https://forum.kodi.tv/forumdisplay.php?fid=299) +----- Forum: GSOC 2020 (https://forum.kodi.tv/forumdisplay.php?fid=301) +----- Thread: GSOC20 query: Controller configuration (/showthread.php?tid=351945) |
GSOC20 query: Controller configuration - cool-pants - 2020-02-22 I noticed that in the DosBOX Addon for Kodi, only the default controller configuration has been added and thus can't configure other controllers. Is it viable to work on controller configuration addition and integration with the game engine RE: GSOC20 query: Controller configuration - garbear - 2020-02-22 Yes, this is a valid project idea. I added something similar, though a bit more generic, to the wiki list: https://kodi.wiki/view/Google_Summer_of_Code/2020#Player_Manager_for_RetroPlayer RE: GSOC20 query: Controller configuration - cool-pants - 2020-02-22 (2020-02-22, 09:38)garbear Wrote: Yes, this is a valid project idea. I added something similar, though a bit more generic, to the wiki list: https://kodi.wiki/view/Google_Summer_of_Code/2020#Player_Manager_for_RetroPlayer Thank you very much for the feedback, I will work on the idea and break it into a workable project, and keep seeking further guidance on the forum. RE: GSOC20 query: Controller configuration - cool-pants - 2020-02-25 @garbear i checked that you had added the controller mapping, but on my system there still is only one controller with mapping enabled, that is the default kodi controller. Is this a bug or has it been truly not implemented? RE: GSOC20 query: Controller configuration - garbear - 2020-02-28 @cool-pants See the guide I wrote: https://kodi.wiki/view/HOW-TO:Map_multiple_controllers Maybe it's still not clear, let me know and when we figure it out I'll improve the guide RE: GSOC20 query: Controller configuration - cool-pants - 2020-02-28 (2020-02-28, 04:39)garbear Wrote: @cool-pants See the guide I wrote: https://kodi.wiki/view/HOW-TO:Map_multiple_controllersHello, I checked the kodi wiki and the application. There is a mapping option for all controllers if i go from the homepage but only the default controller from game or DOSbox interface. RE: GSOC20 query: Controller configuration - garbear - 2020-02-28 OK, I see what you're saying now. The difference in behaviors is because a playing game acts as a "filter" - only controllers supported by that game are shown. See: https://github.com/xbmc/xbmc/blob/master/xbmc/games/controllers/windows/GUIControllerWindow.cpp#L210 . It looks for an active game client (libretro core), and passes that to the controller list if discovered. So assume the controller window knows which core is active, how does it know which controllers to show? That is determined by a file named topology.xml which you can see here: https://github.com/kodi-game/game.libretro.dosbox/blob/master/game.libretro.dosbox/resources/topology.xml topology.xml defines the "controller topology", which is a tree with the console as the root, and the supported controllers as nodes. For more information, see the controller topology project: https://github.com/kodi-game/controller-topology-project The image that says "nothing to map" is concerning. Why is that list empty? That might be a good first bug to track down. RE: GSOC20 query: Controller configuration - cool-pants - 2020-02-29 (2020-02-28, 22:40)garbear Wrote: OK, I see what you're saying now. The difference in behaviors is because a playing game acts as a "filter" - only controllers supported by that game are shown. See: https://github.com/xbmc/xbmc/blob/master/xbmc/games/controllers/windows/GUIControllerWindow.cpp#L210 . It looks for an active game client (libretro core), and passes that to the controller list if discovered.So according to the topology code only the controllers attached to the active core should be shown and the rest should not be shown at all right? And also could you please guide me on the process of compilation of the code to test if the changes work or not. RE: GSOC20 query: Controller configuration - garbear - 2020-02-29 (2020-02-29, 16:11)cool-pants Wrote: So according to the topology code only the controllers attached to the active core should be shown and the rest should not be shown at all right? Yes. Does your second picture show that is not the case? If you post a debug log, I might be able to see what's wrong. (2020-02-29, 16:11)cool-pants Wrote: And also could you please guide me on the process of compilation of the code to test if the changes work or not. We have compilation docs for many platforms here: https://github.com/xbmc/xbmc/tree/master/docs If you get stuck, struggle a little, then come back and I'll point you in the right direction RE: GSOC20 query: Controller configuration - cool-pants - 2020-03-02 (2020-02-29, 22:09)garbear Wrote: Yes. Does your second picture show that is not the case? If you post a debug log, I might be able to see what's wrong.I figured out what was wrong. Apparently this bug only occurs when we run a game that is not compatible with the emulator engines, for the above case DOOM, which I downloaded separately. But shouldn't we display a not compatible message for such games rather than let them run. PS: it is working fine on games I downloaded through Kodi addons RE: GSOC20 query: Controller configuration - garbear - 2020-03-05 (2020-03-02, 09:21)cool-pants Wrote: I figured out what was wrong. Apparently this bug only occurs when we run a game that is not compatible with the emulator engines, for the above case DOOM, which I downloaded separately. Sounds like this would make for a good, simple PR RE: GSOC20 query: Controller configuration - cool-pants - 2020-03-05 (2020-03-05, 03:20)garbear Wrote: Sounds like this would make for a good, simple PROn it thanks. RE: GSOC20 query: Controller configuration - cool-pants - 2020-03-09 Excuse me @garbear i checked the debug log to figure out where the game is actually getting stuck at, i.e. is it during creating an instance of the game client or while actually trying to run the game. 2020-03-09 14:14:53.301 T:13028 DEBUG: CGUIMediaWindow::GetDirectory (D:\Games\Age of Empires 3 - Complete Edition\) 2020-03-09 14:14:53.301 T:13028 DEBUG: ParentPath = [] 2020-03-09 14:14:53.302 T:15696 DEBUG: Thread waiting start, auto delete: false 2020-03-09 14:14:53.303 T:15696 DEBUG: Thread waiting 15696 terminating 2020-03-09 14:14:55.494 T:13028 DEBUG: CInputManager:rocessMouse: trying mouse action leftclick 2020-03-09 14:14:55.495 T:13028 DEBUG: CGUIMediaWindow::GetDirectory (D:\Games\Age of Empires 3 - Complete Edition\bin\) 2020-03-09 14:14:55.495 T:13028 DEBUG: ParentPath = [D:\Games\Age of Empires 3 - Complete Edition\] 2020-03-09 14:14:55.496 T:1112 DEBUG: Thread waiting start, auto delete: false 2020-03-09 14:14:55.596 T:13028 DEBUG: ------ Window Init (DialogBusy.xml) ------ 2020-03-09 14:14:56.799 T:1112 DEBUG: Thread waiting 1112 terminating 2020-03-09 14:14:56.799 T:13028 DEBUG: ------ Window Deinit (DialogBusy.xml) ------ 2020-03-09 14:14:56.800 T:13028 DEBUG: Saving fileitems [D:\Games\Age of Empires 3 - Complete Edition\bin\] 2020-03-09 14:14:56.803 T:13028 DEBUG: -- items: 69, sort method: 0, ascending: false 2020-03-09 14:14:57.465 T:13028 DEBUG: CInputManager:rocessMouse: trying mouse action wheeldown 2020-03-09 14:14:58.515 T:13028 DEBUG: Previous line repeats 10 times. 2020-03-09 14:14:58.515 T:13028 DEBUG: Keyboard: scancode: 0x01, sym: 0x001b, unicode: 0x001b, modifier: 0x0 2020-03-09 14:14:58.682 T:13028 DEBUG: Keyboard: scancode: 0x01, sym: 0x001b, unicode: 0x0000, modifier: 0x0 2020-03-09 14:14:58.682 T:13028 DEBUG: CInputManager::HandleKey: escape (0xf01b) pressed, action is PreviousMenu 2020-03-09 14:14:58.682 T:13028 DEBUG: CGUIWindowManager:reviousWindow: Deactivate Also i am simultaneously looking into mapping of multiple controllers onto the game, so i had a doubt, do we allow multiple controller mapping and use during the game client is running or do we want the multiple controllers for the kodi interface as well. Personally i think the former makes more sense, but please advise. RE: GSOC20 query: Controller configuration - garbear - 2020-03-11 (2020-03-09, 11:32)cool-pants Wrote: Excuse me @garbear i checked the debug log to figure out where the game is actually getting stuck at, i.e. is it during creating an instance of the game client or while actually trying to run the game. I don't see a game being played, just the GUI navigated? Can you post a full debug log to our pastie site? (2020-03-09, 11:32)cool-pants Wrote: Also i am simultaneously looking into mapping of multiple controllers onto the game, so i had a doubt, do we allow multiple controller mapping and use during the game client is running or do we want the multiple controllers for the kodi interface as well. Personally i think the former makes more sense, but please advise. Multiple controllers are supported, as defined by topology.xml. You can map any controller in the GUI, it will start mapping a controller when its first button is mapped, then proceed to only map that controller and ignore the other until mapping is finished. I encourage you to find the above logic in the codebase. Start by finding the file IConfigurationWindow.h. I wanted the controller window to have its architecture well documented. Few windows in Kodi have this luxury RE: GSOC20 query: Controller configuration - garbear - 2020-03-24 If you're bored, you can read about some of the theory behind the current configuration system: https://forum.kodi.tv/showthread.php?tid=352463&pid=2933762#pid2933762 |