mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-01 12:03:47 +01:00
Merge pull request #2779 from MartinFournier/fix/electron-mac-crash
Fix 'Steam not running' popup causing crash on MacOS
This commit is contained in:
commit
de122eca73
@ -100,8 +100,8 @@ function setStopProcessHandler(app, window, enabled) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function startWindow(noScript) {
|
async function startWindow(noScript) {
|
||||||
gameWindow.createWindow(noScript);
|
return gameWindow.createWindow(noScript);
|
||||||
}
|
}
|
||||||
|
|
||||||
global.app_handlers = {
|
global.app_handlers = {
|
||||||
@ -119,15 +119,14 @@ app.whenReady().then(async () => {
|
|||||||
setStopProcessHandler(app, window, true);
|
setStopProcessHandler(app, window, true);
|
||||||
await utils.exportSave(window);
|
await utils.exportSave(window);
|
||||||
} else {
|
} else {
|
||||||
startWindow(process.argv.includes("--no-scripts"));
|
const window = await startWindow(process.argv.includes("--no-scripts"));
|
||||||
}
|
|
||||||
|
|
||||||
if (global.greenworksError) {
|
if (global.greenworksError) {
|
||||||
dialog.showMessageBox({
|
await dialog.showMessageBox(window, {
|
||||||
title: 'Bitburner',
|
title: "Bitburner",
|
||||||
message: 'Could not connect to Steam',
|
message: "Could not connect to Steam",
|
||||||
detail: `${global.greenworksError}\n\nYou won't be able to receive achievements until this is resolved and you restart the game.`,
|
detail: `${global.greenworksError}\n\nYou won't be able to receive achievements until this is resolved and you restart the game.`,
|
||||||
type: 'warning', buttons: ['OK']
|
type: 'warning', buttons: ['OK']
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user