RetroPlayer Test Builds (updated for Nexus)
(2015-07-01, 23:00)garbear Wrote:
(2015-07-01, 21:13)Montellese Wrote: Looking a bit at the joystick code is it possible that the following log message from CJoystickInterfaceDirectInput::EnumJoysticksCallback() is the reason why this (or any other) controller might not be detected with DirectInput:
Code:
AddOnLog: Joystick Support: ********** HWND: 00000000

Because the code then returns early even though pdidInstance contains information that looks correct like the name being "Bluetooth Wireless Controller" (which is what I see in win7's game controller window.

NVM: That only happens at the beginning (probably because the window doesn't exist yet during boot). The next scan works but it then throws an exception when trying to initialize the discovered joystick. Will investigate further.

I remember running into this problem now. The window isn't created yet so GetMainWindowHandle() returns NULL. Peripheral buses are re-scanned every 5 seconds so it should work once the window is created. I'll probably also do this to force a scan when a USB device is attached.
Yeah it works fine during the next scan so not really a problem. BTW this is a bluetooth controller I'm trying to get to work so rescanning on new USB devices isn't gonna help.

(2015-07-01, 23:00)garbear Wrote:
(2015-07-01, 21:13)Montellese Wrote: EDIT: OK I think I found the issue. At https://github.com/kodi-game/peripheral....ut.cpp#L84 you first copy all the detected CJoystickDirectInput pointers from m_scanResults into the joysticks output parameter (see https://github.com/kodi-game/peripheral....ck.cpp#L32) and then you clean up m_scanResult by deleting every CJoystick pointer it contains but since you previously copied those pointers to another vector you just destroyed the objects that you are later trying to initialize.

Removing the logic that deletes the pointers in m_scanResults gets me further and the joystick is successfully initialized but during the next scan it is recognized again and initialized again and then Kodi freezes.

I pushed a fix for this: https://github.com/kodi-game/peripheral....it/7643538 .

The next crash is probably due to logic here, which I copied from Kodi's peripherals subsystem. It breaks down when we can't differentiate between joysticks. The problem is, if two identical joysticks are attached and one is detached, how do we know which one?
I have no idea about XInput or DirectInput so I'm just throwing ideas out there but isn't there some kind of unique identifier for each device. You have to have a way to know from which device a button press came from right?
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply


Messages In This Thread
RE: RetroPlayer Test Builds - by garbear - 2013-09-12, 23:32
RE: RetroPlayer Test Builds - by johntravler5 - 2024-04-08, 01:16
RE: RetroPlayer Test Builds - by yallah - 2013-09-13, 00:01
RE: RetroPlayer Test Builds - by Adam7288 - 2013-09-13, 05:56
RE: RetroPlayer Test Builds - by garbear - 2013-09-13, 13:07
RE: RetroPlayer Test Builds - by Adam7288 - 2013-09-13, 14:35
RE: RetroPlayer Test Builds - by edru - 2013-09-13, 21:00
RE: RetroPlayer Test Builds - by garbear - 2013-09-14, 00:38
RE: RetroPlayer Test Builds - by XmemphistoX - 2013-09-13, 06:28
RE: RetroPlayer Test Builds - by charlie0440 - 2013-09-13, 12:33
RE: RetroPlayer Test Builds - by charlie0440 - 2013-09-13, 14:35
RE: RetroPlayer Test Builds - by bry - 2013-09-13, 13:41
RE: RetroPlayer Test Builds - by garbear - 2013-09-13, 13:49
RE: RetroPlayer Test Builds - by garbear - 2013-09-14, 00:07
RE: RetroPlayer Test Builds - by crajohns6965 - 2013-09-14, 00:48
RE: RetroPlayer Test Builds - by garbear - 2013-09-14, 00:57
RE: RetroPlayer Test Builds - by crajohns6965 - 2013-09-14, 01:40
RE: RetroPlayer Test Builds - by edru - 2013-09-14, 02:07
RE: RetroPlayer Test Builds - by garbear - 2013-09-14, 02:55
RE: RetroPlayer Test Builds - by edru - 2013-09-14, 03:23
RE: RetroPlayer Test Builds - by edru - 2013-09-14, 03:48
RE: RetroPlayer Test Builds - by Adam7288 - 2013-09-14, 04:15
RE: RetroPlayer Test Builds - by N3MIS15 - 2013-09-14, 07:37
RE: RetroPlayer Test Builds - by garbear - 2013-10-06, 23:51
RE: RetroPlayer Test Builds - by garbear - 2013-09-14, 07:47
RE: RetroPlayer Test Builds - by N3MIS15 - 2013-09-14, 08:00
RE: RetroPlayer Test Builds - by ghizzu - 2013-09-14, 15:08
RE: RetroPlayer Test Builds - by MovieBird - 2013-09-14, 15:29
RE: RetroPlayer Test Builds - by Duduke - 2013-09-14, 22:40
RE: RetroPlayer Test Builds - by Mettbrot - 2013-09-15, 12:01
RE: RetroPlayer Test Builds - by crajohns6965 - 2013-09-15, 13:32
RE: RetroPlayer Test Builds - by garbear - 2013-09-16, 01:12
RE: RetroPlayer Test Builds - by narvatu - 2013-09-15, 13:38
RE: RetroPlayer Test Builds - by crajohns6965 - 2013-09-15, 13:51
RE: RetroPlayer Test Builds - by doucettom - 2013-09-15, 20:45
RE: RetroPlayer Test Builds - by doucettom - 2013-09-15, 21:18
RE: RetroPlayer Test Builds - by Atarian - 2013-09-15, 22:19
RE: RetroPlayer Test Builds - by Atarian - 2013-09-15, 23:02
RE: RetroPlayer Test Builds - by garbear - 2013-09-16, 00:35
RE: RetroPlayer Test Builds - by ghostelement - 2013-09-16, 00:39
RE: RetroPlayer Test Builds - by teeedubb - 2013-09-16, 01:44
RE: RetroPlayer Test Builds - by teeedubb - 2013-09-16, 02:06
RE: RetroPlayer Test Builds - by doucettom - 2013-09-16, 03:43
RE: RetroPlayer Test Builds - by ilm1 - 2013-10-20, 09:32
RE: RetroPlayer Test Builds - by Adam7288 - 2013-09-16, 05:24
RE: RetroPlayer Test Builds - by doucettom - 2013-09-16, 05:55
RE: RetroPlayer Test Builds - by edru - 2013-09-16, 05:58
RE: RetroPlayer Test Builds - by malte - 2013-09-16, 08:06
RE: RetroPlayer Test Builds - by doucettom - 2013-09-16, 16:39
RE: RetroPlayer Test Builds - by nickswims - 2013-09-16, 16:48
RE: RetroPlayer Test Builds - by Duduke - 2013-09-16, 19:40
RE: RetroPlayer Test Builds - by garbear - 2013-09-16, 23:30
RE: RetroPlayer Test Builds - by teeedubb - 2013-09-17, 00:17
RE: RetroPlayer Test Builds - by doucettom - 2013-09-17, 00:55
RE: RetroPlayer Test Builds - by doucettom - 2013-09-17, 16:12
RE: RetroPlayer Test Builds - by teeedubb - 2013-09-17, 01:13
RE: RetroPlayer Test Builds - by Tomkun - 2013-09-17, 06:57
RE: RetroPlayer Test Builds - by garbear - 2013-09-17, 08:10
RE: RetroPlayer Test Builds - by teeedubb - 2013-09-17, 10:46
RE: RetroPlayer Test Builds - by Mettbrot - 2013-09-17, 18:40
RE: RetroPlayer Test Builds - by lrusak - 2013-09-18, 07:23
RE: RetroPlayer Test Builds - by garbear - 2013-09-18, 07:25
RE: RetroPlayer Test Builds - by thorin33 - 2013-09-18, 10:40
RE: RetroPlayer Test Builds - by apollo1111 - 2013-09-20, 15:52
RE: RetroPlayer Test Builds - by apollo1111 - 2013-09-20, 16:04
RE: RetroPlayer Test Builds - by garbear - 2013-09-20, 20:38
RE: RetroPlayer Test Builds - by Adam7288 - 2013-09-20, 21:53
RE: RetroPlayer Test Builds - by Subwire - 2013-09-21, 20:13
RE: RetroPlayer Test Builds - by Subwire - 2013-09-21, 21:11
RE: RetroPlayer Test Builds - by Subwire - 2013-09-22, 07:52
RE: RetroPlayer Test Builds - by doucettom - 2013-09-21, 20:43
RE: RetroPlayer Test Builds - by doucettom - 2013-09-21, 21:35
RE: RetroPlayer Test Builds - by doucettom - 2013-09-24, 19:52
RE: RetroPlayer Test Builds - by doucettom - 2013-10-01, 16:42
RE: RetroPlayer Test Builds - by garbear - 2013-10-04, 19:40
RE: RetroPlayer Test Builds - by thorin33 - 2013-09-22, 16:47
RE: RetroPlayer Test Builds - by yallah - 2013-09-22, 17:12
RE: RetroPlayer Test Builds - by teeedubb - 2013-09-22, 21:29
RE: RetroPlayer Test Builds - by apollo1111 - 2013-09-22, 23:12
RE: RetroPlayer Test Builds - by Subwire - 2013-09-23, 03:44
RE: RetroPlayer Test Builds - by apollo1111 - 2013-09-23, 17:30
RE: RetroPlayer Test Builds - by johan1982 - 2013-09-23, 21:06
RE: RetroPlayer Test Builds - by Rodimus80 - 2013-09-27, 23:45
RE: RetroPlayer Test Builds - by SloppyCookie - 2013-09-29, 10:53
RE: RetroPlayer Test Builds - by doucettom - 2013-10-03, 15:45
RE: RetroPlayer Test Builds - by garbear - 2013-10-04, 19:41
RE: RetroPlayer Test Builds - by yallah - 2013-10-04, 19:44
RE: RetroPlayer Test Builds - by swetoast - 2013-10-03, 21:32
RE: RetroPlayer Test Builds - by doucettom - 2013-10-04, 20:02
RE: RetroPlayer Test Builds - by Canuma - 2013-10-05, 04:09
RE: RetroPlayer Test Builds - by garbear - 2013-10-05, 04:35
RE: RetroPlayer Test Builds - by Canuma - 2013-10-05, 06:00
RE: RetroPlayer Test Builds - by garbear - 2013-10-05, 21:09
RE: RetroPlayer Test Builds - by topfs2 - 2013-10-07, 08:54
RE: RetroPlayer Test Builds - by ilm1 - 2013-10-20, 20:52
RE: RetroPlayer Test Builds - by n1md4 - 2013-10-16, 14:35
RE: RetroPlayer Test Builds - by n1md4 - 2013-11-26, 14:24
RE: RetroPlayer Test Builds - by n1md4 - 2013-12-22, 03:33
RE: RetroPlayer Test Builds - by garbear - 2013-10-23, 18:20
RE: RetroPlayer Test Builds - by brucem - 2013-11-26, 09:12
RE: RetroPlayer Test Builds - by ilm1 - 2013-10-29, 15:02
RE: RetroPlayer Test Builds - by garbear - 2013-10-29, 17:54
RE: RetroPlayer Test Builds - by ilm1 - 2013-10-29, 21:32
RE: RetroPlayer Test Builds - by n1md4 - 2013-10-31, 15:30
RE: RetroPlayer Test Builds - by Dreded - 2013-11-07, 02:04
RE: RetroPlayer Test Builds - by garbear - 2013-11-07, 21:38
RE: RetroPlayer Test Builds - by bradwatson - 2013-11-08, 00:55
RE: RetroPlayer Test Builds - by irongecko - 2013-11-09, 03:13
RE: RetroPlayer Test Builds - by mrdally204 - 2013-11-12, 15:58
RE: RetroPlayer Test Builds - by zeddymac - 2013-11-17, 01:01
RE: RetroPlayer Test Builds - by garbear - 2013-11-17, 04:18
RE: RetroPlayer Test Builds - by zeddymac - 2013-11-17, 17:23
RE: RetroPlayer Test Builds - by garbear - 2013-11-18, 07:02
RE: RetroPlayer Test Builds - by shardik - 2013-11-20, 16:40
RE: RetroPlayer Test Builds - by prae5 - 2013-11-21, 23:01
RE: RetroPlayer Test Builds - by shardik - 2013-11-22, 17:12
RE: RetroPlayer Test Builds - by garbear - 2013-11-23, 06:39
RE: RetroPlayer Test Builds - by TMonte87 - 2013-11-22, 01:23
RE: RetroPlayer Test Builds - by garbear - 2013-11-22, 06:27
RE: RetroPlayer Test Builds - by TMonte87 - 2013-11-23, 18:08
RE: RetroPlayer Test Builds - by garbear - 2013-11-24, 09:12
RE: RetroPlayer Test Builds - by prae5 - 2013-11-29, 12:01
RE: RetroPlayer Test Builds - by mcarni - 2013-11-29, 20:33
RE: RetroPlayer Test Builds - by Frozin - 2013-11-29, 22:49
RE: RetroPlayer Test Builds - by thorin33 - 2013-12-02, 17:23
RE: RetroPlayer Test Builds - by prae5 - 2013-12-02, 21:16
RE: RetroPlayer Test Builds - by prae5 - 2013-12-03, 01:25
RE: RetroPlayer Test Builds - by thorin33 - 2013-12-03, 15:12
RE: RetroPlayer Test Builds - by yallah - 2013-11-29, 15:10
RE: RetroPlayer Test Builds - by bradwatson - 2013-11-29, 17:05
RE: RetroPlayer Test Builds - by prae5 - 2013-11-29, 17:13
RE: RetroPlayer Test Builds - by brucem - 2013-11-30, 06:03
RE: RetroPlayer Test Builds - by prae5 - 2013-12-02, 14:45
RE: RetroPlayer Test Builds - by Michiel0912 - 2013-12-02, 00:49
RE: RetroPlayer Test Builds - by micoba - 2013-12-02, 21:29
RE: RetroPlayer Test Builds - by prae5 - 2013-12-03, 01:28
RE: RetroPlayer Test Builds - by nikc0069 - 2013-12-03, 14:35
RE: RetroPlayer Test Builds - by prae5 - 2013-12-03, 15:16
RE: RetroPlayer Test Builds - by micoba - 2013-12-03, 22:14
RE: RetroPlayer Test Builds - by edru - 2013-12-18, 21:08
RE: RetroPlayer Test Builds - by garbear - 2013-12-24, 20:47
RE: RetroPlayer Test Builds - by Hedda - 2013-12-28, 13:42
RE: RetroPlayer Test Builds - by alejomejia - 2014-01-13, 16:06
RE: RetroPlayer Test Builds - by garbear - 2014-01-15, 02:42
RE: RetroPlayer Test Builds - by Romans I XVI - 2014-01-17, 19:15
RE: RetroPlayer Test Builds - by xkalibr - 2014-01-20, 04:48
RE: RetroPlayer Test Builds - by dr88dr88 - 2014-01-31, 17:25
RE: RetroPlayer Test Builds - by garbear - 2014-01-31, 19:39
RE: RetroPlayer Test Builds - by mprassel - 2014-02-10, 19:58
RE: RetroPlayer Test Builds - by Westane - 2014-02-10, 20:18
RE: RetroPlayer Test Builds - by garbear - 2014-02-11, 03:01
RE: RetroPlayer Test Builds - by Mettbrot - 2014-02-11, 14:03
RE: RetroPlayer Test Builds - by garbear - 2014-02-11, 17:57
RE: RetroPlayer Test Builds - by garbear - 2014-02-11, 19:28
RE: RetroPlayer Test Builds - by ghostelement - 2014-02-12, 01:10
RE: RetroPlayer Test Builds - by garbear - 2014-02-12, 02:16
RE: RetroPlayer Test Builds - by ghostelement - 2014-02-12, 03:21
RE: RetroPlayer Test Builds - by mprassel - 2014-02-12, 12:57
RE: RetroPlayer Test Builds - by Tomkun - 2014-02-12, 13:23
RE: RetroPlayer Test Builds - by garbear - 2014-02-12, 21:23
RE: RetroPlayer Test Builds - by garbear - 2014-02-12, 21:25
RE: RetroPlayer Test Builds - by Tomkun - 2014-02-13, 01:52
RE: RetroPlayer Test Builds - by Etheric - 2014-02-12, 23:25
RE: RetroPlayer Test Builds - by Westane - 2014-02-15, 00:05
RE: RetroPlayer Test Builds - by nakaroto24 - 2014-02-15, 07:15
RE: RetroPlayer Test Builds - by garbear - 2014-02-18, 00:14
RE: RetroPlayer Test Builds - by Etheric - 2014-02-18, 20:17
RE: RetroPlayer Test Builds - by edru - 2014-03-12, 03:34
RE: RetroPlayer Test Builds - by Lurendrejer - 2014-03-01, 17:58
RE: RetroPlayer Test Builds - by SeeThruHead - 2014-03-03, 08:24
RE: RetroPlayer Test Builds - by garbear - 2014-03-12, 06:59
RE: RetroPlayer Test Builds - by encript - 2014-03-12, 16:56
RE: RetroPlayer Test Builds - by yattaah - 2014-03-12, 21:52
RE: RetroPlayer Test Builds - by mattkelly - 2014-03-12, 21:30
RE: RetroPlayer Test Builds - by Mettbrot - 2014-03-12, 23:16
RE: RetroPlayer Test Builds - by Trickname - 2014-03-13, 19:15
RE: RetroPlayer Test Builds - by garbear - 2014-03-14, 03:20
RE: RetroPlayer Test Builds - by drivesoslow - 2014-03-14, 19:09
RE: RetroPlayer Test Builds - by fightnight - 2014-03-19, 15:19
RE: RetroPlayer Test Builds - by moocow1452 - 2014-04-16, 03:29
RE: RetroPlayer Test Builds - by garbear - 2014-04-16, 04:49
RE: RetroPlayer Test Builds - by bradwatson - 2014-04-16, 05:13
RE: RetroPlayer Test Builds - by garbear - 2014-04-16, 05:36
RE: RetroPlayer Test Builds - by da-anda - 2014-04-16, 10:59
Re: RetroPlayer Test Builds - by killahb33 - 2014-04-16, 14:59
RE: RetroPlayer Test Builds - by OmniBlade - 2014-04-17, 13:26
Re: RetroPlayer Test Builds - by brucem - 2014-04-18, 15:37
Re: RetroPlayer Test Builds - by killahb33 - 2014-04-19, 04:22
RE: RetroPlayer Test Builds - by fightnight - 2014-04-21, 12:40
RE: RetroPlayer Test Builds - by BLKMGK - 2014-05-01, 22:23
RE: RetroPlayer Test Builds - by flxfxp - 2014-05-06, 19:13
RE: RetroPlayer Test Builds - by garbear - 2014-05-06, 19:33
RE: RetroPlayer Test Builds - by flxfxp - 2014-05-06, 20:06
RE: RetroPlayer Test Builds - by narvatu - 2014-05-06, 20:31
Re: RetroPlayer Test Builds - by brucem - 2014-05-06, 20:31
RE: RetroPlayer Test Builds - by Trickname - 2014-05-07, 00:39
RE: RetroPlayer Test Builds - by MasterPhW - 2014-05-07, 12:23
RE: RetroPlayer Test Builds - by zag - 2014-05-07, 16:50
RE: RetroPlayer Test Builds - by bry - 2014-05-09, 21:28
RE: RetroPlayer Test Builds - by MasterPhW - 2014-05-10, 11:59
RE: RetroPlayer Test Builds - by moocow1452 - 2014-05-07, 23:37
RE: RetroPlayer Test Builds - by garbear - 2014-05-09, 21:32
RE: RetroPlayer Test Builds - by Atarian - 2014-05-09, 23:37
RE: RetroPlayer Test Builds - by garbear - 2014-05-12, 23:48
Re: RetroPlayer Test Builds - by brucem - 2014-05-13, 11:00
RE: RetroPlayer Test Builds - by OmniBlade - 2014-05-13, 17:26
RE: RetroPlayer Test Builds - by garbear - 2014-05-13, 23:37
RE: RetroPlayer Test Builds - by Astharoth - 2014-05-14, 01:08
RE: RetroPlayer Test Builds - by garbear - 2014-05-14, 03:43
RE: RetroPlayer Test Builds - by Astharoth - 2014-05-14, 15:03
RE: RetroPlayer Test Builds - by garbear - 2014-05-15, 10:45
RE: RetroPlayer Test Builds - by dyslecix - 2014-05-15, 20:46
RE: RetroPlayer Test Builds - by d3mncln3r - 2014-05-17, 17:20
RE: RetroPlayer Test Builds - by dyslecix - 2014-05-17, 18:32
RE: RetroPlayer Test Builds - by da-anda - 2014-05-14, 15:14
RE: RetroPlayer Test Builds - by OmniBlade - 2014-05-14, 16:56
RE: RetroPlayer Test Builds - by Atarian - 2014-05-14, 17:11
RE: RetroPlayer Test Builds - by dyslecix - 2014-05-14, 21:50
RE: RetroPlayer Test Builds - by garbear - 2014-05-15, 10:44
RE: RetroPlayer Test Builds - by dyslecix - 2014-05-14, 22:47
Re: RetroPlayer Test Builds - by brucem - 2014-05-15, 13:47
RE: RetroPlayer Test Builds - by MasterPhW - 2014-05-15, 15:56
RE: RetroPlayer Test Builds - by OmniBlade - 2014-05-15, 15:57
Re: RE: RetroPlayer Test Builds - by brucem - 2014-05-15, 16:20
RE: RetroPlayer Test Builds - by MXIIA - 2014-05-15, 17:42
RE: RetroPlayer Test Builds - by mcfilmmakers - 2014-05-18, 04:06
Re: RetroPlayer Test Builds - by brucem - 2014-05-15, 17:49
RE: RetroPlayer Test Builds - by dyslecix - 2014-05-17, 21:43
RE: RetroPlayer Test Builds - by Astharoth - 2014-05-18, 00:28
RE: RetroPlayer Test Builds - by dyslecix - 2014-05-18, 04:55
RE: RetroPlayer Test Builds - by Astharoth - 2014-05-18, 17:28
RE: RetroPlayer Test Builds - by dyslecix - 2014-05-18, 23:56
RE: RetroPlayer Test Builds - by moocow1452 - 2014-05-18, 21:24
RE: RetroPlayer Test Builds - by garbear - 2014-05-19, 01:12
RE: RetroPlayer Test Builds - by garbear - 2014-05-19, 11:06
RE: RetroPlayer Test Builds - by moocow1452 - 2014-05-19, 19:53
RE: RetroPlayer Test Builds - by garbear - 2014-05-20, 02:44
RE: RetroPlayer Test Builds - by beemarp - 2014-05-19, 20:58
RE: RetroPlayer Test Builds - by Steel01 - 2014-05-20, 07:38
RE: RetroPlayer Test Builds - by garbear - 2014-05-20, 08:58
RE: RetroPlayer Test Builds - by Steel01 - 2014-05-20, 16:42
RE: RetroPlayer Test Builds - by Kib - 2014-05-22, 19:03
RE: RetroPlayer Test Builds - by Atarian - 2014-05-24, 20:09
RE: RetroPlayer Test Builds - by garbear - 2014-05-24, 21:02
RE: RetroPlayer Test Builds - by Hitcher - 2014-05-26, 12:34
RE: RetroPlayer Test Builds - by OmniBlade - 2014-05-25, 23:56
RE: RetroPlayer Test Builds - by garbear - 2014-05-26, 00:26
RE: RetroPlayer Test Builds - by OmniBlade - 2014-05-26, 12:25
RE: RetroPlayer Test Builds (updated for Isengard) - by Montellese - 2015-07-01, 23:30
Crash on playing MSX games - by Rollingstone - 2015-12-21, 16:35
no "insert coin" - by mcarni - 2018-10-08, 21:03
RE: no "insert coin" - by mcarni - 2018-10-21, 00:23
RE: no "insert coin" - by flipside101 - 2018-10-25, 19:03
RE: no "insert coin" - by mcarni - 2018-10-25, 21:10
RE: no "insert coin" - by flipside101 - 2018-10-26, 18:34
Logout Mark Read Team Forum Stats Members Help
RetroPlayer Test Builds (updated for Nexus)16