Desktop: Fixes #9130: Allow Electron `--disable-gpu` flag (#9179)

pull/9229/head
Roman Orlowski 2023-11-07 14:58:39 +03:00 committed by GitHub
parent 88b44a0f74
commit b030ca914d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions

View File

@ -1,5 +1,3 @@
import Logger, { LogLevel } from '@joplin/utils/Logger';
import JoplinError from '../JoplinError';
import { _ } from '../locale';
@ -152,6 +150,13 @@ const processStartFlags = async (argv: string[], setDefaults = true) => {
continue;
}
if (arg === '--disable-gpu') {
// Electron-specific flag - ignore it
// Allows users to disable GPU acceleration
argv.splice(0, 1);
continue;
}
if (arg.length && arg[0] === '-') {
throw new JoplinError(_('Unknown flag: %s', arg), 'flagError');
} else {