From 64b802b47a0953ef48495ac5e745a48d180b8c04 Mon Sep 17 00:00:00 2001 From: radius Date: Sat, 17 Sep 2016 12:37:35 -0500 Subject: [PATCH] (ems) add to the other templates too --- pkg/emscripten/embed/embed.js | 18 +++++++++++++----- pkg/emscripten/embed/index.html | 8 ++++++-- pkg/emscripten/itch/index.html | 2 +- pkg/emscripten/itch/itch.js | 2 ++ pkg/emscripten/libretro/index.html | 2 +- 5 files changed, 23 insertions(+), 9 deletions(-) diff --git a/pkg/emscripten/embed/embed.js b/pkg/emscripten/embed/embed.js index 50c285730d..2d876b2de3 100644 --- a/pkg/emscripten/embed/embed.js +++ b/pkg/emscripten/embed/embed.js @@ -3,6 +3,8 @@ * * This provides the basic JavaScript for the RetroArch web player. */ + +/* setup your key for dropbox support */ var client = new Dropbox.Client({ key: "--your-api-key--" }); var BrowserFS = browserfs; var afs; @@ -45,6 +47,12 @@ var showError = function(error) { } }; +function cleanupStorage() +{ + localStorage.clear(); + document.getElementById('btnClean').disabled = true; +} + function dropboxInit() { document.getElementById('btnRun').disabled = true; @@ -106,6 +114,9 @@ function setupFileSystem(backend) mountpoint for browserfs */ var mfs = new BrowserFS.FileSystem.MountableFileSystem(); + /* setup this if you setup your server to serve assets or core assets, + you can find more information in the included README */ + /* create an XmlHttpRequest filesystem for the bundled data uncomment this section if you want XMB assets, Overlays, Shaders, etc. var xfs1 = new BrowserFS.FileSystem.XmlHttpRequest @@ -126,11 +137,6 @@ function setupFileSystem(backend) /* mount the filesystems onto mfs */ mfs.mount('/home/web_user/retroarch/userdata', lsfs); - /* create a memory filesystem for content only - var imfs = new BrowserFS.FileSystem.InMemory();*/ - - /* mount the filesystems onto mfs - mfs.mount('/home/web_user/retroarch/userdata/content/', imfs);*/ } else { @@ -138,6 +144,8 @@ function setupFileSystem(backend) mfs.mount('/home/web_user/retroarch/userdata', afs); } + /* setup this if you setup your server to serve assets or core assets, + you can find more information in the included README */ /* mfs.mount('/home/web_user/retroarch/bundle', xfs1); mfs.mount('/home/web_user/retroarch/userdata/content/', xfs2); diff --git a/pkg/emscripten/embed/index.html b/pkg/emscripten/embed/index.html index 4dde75f28e..273eda2c21 100644 --- a/pkg/emscripten/embed/index.html +++ b/pkg/emscripten/embed/index.html @@ -89,6 +89,9 @@ +