RetroPlayer Test Builds (updated for Nexus) - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: Game support (https://forum.kodi.tv/forumdisplay.php?fid=292) +--- Thread: RetroPlayer Test Builds (updated for Nexus) (/showthread.php?tid=173361) Pages:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
|
RE: RetroPlayer Test Builds (updated for Isengard) - Montellese - 2015-07-01 (2015-07-01, 04:06)garbear Wrote:(2015-07-01, 02:43)garbear Wrote:(2015-06-30, 23:23)Montellese Wrote: Would be nice if we could first test this on linux and osx before creating a PR for it.I'm on it Great, I'll PR the changes to your repositories. RE: RetroPlayer Test Builds (updated for Isengard) - Scourge - 2015-07-01 (2015-06-30, 23:17)garbear Wrote: can you post a debug log? Quick FYI: I just tried your latest build on a different Windows machine and I got the same error. Will post logs later today. RE: RetroPlayer Test Builds (updated for Isengard) - zbuzanic - 2015-07-01 (2015-06-30, 21:37)garbear Wrote:(2015-06-27, 14:24)zbuzanic Wrote: 1. When first started I don't see anything under Games. After closing Kodi, and starting again, Files and Game addons will show up. I think this is related to my setup, so ignore this, on other PC it works fine. (2015-06-30, 21:37)garbear Wrote:(2015-06-27, 14:24)zbuzanic Wrote: 2. Setting up Xbox 360 was a pain, as sometimes button will not get accepted (if ESC is pressed will that erase button assignment or assign ESC to button?) Ok, I have some ideas for configuration (2015-06-30, 21:37)garbear Wrote:Silly me...sorry for this.(2015-06-27, 14:24)zbuzanic Wrote: 5. Didn't manage to start any game for now as I don't know if smc files are recognized by nestopia. I did add path but not sure how to proceed next. RE: RetroPlayer Test Builds (updated for Isengard) - Montellese - 2015-07-01 (2015-06-30, 21:36)garbear Wrote:(2015-06-30, 21:01)Montellese Wrote: I also tried to get my NES30 controller to work but didn't see any recognized input. 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. EDIT: OK I think I found the issue. At https://github.com/kodi-game/peripheral.joystick/blob/master/src/api/directinput/JoystickInterfaceDirectInput.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.joystick/blob/master/src/api/JoystickInterfaceCallback.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. EDIT2: Looks like a deadlock between the main thread in CPeripheralBusAddon::GetPeripheralsWithFeature() and the thread responsible for scanning for new devices which is stuck at CPeripheralBusAddon::UnregisterRemovedDevices() callin CPeripherals::OnDeviceDeleted(). EDIT3: And the reason why the controllers that are constantly detected never match the ones that have previously been detected is because the call to CJoystickDirectInput::Initialize() which is performed later changes the button, hat and axis count but the comparison is done between an uninitialized and an initialized CJoystickDirectInput object which will most likely always fail. RE: RetroPlayer Test Builds (updated for Isengard) - garbear - 2015-07-01 (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: 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. (2015-07-01, 21:13)Montellese Wrote: EDIT: OK I think I found the issue. At https://github.com/kodi-game/peripheral.joystick/blob/master/src/api/directinput/JoystickInterfaceDirectInput.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.joystick/blob/master/src/api/JoystickInterfaceCallback.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. I pushed a fix for this: https://github.com/kodi-game/peripheral.joystick/commit/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? RE: RetroPlayer Test Builds (updated for Isengard) - garbear - 2015-07-01 (2015-07-01, 21:13)Montellese Wrote: EDIT2: Looks like a deadlock between the main thread in CPeripheralBusAddon::GetPeripheralsWithFeature() and the thread responsible for scanning for new devices which is stuck at CPeripheralBusAddon::UnregisterRemovedDevices() callin CPeripherals::OnDeviceDeleted(). I fixed a different deadlock in CPeripheralBusAddon yesterday: https://github.com/garbear/xbmc/commit/71f1a9b . Looks like it wasn't the only one (2015-07-01, 21:13)Montellese Wrote: EDIT3: And the reason why the controllers that are constantly detected never match the ones that have previously been detected is because the call to CJoystickDirectInput::Initialize() which is performed later changes the button, hat and axis count but the comparison is done between an uninitialized and an initialized CJoystickDirectInput object which will most likely always fail. I had this same problem in Cocoa: https://github.com/kodi-game/peripheral.joystick/commit/22223d3 . I'll see if I can duplicate the fix RE: RetroPlayer Test Builds (updated for Isengard) - Montellese - 2015-07-01 (2015-07-01, 23:00)garbear Wrote: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, 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: (2015-07-01, 23:00)garbear Wrote: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?(2015-07-01, 21:13)Montellese Wrote: EDIT: OK I think I found the issue. At https://github.com/kodi-game/peripheral.joystick/blob/master/src/api/directinput/JoystickInterfaceDirectInput.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.joystick/blob/master/src/api/JoystickInterfaceCallback.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. RE: RetroPlayer Test Builds (updated for Isengard) - Montellese - 2015-07-01 After a quick look at the XInput and DirectInput documentation maybe something like this would work: https://github.com/kodi-game/peripheral.joystick/compare/master...Montellese:joystick_comparison For CJoystickDirectInput it remembers the device's GUID which is always the same. And for CJoystickXInput it already knows the controller ID / index. And then we provide customized implementations of CJoystick::Equals() and there are no more problems because the equality check relies on values that are not modified by any class method. RE: RetroPlayer Test Builds (updated for Isengard) - garbear - 2015-07-02 nice. I haven't looked at the DInput documentation, I think this code was copied from Kodi's existing joystick code. I'll take a deeper look, because it'd be nice to record PID and VID for our buttonmap database check back tmrw morning, i'll see if I can get DInput joysticks working tonight RE: RetroPlayer Test Builds (updated for Isengard) - garbear - 2015-07-02 (2015-07-01, 09:17)Scourge Wrote:(2015-06-30, 23:17)garbear Wrote: can you post a debug log? I checked this out, and the peripheral add-on isn't exporting the function symbol. I'll try forcing a rebuild of libKODI_game EDIT: new build is up for windows RE: RetroPlayer Test Builds (updated for Isengard) - Montellese - 2015-07-02 (2015-07-02, 00:07)garbear Wrote: nice. I haven't looked at the DInput documentation, I think this code was copied from Kodi's existing joystick code. I'll take a deeper look, because it'd be nice to record PID and VID for our buttonmap database IDirectInputDevice8::GetProperty with DIPROP_VIDPID (see https://msdn.microsoft.com/en-us/library/windows/desktop/microsoft.directx_sdk.idirectinputdevice8.idirectinputdevice8.getproperty(v=vs.85).aspx) should provide the vendor and product IDs. RE: RetroPlayer Test Builds (updated for Isengard) - Scourge - 2015-07-02 (2015-07-02, 05:06)garbear Wrote:(2015-07-01, 09:17)Scourge Wrote:(2015-06-30, 23:17)garbear Wrote: can you post a debug log? Thanks. I just installed this build over the last one, but I still get the error message. I'll dive into this tonight (am at work atm). RE: RetroPlayer Test Builds (updated for Isengard) - bugherbert - 2015-07-02 Hi, the last two pre-releases 2af73de and 475ec37 show an error message on my computer. MSVCP120D.dll is missing. a520121 was not showing this message. from what i googled so far the last two releases where maybe build in debug mode. System:Windows 7 64Bit Rgds RE: RetroPlayer Test Builds (updated for Isengard) - garbear - 2015-07-02 (2015-07-02, 15:28)bugherbert Wrote: Hi, something must be linking to MSVCP120D.dll. I'll try cleaning and building on a few other windows boxes, i've found that this sometimes fixes things RE: RetroPlayer Test Builds (updated for Isengard) - CrispyXUK - 2015-07-02 I've noticed my Harmony remote no longer functions under OS X on a Mac mini, still works fine with Plex Home Theatre. I also have trouble starting Kodi with gamepads connected so sometimes have to disconnect them. Kodi also crashes on quit every time. Don't suppose there are any other cores to test anytime soon are there? |