Let me see... First, in your index.js, find the following code:
ipcMain.on( "toggleFullscreen", function () { toggleGameFullscreen(); } );
Then add this directly below it:
ipcMain.handle("isFullscreen", function () { return win ? win.isKiosk() : false; });
After that, you can use the following code in your game to check whether fullscreen is enabled and set the switch accordingly:
require("electron").ipcRenderer.invoke("isFullscreen").then(function(isFullscreen) { $gameSwitches.setValue(48, isFullscreen); });
This will set Switch 48 to ON when the game is in fullscreen mode, and OFF when it is not.







