Skip to content

Commit

Permalink
Extend only Game settings on install
Browse files Browse the repository at this point in the history
  • Loading branch information
flavioislima committed Dec 28, 2021
1 parent 631cb63 commit 9eec5b0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/screens/Library/components/InstallModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ export default function InstallModal({ appName, backdropClick }: Props) {
)[0]
const [gameInfo, setGameInfo] = useState({} as InstallInfo)
const [installDlcs, setInstallDlcs] = useState(false)
const [settings, setSettings] = useState<AppSettings>()
const [winePrefix, setWinePrefix] = useState('...')
const [defaultPath, setDefaultPath] = useState('...')
const [installPath, setInstallPath] = useState(
Expand Down Expand Up @@ -82,7 +81,12 @@ export default function InstallModal({ appName, backdropClick }: Props) {

// Write Default game config with prefix on linux
if (isLinux) {
writeConfig([appName, { ...settings, winePrefix }])
const appSettings: AppSettings = await ipcRenderer.invoke(
'requestSettings',
appName
)

writeConfig([appName, { ...appSettings, winePrefix }])
}

return await install({
Expand All @@ -103,7 +107,6 @@ export default function InstallModal({ appName, backdropClick }: Props) {
.invoke('requestSettings', 'default')
.then((config: AppSettings) => {
setDefaultPath(config.defaultInstallPath)
setSettings(config)
if (installPath === 'default') {
setInstallPath(config.defaultInstallPath)
}
Expand Down

0 comments on commit 9eec5b0

Please sign in to comment.