-
-
Notifications
You must be signed in to change notification settings - Fork 455
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[UX] UMU used by default if linux and proton, not exprimental anymore…
…, allow disabling as needed (#4175) * UMU: not experimental anymore, allow disabling game-by-game * fix i18n * Disable UMU setting in advanced tab
- Loading branch information
Showing
15 changed files
with
81 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import React, { useContext } from 'react' | ||
import { useTranslation } from 'react-i18next' | ||
import { ToggleSwitch } from 'frontend/components/UI' | ||
import useSetting from 'frontend/hooks/useSetting' | ||
import SettingsContext from '../SettingsContext' | ||
import ContextProvider from 'frontend/state/ContextProvider' | ||
import { defaultWineVersion } from '..' | ||
|
||
const DisableUMU = () => { | ||
const { t } = useTranslation() | ||
const { isDefault } = useContext(SettingsContext) | ||
const { platform } = useContext(ContextProvider) | ||
|
||
const [disableUMU, setDisableUMU] = useSetting('disableUMU', false) | ||
const [wineVersion] = useSetting('wineVersion', defaultWineVersion) | ||
|
||
if (isDefault || platform !== 'linux' || wineVersion.type !== 'proton') { | ||
return <></> | ||
} | ||
|
||
return ( | ||
<ToggleSwitch | ||
htmlId="disableUMU" | ||
value={disableUMU} | ||
handleChange={() => setDisableUMU(!disableUMU)} | ||
title={t('setting.disableUMU', 'Disable UMU')} | ||
/> | ||
) | ||
} | ||
|
||
export default DisableUMU |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.