From dc4d93d00653e7d129cf642e5277e05900192158 Mon Sep 17 00:00:00 2001 From: Daryl Borth Date: Tue, 1 Jan 2019 14:33:54 -0700 Subject: [PATCH] fix controllers with no analog sticks --- source/gui/gui_trigger.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/gui/gui_trigger.cpp b/source/gui/gui_trigger.cpp index 0d20890..e918178 100644 --- a/source/gui/gui_trigger.cpp +++ b/source/gui/gui_trigger.cpp @@ -133,6 +133,10 @@ s8 GuiTrigger::WPAD_Stick(u8 stick, int axis) center = js->center.x; } + if(min == max) { + return 0; + } + if (pos > max) return 127; if (pos < min) return -128;