Jump to content


Submitter

File Information

  • Submitted: Oct 31 2016 03:31 PM
  • Last Updated: Oct 31 2016 03:39 PM
  • File Size: 124.06KB
  • Views: 380
  • Downloads: 1009
  • Approved by: Garrett
  • Approved on: 31 October 2016 - 11:57 PM

Previous Versions

  • 31 Oct 2016 Download DirectInput FPS Fix 0.2

Download DirectInput FPS Fix 0.2

- - - - -
FPS Fix Logitech FEAR Condemned DirectInput



What is this?



The 'DirectInputFpsFix' fixes a bug that causes the FPS to severely drop after
a few minutes of play. This problem is probably most widely known in regards to
the game FEAR and often occurs in conjunction with the usage of Logitech
devices.

However, the problem also pops up in other games using the same engine, such as
the FEAR expansions or Condemned: Criminal Origins and with non-Logitech
hardware configurations. A similar problem has also been reported to occur in
other games, such as Prototype.

Although this problem can often be fixed by disabling most/all HID-Devices in
the device manager, it is bothersome to do so and lately some people reported
that that solution doesn't even work at all anymore, especially on machines
running Windows 10.

Instructions

  • Download the 'DirectInputFpsFix' zip-file
  • Extract the file 'dinput8.dll' to the folder containing the executable of the game.
    For Steam in most cases this is 'Steam\steamapps\common'.
    For example: 'D:\Games\Steam\steamapps\common\FEAR Ultimate Shooter Edition'
  • Start the game like you would normally, e.g. through Steam or GOG-Galaxy.

Note: This fix makes no permanent changes to the system or the installation of
the game. To uninstall the fix just remove or rename the 'dinput8.dll' file.

Supported Games



This is a list of games for which the DLL has either been confirmed to fix the
problem or might fix the problem. Feel free to provide feedback if the DLL works
on other games as well.

The fix is agnostic towards the game that uses it and should therefore work
with all versions of a supported game, including teh Steam, GOG and retail
versions.

Confirmed:
  • FEAR and its expansions
  • Condemned: Criminal Origins
Speculated:
  • Prototype

What you should know



Since this fix consists of an executable DLL-File, I could have put any harmful
shenanigans in there. You just have to trust me that the file is clean.

If you don't -- and why should you -- feel free to use a meta online virus
scanner like VirusTotal to verify the file. Be aware however, that the file
could trigger anti-virus software without being harmful.

How this works



The fix is implemented using a common technique known as 'DLL hooking'.

User input in games like FEAR can be realized via DirectInput, an API by
Microsoft for interacting with HID-Devices. The library is ancient and should no
longer be used today, because there are other ways to get mouse and keyboard
input, especially for games.

The fps drops happen because the thread that runs DirectInput massively slows
down after a while (as can be seen in tools like 'ProcessExplorer').

If an application uses a library like DirectInput, it needs a so-called DLL
(dynamic-link library) where the functionality of the library is stored. In many
cases, especially for libraries provided by Microsoft, these DLLs usually reside
in the Windows folder.

However, there is an order of how an application searches for the DLLs it needs.
Since the DLL of the fix gets copied into the main folder of the application and
has the same name of a DLL needed by the game (the one of DirectInput), it gets
loaded instead of the one in the windows folder.

This means that all calls to DirectInput go through the Hook-DLL and can either
be directed to the original DLL in the Windows folder or changed as necessary.
This also allows some insight in how exactly the library is used by the game.

It turned out that some games not only unnecessarily register all HID-devices,
they also call several functions every frame that usually only should be called
once during initialization. The latter seems to apply only to devices that are
not keyboards or mice. This eventually leads to circumstances where a lot of
time is spent opening and closing device connections.

The fix changes the DirectInput initialization in such a way that only keyboard
and pointer devices get registered.

Reported problems



Up to this point I have no reports that the fix doesn't work for anyone.
However, since PCs offer a wide variety of hard- and software configurations, I
cannot say for sure that there will not be some unexpected problems.

However, in theory the problem should be fixable with the approach I used,
regardless of whether the current implementation works flawlessly or not.

If you have any problems don't hesitate to provide feedback.

I really love these games and I think they deserve to be preserved.

Version History



Release 0.2:
  • Statically linked the Microsoft Visual C Runtime so that users no longer have to install the corresponding Visual C Redistributable package.
Release 0.1:
  • Initial release

What's New in Version 0.2 (See full changelog)

  • Statically linked the Microsoft Visual C++ Runtime so that users no longer have to install the, corresponding Visual C++ Redistributable package.




Other files you may be interested in ..





71 user(s) are online (in the past 60 minutes)

0 members, 68 guests, 0 anonymous users


Google (1), Bing (2)