Update: Island System Phase 1, Ocean Visualization, UI Visibility, Electron Build Fixes
This commit is contained in:
@@ -1,6 +1,13 @@
|
||||
const { app, BrowserWindow } = require('electron');
|
||||
const path = require('path');
|
||||
|
||||
// --- STABILITY FIXES ---
|
||||
// Fix for "GPU process exited unexpectedly" and black screen issues
|
||||
// app.disableHardwareAcceleration(); // CAUSES GARBAGE TEXT?
|
||||
app.commandLine.appendSwitch('no-sandbox');
|
||||
app.commandLine.appendSwitch('disable-gpu'); // Try just disabling GPU
|
||||
// app.commandLine.appendSwitch('disable-software-rasterizer');
|
||||
|
||||
function createWindow() {
|
||||
const win = new BrowserWindow({
|
||||
width: 1280,
|
||||
@@ -14,7 +21,16 @@ function createWindow() {
|
||||
icon: path.join(__dirname, 'assets/DEMO_FAZA1/Characters/gronk_walk_sheet.png')
|
||||
});
|
||||
|
||||
win.loadFile('index.html');
|
||||
// Revert to relative path which usually works better in ASAR
|
||||
// win.loadFile('index.html');
|
||||
|
||||
// Robust file loading using loadURL and absolute path
|
||||
win.loadURL('file://' + path.join(__dirname, 'index.html'));
|
||||
|
||||
// Redirect renderer logs to terminal
|
||||
win.webContents.on('console-message', (event, level, message, line, sourceId) => {
|
||||
console.log(`[Renderer] ${message} (${sourceId}:${line})`);
|
||||
});
|
||||
|
||||
// Uncomment to open DevTools by default
|
||||
win.webContents.openDevTools();
|
||||
|
||||
Reference in New Issue
Block a user