Skip to content

Commit 9d7a6fc

Browse files
committed
fix romPath
1 parent 2e376eb commit 9d7a6fc

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

src/main/main.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import path from 'path';
1212
import { app, BrowserWindow, shell, ipcMain } from 'electron';
1313
import { autoUpdater } from 'electron-updater';
1414
import log from 'electron-log';
15-
import { exec, spawn } from 'child_process';
15+
import { exec } from 'child_process';
1616
import MenuBuilder from './menu';
1717
import { resolveHtmlPath } from './util';
1818

@@ -66,6 +66,11 @@ async function getFirstLevelSubfolders(folder) {
6666
}
6767
}
6868

69+
ipcMain.on('refresh-systems', async (event, name) => {
70+
app.relaunch();
71+
app.quit();
72+
});
73+
6974
ipcMain.on('get-available-themes', async (event, name) => {
7075
theme = name;
7176
const themesPath = `${homeUser}/emudeck/launcher/themes`;
@@ -224,6 +229,7 @@ lines.forEach((line) => {
224229
let { romsPath } = envVars;
225230
// $HOME FIX
226231
romsPath = romsPath.replace('"$HOME"', homeUser);
232+
romsPath = romsPath.replaceAll('"', '');
227233

228234
const maxDepth = 1; // Puedes ajustar este valor según tu necesidad
229235

src/pages/HomePage.jsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,11 @@ function HomePage({ focusKey: focusKeyParam }) {
9191
if (buttonIndex === 'button2') {
9292
localStorage.removeItem('systems');
9393
setTimeout(() => {
94-
window.location.reload();
94+
ipcChannel.sendMessage('refresh-systems');
95+
// ipcChannel.once('refresh-systems', (systemsTemp) => {
96+
// console.log({ systemsTemp });
97+
// setState({ ...state, themes: systemsTemp });
98+
// });
9599
}, '500');
96100
}
97101

0 commit comments

Comments
 (0)