Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crash issue on Linux for games using platform: other #1630

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 17 additions & 8 deletions src/pages/Splash.vue
Original file line number Diff line number Diff line change
Expand Up @@ -166,17 +166,26 @@ export default class Splash extends mixins(SplashMixin) {
async moveToNextScreen() {
if (process.platform === 'linux') {
const activeGame: Game = this.$store.state.activeGame;
const gdrp : GameDirectoryResolverProvider = GameDirectoryResolverProvider.instance;

if (!await (GameDirectoryResolverProvider.instance as LinuxGameDirectoryResolver).isProtonGame(activeGame)) {
console.log('Not proton game');
await this.ensureWrapperInGameFolder();
const launchArgs = await (GameDirectoryResolverProvider.instance as LinuxGameDirectoryResolver).getLaunchArgs(activeGame);
console.log(`Launch arguments for this game:`, launchArgs);
if (typeof launchArgs === 'string' && !launchArgs.startsWith(path.join(PathResolver.MOD_ROOT, 'linux_wrapper.sh'))) {
this.$router.push({name: 'linux'});
return;
if (gdrp instanceof LinuxGameDirectoryResolver)
{
if (!await (gdrp as LinuxGameDirectoryResolver).isProtonGame(activeGame)) {
console.log('Not proton game');
await this.ensureWrapperInGameFolder();
const launchArgs = await (GameDirectoryResolverProvider.instance as LinuxGameDirectoryResolver).getLaunchArgs(activeGame);
console.log(`Launch arguments for this game:`, launchArgs);
if (typeof launchArgs === 'string' && !launchArgs.startsWith(path.join(PathResolver.MOD_ROOT, 'linux_wrapper.sh'))) {
this.$router.push({name: 'linux'});
return;
}
}
}
else
{
// no idea what we need to do
}

} else if (process.platform === 'darwin') {
await this.ensureWrapperInGameFolder();
this.$router.push({name: 'linux'});
Expand Down