araghon007 / X1nput

Xinput hook for Impulse Trigger emulation
MIT License
344 stars 37 forks source link

Odd behavior in Release configuration vs Debug configuration #4

Closed araghon007 closed 5 years ago

araghon007 commented 5 years ago

So it turns out I was wrong about DOOM support. The DLL I tested it with was actually the Debug DLL, Release DLL seems to cause the game to crash. I have no idea how to debug games on Steam, so if someone could help me figure out what's causing this mismatch, I would really appreciate it.

CookiePLMonster commented 5 years ago

You create a steam_appid.txt file with game's appid in there and put it in the game directory. Then, as long as Steam is running, you can just spawn majority of the games via a debugger without issues and they will not relaunch from Steam.

That's almost definitely what you need for your problem - just configure X1nput's project debugger to launch DOOM and debug this way.

araghon007 commented 5 years ago

Oh, Thanks a lot. I'm still not able to start DOOM this way (I'm getting Application load error), but I was able to run HITMAN 2, which should be good enough.

CookiePLMonster commented 5 years ago

Application load error sounds like they either didn't integrate SteamAPI properly (doubtful) or that you placed a wrong appid in steam_appid.txt.

I don't have the game to test, sadly.

CookiePLMonster commented 5 years ago

Also, minor issue which I don't feel like opening a spearate issue for:

This won't work: https://github.com/araghon007/X1nput/blob/configurable/X1nput/dllmain.cpp#L76 You probably want to use _tcsicmp here to compare against "true", case insensitively.

What you did here is a pointer comparison, which in your case will never ever return true.

araghon007 commented 5 years ago

Yeah, I'm not sure why I thought it worked, but I'm working on a pretty big update now. Should be released in less than an hour.

araghon007 commented 5 years ago

Well, so far the only games I found that crash when the controller is unplugged are the ones I can't get to debug. Btw, this is the error I'm getting (So far happened with DOOM and Rocket League) RocketLeague_2019-03-19_18-19-18

araghon007 commented 5 years ago

Found out using attaching visual studio debugger to a process works fine.