XInput Without Multiple EXEs

Started by
6 comments, last by blaze02 16 years, 10 months ago
Currently we have 2 EXEs for our app. One EXE is compiled with the Dec. 2004 DirectX SDK. The other with the most recent SDK. The first EXE allows anybody that has WinXP: SP2 to run the app, but it cannot use XInput. Option #1 Is there any way to accomplish this with a single EXE? If the user has a recent DirectX runtime, the app loads the XInput library and detects Xbox360 controller input. Else, the app skips the Xbox360 input code. Option #2 If that doesn't work out, we are probably going to have a front-end GUI that detects the DirectX version and runs the appropriate EXE. Option #3 Another plan is to cut XInput and detect 360 controller input as if it were a normal joystick. I'm guessing that would not allow us to vibrate the controller, which may be a deal-breaker. Option #4 And the other plan (the reason nobody else runs into this problem): we can force the user to download the newest DirectX runtime. This would solve a lot of problems, but it may not be acceptable to make the end-user do more downloading and installing. Help, suggestions, and small amounts of flaming are welcome.
-------Harmotion - Free 1v1 top-down shooter!Double Jump StudiosBlog
Advertisement
I'd pick option 3 or 4 any day. Making PC games stable under a wide range of hardware is enough of a pain in the ass without supporting multiple input libraries like this.

IIRC, you CAN do vibration without XInput. It just sucks a little more.
Definitely option #4 because it doesn't chop features and is the standard way. You don't have to have the whole DX runtime in your download, you can make a very small version with only the components you need (such as XInput).
I'd suggest a variant on option 2: have a setting in a (text-based) config file to choose which exe to load.
Quote:Original post by Saruman
...you can make a very small version with only the components you need (such as XInput).

I don't think they let you do that.


If we were to force users to have a recent DirectX runtime, our download size would only increase 44k for the web installer. Then, if necessary, the rest of DirectX would get downloaded when installing our app.

Not too sure about the force update. It's really nice to be able to run the app on any computer with XP. Decisions, decisions...

Thanks for the comments.
-------Harmotion - Free 1v1 top-down shooter!Double Jump StudiosBlog
Quote:Original post by blaze02
Quote:Original post by Saruman
...you can make a very small version with only the components you need (such as XInput).

I don't think they let you do that.

DirectSetup allows you to pick files to install down to the single file. That means that you can make a DirectSetup installer that will only install the D3DXDLL (which is around 2mb, IIRC), and say, XInput. You can have your installer attempt to install these two files to the user's machine. If it fails, it means the user doesn't have DX9c at all, and you can run the webinstaller to get it installed.
If it succeeds, the user should have everything he needs to run your app.

The nice part about this is that 99% of the users will have DX9c but not have the most recent D3DX DLL. This will install it for them without connecting to the web (or requiring any interaction from them, since you can use a silent install) and only if it fails, will they be notified and need to go through the webinstaller.

This sounds like the best solution to this, IMO.
Sirob Yes.» - status: Work-O-Rama.
Quote:Original post by blaze02I don't think they let you do that.


They allow to do that: http://msdn2.microsoft.com/en-us/library/bb219742.aspx#ID0EHAA
Cool, thanks.
-------Harmotion - Free 1v1 top-down shooter!Double Jump StudiosBlog

This topic is closed to new replies.

Advertisement