From c29cd046d0093424bcc4fbcf0c0784232436afa6 Mon Sep 17 00:00:00 2001 From: "Joseph C. Osborn" Date: Fri, 28 Feb 2025 09:40:45 -0800 Subject: [PATCH] Fixes asset paths/double bundle path for web player --- pkg/emscripten/README.md | 2 +- pkg/emscripten/libretro/libretro.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/emscripten/README.md b/pkg/emscripten/README.md index 1295bdd7b4..b9a78a4c47 100644 --- a/pkg/emscripten/README.md +++ b/pkg/emscripten/README.md @@ -159,7 +159,7 @@ cp fceumm_libretro.{js,wasm} pkg/emscripten/libretro-thread ## Dependencies -The emscripten build in the retroarch tree does not contain the necessary web assets for a complete RetroArch installation. While it supports the regular desktop asset and content downloaders, we also provide a small bundle of UI assets for first launch. You can obtain these files from the nightly Emscripten build on the buildbot, or make them yourself by `zip -r bundle-minimal.zip bundle-minimal` (essentially, just the `assets/ozone`, `assets/pkg`, and `assets/sounds` folders from the regular asset package). +The emscripten build in the retroarch tree does not contain the necessary web assets for a complete RetroArch installation. While it supports the regular desktop asset and content downloaders, we also provide a small bundle of UI assets for first launch. You can obtain these files from the nightly Emscripten build on the buildbot, or make them yourself by `zip -r9 bundle-minimal.zip bundle` (essentially, just the `assets/ozone`, `assets/pkg`, and `assets/sounds` folders from the regular asset package). ## Usage diff --git a/pkg/emscripten/libretro/libretro.js b/pkg/emscripten/libretro/libretro.js index 8b46fbc030..bce92f64f1 100644 --- a/pkg/emscripten/libretro/libretro.js +++ b/pkg/emscripten/libretro/libretro.js @@ -198,14 +198,14 @@ function setupFileSystem(backend) { var mfs = new BrowserFS.FileSystem.MountableFileSystem(); // create an XmlHttpRequest filesystem for the bundled data - var xfs1 = new BrowserFS.FileSystem.ZipFS(zipTOC); + var zipfs = new BrowserFS.FileSystem.ZipFS(zipTOC); // create an XmlHttpRequest filesystem for core assets - var xfs2 = new BrowserFS.FileSystem.XmlHttpRequest(".index-xhr", "assets/cores/"); + var xfs = new BrowserFS.FileSystem.XmlHttpRequest(".index-xhr", "assets/cores/"); console.log("WEBPLAYER: initializing filesystem: " + backend); - mfs.mount('/home/web_user/retroarch/bundle', xfs1); + mfs.mount('/home/web_user/retroarch/', zipfs); mfs.mount('/home/web_user/retroarch/userdata', afs); - mfs.mount('/home/web_user/retroarch/userdata/content/downloads', xfs2); + mfs.mount('/home/web_user/retroarch/userdata/content/downloads', xfs); BrowserFS.initialize(mfs); var BFS = new BrowserFS.EmscriptenFS(Module.FS, Module.PATH, Module.ERRNO_CODES); Module.FS.mount(BFS, {