diff --git a/src/App/App.js b/src/App/App.js
index 7a1383dc4..04ca718ba 100644
--- a/src/App/App.js
+++ b/src/App/App.js
@@ -4,7 +4,7 @@ require('spatial-navigation-polyfill');
const React = require('react');
const { useTranslation } = require('react-i18next');
const { Router } = require('stremio-router');
-const { Core, Shell, Chromecast, DragAndDrop, KeyboardShortcuts, ServicesProvider } = require('stremio/services');
+const { Core, Shell, Chromecast, DragAndDrop, KeyboardShortcuts, ServicesProvider, GamepadProvider } = require('stremio/services');
const { NotFound } = require('stremio/routes');
const { FileDropProvider, PlatformProvider, ToastProvider, TooltipProvider, ShortcutsProvider, CONSTANTS, withCoreSuspender, useShell, useBinaryState } = require('stremio/common');
const ServicesToaster = require('./ServicesToaster');
@@ -22,6 +22,7 @@ const RouterWithProtectedRoutes = withCoreSuspender(withProtectedRoutes(Router))
const App = () => {
const { i18n } = useTranslation();
const shell = useShell();
+ const [gamepadSupportEnabled, setGamepadSupportEnabled] = React.useState(false);
const onPathNotMatch = React.useCallback(() => {
return NotFound;
}, []);
@@ -141,6 +142,10 @@ const App = () => {
i18n.changeLanguage(args.settings.interfaceLanguage);
}
+ if (args?.settings?.gamepadSupport !== undefined) {
+ setGamepadSupportEnabled(args.settings.gamepadSupport);
+ }
+
if (args?.settings?.quitOnClose && shell.windowClosed) {
shell.send('quit');
}
@@ -154,6 +159,10 @@ const App = () => {
i18n.changeLanguage(state.profile.settings.interfaceLanguage);
}
+ if (typeof state.profile.settings.gamepadSupport === 'boolean') {
+ setGamepadSupportEnabled(state.profile.settings.gamepadSupport);
+ }
+
if (state?.profile?.settings?.quitOnClose && shell.windowClosed) {
shell.send('quit');
}
@@ -213,20 +222,22 @@ const App = () => {