	Win32 Mouse Coordinates to Direct Input Hook
---------------------------------------------------------
Why use direct input instead of windows api coordinates?
---------------------------------------------------------

Direct Input has got the following advantages compared to windows api coordinates:

- No pointer ballistics (impossible cause of acceleration)
- It's designed to work on high resolution mice (win coordinates aren't)
- Faster (in theory)
- Different and mostly smoother feeling
- Because of the above reasons it mostly helps against negative acceleration

---------------------------------------------------------
How does it work?
---------------------------------------------------------

The package contains 2 files. One that does that replaces (manipulates) the windows coordinates and one that loads the manipulation in another process.
In other words we need to manipulate another process (probably a game). For that you need a DLL to run in the address space of the process.
In order to load that dll into the (remote) process, you need a loader.
Loader:		DInput.exe
Manipulator:	DInput.dll

---------------------------------------------------------
Getting started.
---------------------------------------------------------

The location of these files DOESN'T matter, as long as they got the same name and are in the same folder.
For example lets say the path to those two files is c:\dinput.

As this tool supports multiple games and profiles you need to load the default profiles first:
Start -> run -> c:\dinput\DInput.exe -d


Check the bottom of the document to see the list of default supported games.

In order to change the profiles:
Start -> run -> c:\dinput\DInput.exe -c

In order to start a profile:
Start -> run -> c:\dinput\DInput.exe et

In this case et is the profile name.
After starting a profile the file waits with loading the dll untill the process of the game is found.

---------------------------------------------------------
How to change settings?
---------------------------------------------------------

The loader (DInput.exe) requires parameters.
Direct Input needs the window title and of course the process name of the game. For this I've made profiles (different profiles for different games).
You can also enable device buffering (I don't notice any difference myself) which is an option of Direct Input.

The settings will be stored in an INI file (located in your application data folder).
In order to edit the settings start DInput.exe with the "-c" parameter.
If you need some help with the settings and want to know what they mean start DInput.exe with the "-?" parameter.

Basicly it's easy to test if it works by changing the "Verbose" setting to true. After playing the game go to start -> run -> %AppData%\DInput -> check the verbose.log contents

---------------------------------------------------------
Default profiles.
---------------------------------------------------------

I included default profiles for the following games:

- Wolfenstein Enemy Territory (profilename: et)
- Return to Castle Wolfenstein (profilename: rtcw)
- Counterstrike Source (profilename: css)		*
- Quake 4 (profilename: q4)				*
- Quake 3 (profilename: q3)
- Quake 2 (profilename: q2)				*
- Call of Duty (profilename: cod)			*
- Call of Duty II (profilename: cod2)			*
- Call of Duty IV (profilename: cod4)			
- Enemy Territory Quake Wars (profilename: etqw)	*


* Those games are untested but should be working if they use win32 mouse coordinates. If it doesn't work just add your own profile (instructions are up).

---------------------------------------------------------
Possible problems.
---------------------------------------------------------

Error: Couldn't set thread affinity.
Resolution: The thread tries to set the affinity to all cores of your processor/processors. If the process affinity isn't set to all cores the affinity can't be set. Just make sure the process has got the affinity set to all cores.

---------------------------------------------------------
Credits.
---------------------------------------------------------

- Lightning: for the icon and newspost on idcation.com
- elektrooo: for the hosting and testing.
- h8m3: for testing.
- bl1nd: for testing.
- renenl/rvh: for testing.
- perfo: for testing.
- anir/aion: for developping mf_init/mforce (giving me the idea to develop my own dinput tool in c++ with more settings) and the nice conversations.
- chaplja: for telling me about microsoft detours.

----------------------------------------------------------
Written in C++ by abort (c) 2008