diff --git a/src/host/device.ts b/src/host/device.ts index 36888f2a..78f94a14 100644 --- a/src/host/device.ts +++ b/src/host/device.ts @@ -62,6 +62,7 @@ export interface ISystemInfo { gpu: string; deviceModel: string; cpu: string; + emscripten: string; } @@ -166,6 +167,7 @@ export function systemInfo(ctx: WebGLRenderingContext): ISystemInfo { { width: screenWidth, height: screenHeight }, ), cpu: (cores || 0).toString(), + emscripten: "3.1.68", }; } diff --git a/src/window/dos/dos-dhry2.tsx b/src/window/dos/dos-dhry2.tsx index 6db38fbd..f8a561e9 100644 --- a/src/window/dos/dos-dhry2.tsx +++ b/src/window/dos/dos-dhry2.tsx @@ -83,30 +83,28 @@ export function Dhry2Results(props: { ci: CommandInterface }) { pc: getComparablePc(vaxRating), }); - if (token) { - (async () => { - const gl = nonSerializableStore.gl; - if (gl) { - const payload = { - token, - test: "dhry2", - jsdos: JSDOS_VERSION, - emu: emuVersion, - backend, - worker, - hardware: hardware ?? false, - result: Math.round(vaxRating * 100) / 100, - ...systemInfo(gl), - }; - await fetch(apiEndpoint + "/perf/set", { - method: "POST", - body: JSON.stringify(payload), - }); - } - })() - .catch(console.error) - .finally(() => setSubmited(true)); - } + (async () => { + const gl = nonSerializableStore.gl; + if (gl) { + const payload = { + token: token ?? "", + test: "dhry2", + jsdos: JSDOS_VERSION, + emu: emuVersion, + backend, + worker, + hardware: hardware ?? false, + result: Math.round(vaxRating * 100) / 100, + ...systemInfo(gl), + }; + await fetch(apiEndpoint + "/perf/set", { + method: "POST", + body: JSON.stringify(payload), + }); + } + })() + .catch(console.error) + .finally(() => setSubmited(true)); } else { setResults({ runs, @@ -138,11 +136,11 @@ export function Dhry2Results(props: { ci: CommandInterface }) {