Skip to content

Commit 33858fd

Browse files
committed
fix for game checking not working on non-English versions of Windows
1 parent 60479bb commit 33858fd

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "wh3mm",
33
"productName": "wh3mm",
4-
"version": "2.12.1",
4+
"version": "2.12.2",
55
"description": "WH3 Mod Manager",
66
"main": ".webpack/main",
77
"scripts": {

src/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,11 @@ if (!gotTheLock) {
256256
try {
257257
// if a game crashes you can end up with a tiny running process of the game, that's why we have a memory filter here
258258
exec(
259-
`tasklist /fi "IMAGENAME eq ${gameToProcessName[appData.currentGame]}" /fi "MEMUSAGE gt 10000"`,
259+
`tasklist /nh /fi "IMAGENAME eq ${
260+
gameToProcessName[appData.currentGame]
261+
}" /fi "MEMUSAGE gt 10000"`,
260262
(_, stdout) => {
261-
const isWH3Running = !stdout.startsWith("INFO: ");
263+
const isWH3Running = stdout.includes(gameToProcessName[appData.currentGame]);
262264
if (appData.isWH3Running != isWH3Running) {
263265
appData.isWH3Running = isWH3Running;
264266
windows.mainWindow?.webContents.send("setIsWH3Running", appData.isWH3Running);

0 commit comments

Comments
 (0)