Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
eonarheim committed Jan 1, 2025
1 parent e3d6c92 commit a167f8d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/engine/Director/Loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,9 @@ export class Loader extends DefaultLoader {
this._playButton.addEventListener('click', startButtonHandler);
this._playButton.addEventListener('touchend', startButtonHandler);
this._playButton.addEventListener('pointerup', startButtonHandler);
this.engine.input.gamepads.once('button', () => startButtonHandler(new Event('button')));
if (this.engine) {
this.engine.input.gamepads.once('button', () => startButtonHandler(new Event('button')));
}
});

return await playButtonClicked;
Expand Down

0 comments on commit a167f8d

Please sign in to comment.