mirror of
https://github.com/dscalzi/HeliosLauncher.git
synced 2024-12-22 11:42:14 -08:00
Fix autoconnect for 1.13, 1.14. Disabled on 1.15+.
Autoconnect is causing a OpenGL stack overflow exception on 1.15+ for some reason. Disabled it for now. Finally changed .westeroscraft to .helioslauncher.
This commit is contained in:
parent
71b25d3e5c
commit
1bdb413ab5
@ -6,7 +6,7 @@ const logger = require('./loggerutil')('%c[ConfigManager]', 'color: #a02d2a; fon
|
|||||||
|
|
||||||
const sysRoot = process.env.APPDATA || (process.platform == 'darwin' ? process.env.HOME + '/Library/Application Support' : process.env.HOME)
|
const sysRoot = process.env.APPDATA || (process.platform == 'darwin' ? process.env.HOME + '/Library/Application Support' : process.env.HOME)
|
||||||
// TODO change
|
// TODO change
|
||||||
const dataPath = path.join(sysRoot, '.westeroscraft')
|
const dataPath = path.join(sysRoot, '.helioslauncher')
|
||||||
|
|
||||||
// Forked processes do not have access to electron, so we have this workaround.
|
// Forked processes do not have access to electron, so we have this workaround.
|
||||||
const launcherDir = process.env.CONFIG_DIRECT_PATH || require('electron').remote.app.getPath('userData')
|
const launcherDir = process.env.CONFIG_DIRECT_PATH || require('electron').remote.app.getPath('userData')
|
||||||
|
@ -272,6 +272,18 @@ class ProcessBuilder {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_processAutoConnectArg(args){
|
||||||
|
if(ConfigManager.getAutoConnect() && this.server.isAutoConnect()){
|
||||||
|
const serverURL = new URL('my://' + this.server.getAddress())
|
||||||
|
args.push('--server')
|
||||||
|
args.push(serverURL.hostname)
|
||||||
|
if(serverURL.port){
|
||||||
|
args.push('--port')
|
||||||
|
args.push(serverURL.port)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct the argument array that will be passed to the JVM process.
|
* Construct the argument array that will be passed to the JVM process.
|
||||||
*
|
*
|
||||||
@ -461,6 +473,13 @@ class ProcessBuilder {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Autoconnect
|
||||||
|
if(Util.mcVersionAtLeast('1.15', this.server.getMinecraftVersion())) {
|
||||||
|
logger.error('Server autoconnect disabled on 1.15+ due to OpenGL Stack Overflow issue.')
|
||||||
|
} else {
|
||||||
|
this._processAutoConnectArg(args)
|
||||||
|
}
|
||||||
|
|
||||||
// Forge Specific Arguments
|
// Forge Specific Arguments
|
||||||
args = args.concat(this.forgeData.arguments.game)
|
args = args.concat(this.forgeData.arguments.game)
|
||||||
|
|
||||||
@ -526,15 +545,7 @@ class ProcessBuilder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Autoconnect to the selected server.
|
// Autoconnect to the selected server.
|
||||||
if(ConfigManager.getAutoConnect() && this.server.isAutoConnect()){
|
this._processAutoConnectArg(mcArgs)
|
||||||
const serverURL = new URL('my://' + this.server.getAddress())
|
|
||||||
mcArgs.push('--server')
|
|
||||||
mcArgs.push(serverURL.hostname)
|
|
||||||
if(serverURL.port){
|
|
||||||
mcArgs.push('--port')
|
|
||||||
mcArgs.push(serverURL.port)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Prepare game resolution
|
// Prepare game resolution
|
||||||
if(ConfigManager.getFullscreen()){
|
if(ConfigManager.getFullscreen()){
|
||||||
|
Loading…
Reference in New Issue
Block a user