From 408b1899663e87a8a1405397042412613e900da5 Mon Sep 17 00:00:00 2001 From: Greenlamp Date: Sun, 5 May 2024 17:40:08 +0200 Subject: [PATCH] 1st attempt with a fix for black screen --- src/inputs-controller.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/inputs-controller.ts b/src/inputs-controller.ts index aaf79854c..3d09b768c 100644 --- a/src/inputs-controller.ts +++ b/src/inputs-controller.ts @@ -110,6 +110,7 @@ export class InputsController { getActionGamepadMapping(): ActionGamepadMapping { const gamepadMapping = {}; + if (!this.player?.mapping) return gamepadMapping; gamepadMapping[this.player.mapping.LC_N] = Button.UP; gamepadMapping[this.player.mapping.LC_S] = Button.DOWN; gamepadMapping[this.player.mapping.LC_W] = Button.LEFT;