Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit e08d42f

Browse files
committed
update MangoHud to 0.4.1
1 parent 3362fcf commit e08d42f

6 files changed

Lines changed: 36 additions & 9 deletions

File tree

bin/libs/i386/libMangoHud.tar.gz

20.2 KB
Binary file not shown.
1 Byte
Binary file not shown.

bin/libs/x86-64/libMangoHud.tar.gz

17.5 KB
Binary file not shown.
10 Bytes
Binary file not shown.

src/src/modules/mango-hud.js

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,37 @@ export default class MangoHud {
5555
let implicitLayers = this.prefix.getCacheImplicitLayerDir();
5656
let file32 = `${implicitLayers}/MangoHud.x86.json`;
5757
let file64 = `${implicitLayers}/MangoHud.x86_64.json`;
58+
let size = {
59+
main: {
60+
32: 1545756,
61+
64: 1480816,
62+
},
63+
dlsym: {
64+
32: 20820,
65+
64: 22136,
66+
},
67+
};
68+
69+
const validate = (main, dlsym, arch) => {
70+
if (this.fs.exists(main) && !this.fs.exists(dlsym)) {
71+
this.fs.rm(main);
72+
return;
73+
}
74+
75+
if (!this.fs.exists(main) && this.fs.exists(dlsym)) {
76+
this.fs.rm(dlsym);
77+
return;
78+
}
79+
80+
if (this.fs.size(main) !== size.main[arch] || this.fs.size(dlsym) !== size.dlsym[arch]) {
81+
if (this.fs.exists(main)) {
82+
this.fs.rm(main);
83+
}
84+
if (this.fs.exists(dlsym)) {
85+
this.fs.rm(dlsym);
86+
}
87+
}
88+
};
5889

5990
if (!this.fs.exists(implicitLayers)) {
6091
this.fs.mkdir(implicitLayers);
@@ -70,9 +101,7 @@ export default class MangoHud {
70101
let win32 = this.prefix.getMangoHudLibPath('win32');
71102
let win32dlsum = this.prefix.getMangoHudLibDlsumPath('win32');
72103

73-
if (this.fs.exists(win32) && !this.fs.exists(win32dlsum)) {
74-
this.fs.rm(win32);
75-
}
104+
validate(win32, win32dlsum, 32);
76105

77106
if (!this.fs.exists(win32)) {
78107
let filename = this.fs.basename(win32).replace('.so', '.tar.gz');
@@ -97,9 +126,7 @@ export default class MangoHud {
97126
let win64 = this.prefix.getMangoHudLibPath('win64');
98127
let win64dlsum = this.prefix.getMangoHudLibDlsumPath('win64');
99128

100-
if (this.fs.exists(win64) && !this.fs.exists(win64dlsum)) {
101-
this.fs.rm(win64);
102-
}
129+
validate(win64, win64dlsum, 64);
103130

104131
if (!this.fs.exists(win64)) {
105132
let filename = this.fs.basename(win64).replace('.so', '.tar.gz');
@@ -130,7 +157,7 @@ export default class MangoHud {
130157
"layer": {
131158
"name": "VK_LAYER_MangoHud_32",
132159
"type": "GLOBAL",
133-
"api_version": "1.1.135",
160+
"api_version": "1.2.135",
134161
"library_path": this.prefix.getMangoHudLibPath('win32'),
135162
"implementation_version": "1",
136163
"description": "Vulkan Hud Overlay",
@@ -154,7 +181,7 @@ export default class MangoHud {
154181
"layer": {
155182
"name": "VK_LAYER_MangoHud_64",
156183
"type": "GLOBAL",
157-
"api_version": "1.1.135",
184+
"api_version": "1.2.135",
158185
"library_path": this.prefix.getMangoHudLibPath('win64'),
159186
"implementation_version": "1",
160187
"description": "Vulkan Hud Overlay",

src/src/modules/update.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const fs = require('fs');
88

99
export default class Update {
1010

11-
version = '1.4.26';
11+
version = '1.4.27';
1212

1313
/**
1414
* @type {string}

0 commit comments

Comments
 (0)