From 03439c375724227cc3b32871eae5f8e1f05f7b4e Mon Sep 17 00:00:00 2001 From: SpikeHD Date: Sat, 27 Aug 2022 19:47:28 -0700 Subject: [PATCH] launcher.exe alert --- src/ui/components/menu/Options.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/ui/components/menu/Options.tsx b/src/ui/components/menu/Options.tsx index 86116c4..345dbf2 100644 --- a/src/ui/components/menu/Options.tsx +++ b/src/ui/components/menu/Options.tsx @@ -120,6 +120,17 @@ export default class Options extends React.Component { setGameExecutable(value: string) { setConfigOption('game_install_path', value) + // I hope this stops people setting launcher.exe because oml it's annoying + if (value.endsWith('launcher.exe')) { + const pathArr = value.replace(/\\/g, '/').split('/') + pathArr.pop() + const path = pathArr.join('/') + '/Genshin Impact Game/' + + alert( + `You have set your game execuatable to "launcher.exe". You should not do this. Your game executable is located in:\n\n${path}` + ) + } + this.setState({ game_install_path: value, })