mirror of
https://github.com/Eaglercraft-Archive/Eaglercraftx-1.8.8-src.git
synced 2025-06-27 18:38:14 -05:00
Update #46 - Fix pointer lock issue (sorta)
This commit is contained in:
@ -19,6 +19,9 @@ const serverPlatfSPName = "serverPlatformSingleplayer";
|
||||
/** @type {function(string, boolean)|null} */
|
||||
var sendIntegratedServerCrash = null;
|
||||
|
||||
/** @type {boolean} */
|
||||
var isTabClosingFlag = false;
|
||||
|
||||
function initializeServerPlatfSP(spImports) {
|
||||
|
||||
const serverMessageQueue = new EaglerLinkedQueue();
|
||||
@ -35,6 +38,11 @@ function initializeServerPlatfSP(spImports) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(channel === "~!WASM_AUTOSAVE") {
|
||||
isTabClosingFlag = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if(!buf) {
|
||||
eagError("Recieved IPC packet with null buffer");
|
||||
return;
|
||||
@ -72,6 +80,14 @@ function initializeServerPlatfSP(spImports) {
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* @return {boolean}
|
||||
*/
|
||||
spImports["isTabAboutToClose"] = function() {
|
||||
const ret = isTabClosingFlag;
|
||||
isTabClosingFlag = false;
|
||||
return ret;
|
||||
};
|
||||
}
|
||||
|
||||
function initializeNoServerPlatfSP(spImports) {
|
||||
@ -79,4 +95,5 @@ function initializeNoServerPlatfSP(spImports) {
|
||||
setUnsupportedFunc(spImports, serverPlatfSPName, "getAvailablePackets");
|
||||
setUnsupportedFunc(spImports, serverPlatfSPName, "getNextPacket");
|
||||
setUnsupportedFunc(spImports, serverPlatfSPName, "setCrashCallback");
|
||||
setUnsupportedFunc(spImports, serverPlatfSPName, "isTabAboutToClose");
|
||||
}
|
||||
|
Reference in New Issue
Block a user