Skip to content

Commit

Permalink
Fix crash bug when controller decons during test
Browse files Browse the repository at this point in the history
  • Loading branch information
h3rb authored Jan 29, 2023
1 parent df0931b commit 86ef182
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scripts/ICUI/ICUI.gml
Original file line number Diff line number Diff line change
Expand Up @@ -3088,6 +3088,13 @@ function ICUI_Draw_gamepad_test() {
var settings_index=player.settings;
var settings=settings_index == none ? none : __INPUTCANDY.settings[settings_index];

// Someone ripped out the controller?
if ( player.device > array_length(__INPUTCANDY.devices)-1 ) { // go back
__INPUTCANDY.ui.gamepad_test.mode=false;
__INPUTCANDY.ui.gamepad_test.exitting=false;
__INPUTCANDY.ui.device_select.mode=true;
}

var device=player.device==none?none:__INPUTCANDY.devices[player.device];

// How many input detected elements to display per line
Expand Down

0 comments on commit 86ef182

Please sign in to comment.