pboy0922/x360ce

COM Hooking broken in latest source

Closed this issue · 19 comments

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:

Add Timeout = 60 to gdb or ini (in ini under InputHook).

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

Or HookNoTimeout :P?

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

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

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

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

commented out and  compiled, no luck.

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

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

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

ie. commenting out StartTimeoutThread fixes this ?

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

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

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

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

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

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

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

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

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

Bleh, passing full VARIANT *pVal fixes problem, dunno why.

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

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

  • Changed state: Verified