mirror of
https://git.sanhost.net/sanasol/hytale-f2p
synced 2026-02-26 18:41:48 -03:00
Revert "add save-load GPU preference handler"
This reverts commit b957a76aede8f9425b0a283d1444a32f55baa95a.
This commit is contained in:
24
main.js
24
main.js
@@ -276,7 +276,7 @@ app.on('window-all-closed', () => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
ipcMain.handle('launch-game', async (event, playerName, javaPath, installPath, gpuPreference) => {
|
ipcMain.handle('launch-game', async (event, playerName, javaPath, installPath) => {
|
||||||
try {
|
try {
|
||||||
const progressCallback = (message, percent, speed, downloaded, total) => {
|
const progressCallback = (message, percent, speed, downloaded, total) => {
|
||||||
if (mainWindow && !mainWindow.isDestroyed()) {
|
if (mainWindow && !mainWindow.isDestroyed()) {
|
||||||
@@ -291,7 +291,7 @@ ipcMain.handle('launch-game', async (event, playerName, javaPath, installPath, g
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const result = await launchGameWithVersionCheck(playerName, progressCallback, javaPath, installPath, gpuPreference);
|
const result = await launchGameWithVersionCheck(playerName, progressCallback, javaPath, installPath);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -704,26 +704,6 @@ ipcMain.handle('get-update-info', async () => {
|
|||||||
return updateManager.getUpdateInfo();
|
return updateManager.getUpdateInfo();
|
||||||
});
|
});
|
||||||
|
|
||||||
ipcMain.handle('get-gpu-info', () => {
|
|
||||||
try {
|
|
||||||
return app.getGPUInfo('complete');
|
|
||||||
} catch (error) {
|
|
||||||
console.error('Error getting GPU info:', error);
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
ipcMain.handle('save-gpu-preference', (event, gpuPreference) => {
|
|
||||||
const { saveGPUPreference } = require('./backend/launcher');
|
|
||||||
saveGPUPreference(gpuPreference);
|
|
||||||
return { success: true };
|
|
||||||
});
|
|
||||||
|
|
||||||
ipcMain.handle('load-gpu-preference', () => {
|
|
||||||
const { loadGPUPreference } = require('./backend/launcher');
|
|
||||||
return loadGPUPreference();
|
|
||||||
});
|
|
||||||
|
|
||||||
ipcMain.handle('window-close', () => {
|
ipcMain.handle('window-close', () => {
|
||||||
if (mainWindow && !mainWindow.isDestroyed()) {
|
if (mainWindow && !mainWindow.isDestroyed()) {
|
||||||
mainWindow.close();
|
mainWindow.close();
|
||||||
|
|||||||
Reference in New Issue
Block a user