[Ohrrpgce] SVN: teeemcee/8119 gfx_directx: Fix bug 2006: slowdown after losing focus while a joystick

subversion at HamsterRepublic.com subversion at HamsterRepublic.com
Fri Aug 26 12:51:02 PDT 2016


teeemcee
2016-08-26 12:51:01 -0700 (Fri, 26 Aug 2016)
548
gfx_directx: Fix bug 2006: slowdown after losing focus while a joystick is plugged in

The slowdown was due to calling refreshEnumeration() every tick after a
device is lost (because we asked for access only while foregrounded), which
is slow as it scans attached hardware.

To prevent the scanning it was sufficient to handle DIERR_INPUTLOST by calling
Acquire() instead of refreshEnumeration(), but I also added handling for
some other errors I saw, and just dropping the device in case of misc Acquire
errors rather than spamming error messages.
---
U   wip/gfx_directx/joystick.cpp
U   wip/gfx_directx/release.txt
U   wip/gfx_directx/version.h
U   wip/gfx_directx.dll
U   wip/whatsnew.txt


More information about the Ohrrpgce mailing list