GivePass / x360ce

Automatically exported from code.google.com/p/x360ce
1 stars 0 forks source link

COM Hooking broken in latest source #1055

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Titles Affected:

Dark Souls - Dinput instance takes precedence
DMC:Devil May Cry - Enumerates as both controls
HawX: Doesn't see the gamepad at all.

Seems to be occuring in much the same manner as it was previously, where 
commenting out part of the timeout would make it work again.

Original issue reported on code.google.com by danialho...@gmail.com on 5 Dec 2014 at 2:19

Attachments:

GoogleCodeExporter commented 9 years ago
Add Timeout = 60 to gdb or ini (in ini under InputHook).

Original comment by tapcio on 5 Dec 2014 at 11:35

GoogleCodeExporter commented 9 years ago
Or HookNoTimeout :P?

Original comment by tapcio on 5 Dec 2014 at 11:48

GoogleCodeExporter commented 9 years ago
PS: Give a link to source lines you commented out (click on line number in code 
in trunk).

Original comment by tapcio on 5 Dec 2014 at 11:56

GoogleCodeExporter commented 9 years ago
HookNoTimeout doesn't seem to do anything, still times out after 30s according 
to log.

setting to 0 turns off the timeout  it seems,

but increasing the timeout isn't helping either, far as i can see the hook is 
ok, the pad string gets rewritten but only DI pad ends up working in the game.

Original comment by danialho...@gmail.com on 5 Dec 2014 at 12:02

GoogleCodeExporter commented 9 years ago
Can you comment new HookCOM stuff and test? 
https://code.google.com/p/x360ce/source/browse/trunk/x360ce/InputHook/HookCOM.cp
p#354

CoCreateInstanceEx and CoGetClassObject

Original comment by tapcio on 5 Dec 2014 at 12:11

GoogleCodeExporter commented 9 years ago
commented out and  compiled, no luck.

Original comment by danialho...@gmail.com on 5 Dec 2014 at 12:29

GoogleCodeExporter commented 9 years ago
I should mention too,  HookVIDPID is not shown in the log when in use.

0xE = HookCOM + HookDI + HookVIDPID

Original comment by danialho...@gmail.com on 5 Dec 2014 at 12:32

GoogleCodeExporter commented 9 years ago
Because I'm stupid ;> 
https://code.google.com/p/x360ce/source/browse/trunk/x360ce/InputHook/InputHook.
cpp#210

Original comment by tapcio on 5 Dec 2014 at 12:47

GoogleCodeExporter commented 9 years ago
ie. commenting out StartTimeoutThread fixes this ?

Original comment by tapcio on 5 Dec 2014 at 12:50

GoogleCodeExporter commented 9 years ago
lol xD, well thats an easy fix then :P

i'll check commenting out that.

Original comment by danialho...@gmail.com on 5 Dec 2014 at 1:36

GoogleCodeExporter commented 9 years ago
found a bug in settings handling.

Ini/GDB in programdata overrides ini/gdb in local game folder.

Original comment by danialho...@gmail.com on 5 Dec 2014 at 1:41

GoogleCodeExporter commented 9 years ago
Nope, didn't fix it.

Btw, i never meant that it is the timeout code, just that it is behaving like 
it was before  you fixed the timeout code.

Original comment by danialho...@gmail.com on 5 Dec 2014 at 1:50

GoogleCodeExporter commented 9 years ago
Ah!, i knew i wasn't seeing something in the logs

This is from the vs2013 r1045 you put on mega.
01:03:48.956    00059916    [PAD1] Creating device
01:03:48.958    00059916    [PAD1] Device created
01:03:48.992    00059916    [PAD1] Detected axis count: 6
01:03:48.993    00059916    [PAD1] Done

r1045 works!

All of the logs posted above do not have a PAD being created!!

Original comment by danialho...@gmail.com on 5 Dec 2014 at 2:07

GoogleCodeExporter commented 9 years ago
Sorry, im wrong, only HawX has no pad created in the logs above...

so now i got no idea ^.^

Original comment by danialho...@gmail.com on 5 Dec 2014 at 2:17

GoogleCodeExporter commented 9 years ago
I found a bug in MinHook (memory leak): 
https://github.com/TsudaKageyu/minhook/issues/8

Original comment by tapcio on 5 Dec 2014 at 3:50

GoogleCodeExporter commented 9 years ago
But this may not be related to our problems.
PS: https://vld.codeplex.com is really useful.

Original comment by tapcio on 5 Dec 2014 at 3:52

GoogleCodeExporter commented 9 years ago
Bleh, found it... DeviceStringChange is messing something, but dunno why, 
copy-pasted code works well...

Original comment by tapcio on 5 Dec 2014 at 8:31

GoogleCodeExporter commented 9 years ago
Bleh, passing full VARIANT *pVal fixes problem, dunno why.

Original comment by tapcio on 5 Dec 2014 at 8:37

GoogleCodeExporter commented 9 years ago

Original comment by danialho...@gmail.com on 16 Dec 2014 at 2:41