A games launcher for GOG, Amazon and Epic Games for Linux, Windows and macOS.
TypeScript amazon-primeelectronepic-games-launcherepic-games-storeepic-storegaminggoggog-galaxyheroic-games-launcherlinuxplay-gamesprotonsteamwine
import { useEffect } from 'react'
import { useTranslation } from 'react-i18next'
import useSetting from 'frontend/hooks/useSetting'
import { toggleControllerIsDisabled } from 'frontend/helpers/gamepad'
import { ToggleSwitch } from 'frontend/components/UI'
const DisableController = () => {
const { t } = useTranslation()
const [disableController, setDisableController] = useSetting(
'disableController',
false
)
useEffect(() => {
toggleControllerIsDisabled(disableController)
}, [disableController])
return (
<ToggleSwitch
description={t(
'setting.disableController.description',
'Stop Heroic from responding to gamepad input'
)}
htmlId="disableController"
value={disableController}
handleChange={() => setDisableController(!disableController)}
title={t(
'setting.disable_controller',
'Disable Heroic navigation using controller'
)}
/>
)
}
export default DisableController