From c1bbda273b0b31a8448108d28eac8085f5461c3e Mon Sep 17 00:00:00 2001 From: InfiniteBlueGX <105176909+InfiniteBlueGX@users.noreply.github.com> Date: Tue, 25 Oct 2022 21:07:46 -0500 Subject: [PATCH] Fix default game selection menu "jump" upon startup w/classic controller (#1035) * Fix default game selection menu "jump" upon startup w/classic controller * remove an unused comment --- 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 8d138c9..ff20557 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; + } + // some 3rd party controllers return invalid analog sticks calibration data if ((min >= center) || (max <= center)) { // force default calibration settings