PDA

View Full Version : My DirectInput Engine



Useless Hacker
13-11-2002, 09:11 PM
I have uploaded the source for my AlphaInput(tm) Engine. This is a wrapper for DirectInput8, using the JEDI headers. You can download it here (http://www.mike-trim.co.uk/stuff/AlphaInput.zip). I have only tested it in Delphi 7 Personal, so I would be interested to know whether it works with other versions. It uses the JEDI headers, but I have modified mine slightly, so if you have any problems, let me know.

Alimonster
13-11-2002, 10:24 PM
A few compatibility tips:

Remove 'variants' from the uses clause, which was introduced in Delphi 5+. You probably aren't using variants here and it only gets in Delphi 4's way. Also, right click each of your forms and deselect "text DFM". This stops an "invalid stream format" problem when you try to view the form with Delphi 4. There's a function GuidToString - this is declared in ComObj for most versions of Delphi, I believe. Delphi 4 barfed at this, so maybe adding that unit would sort out that problem (or just rip it from the VCL source :)). If you make those changes then it would probably work under Delphi 4 (though I don't have DelphiX sitting around, so I can't test out that theory yet).

It loaded fine under Delphi 5 and 6. I remember testing it a week or two ago when you posted it in Your Projects, so I know it works :mrgreen:

Cool work, man.

Useless Hacker
14-11-2002, 01:55 PM
Thanks for the tips, Alimonster. :)

I don't know why variants was included, since I am definately not using them. I'm not really that bothered about whether the demo program works, just the 'AplhaInput.pas' thing. DelphiX is only required because I used the TDXTimer component; you could use a different timer component if you wanted.