From 17e3751f45db324456f881594fa9503c2a2fab71 Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Thu, 25 Jul 2013 23:58:19 +0200 Subject: [PATCH] Really avoid crash if no xinput dll --- Windows/XinputDevice.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Windows/XinputDevice.cpp b/Windows/XinputDevice.cpp index 294c12ee7d..2bf772da31 100644 --- a/Windows/XinputDevice.cpp +++ b/Windows/XinputDevice.cpp @@ -115,6 +115,9 @@ struct Stick { static Stick NormalizedDeadzoneFilter(short x, short y); int XinputDevice::UpdateState(InputState &input_state) { + if (!s_pXInputDLL) + return 0; + if (this->check_delay-- > 0) return -1; XINPUT_STATE state; ZeroMemory( &state, sizeof(XINPUT_STATE) );