From 6f195ddc6d25dab10bf50319928ffd41e563e5c2 Mon Sep 17 00:00:00 2001 From: radius Date: Sat, 17 Sep 2016 02:05:49 -0500 Subject: [PATCH] (ems) template cleanup --- pkg/emscripten/embed/embed.js | 25 +------------------------ pkg/emscripten/itch/itch.js | 25 +------------------------ pkg/emscripten/libretro/libretro.js | 6 ++++++ 3 files changed, 8 insertions(+), 48 deletions(-) diff --git a/pkg/emscripten/embed/embed.js b/pkg/emscripten/embed/embed.js index 4745878a53..50c285730d 100644 --- a/pkg/emscripten/embed/embed.js +++ b/pkg/emscripten/embed/embed.js @@ -3,10 +3,9 @@ * * This provides the basic JavaScript for the RetroArch web player. */ -var dropbox = false; var client = new Dropbox.Client({ key: "--your-api-key--" }); -var XFS; var BrowserFS = browserfs; +var afs; var showError = function(error) { switch (error.status) { @@ -73,12 +72,9 @@ function dropboxSyncComplete() console.log("WEBPLAYER: Sync successful"); setupFileSystem("dropbox"); - setupFolderStructure(); preLoadingComplete(); } -var afs; - function dropboxSync(dropboxClient, cb) { var dbfs = new BrowserFS.FileSystem.Dropbox(dropboxClient); @@ -162,24 +158,6 @@ function getParam(name) { } } -function setupFolderStructure() -{ - FS.createPath('/', '/home/web_user', true, true); -} - -function stat(path) -{ - try{ - FS.stat(path); - } - catch(err) - { - console.log("WEBPLAYER: file " + path + " doesn't exist"); - return false; - } - return true; -} - function startRetroArch() { $('.webplayer').show(); @@ -357,7 +335,6 @@ $(function() { $('#lblLocal').addClass('active'); preLoadingComplete(); setupFileSystem("browser"); - setupFolderStructure(); } }); }); diff --git a/pkg/emscripten/itch/itch.js b/pkg/emscripten/itch/itch.js index 0bed2ac93b..7a1a985d16 100644 --- a/pkg/emscripten/itch/itch.js +++ b/pkg/emscripten/itch/itch.js @@ -3,9 +3,9 @@ * * This provides the basic JavaScript for the RetroArch web player. */ -var dropbox = false; var client = new Dropbox.Client({ key: "il6e10mfd7pgf8r" }); var BrowserFS = browserfs; +var afs; var showError = function(error) { switch (error.status) { @@ -78,12 +78,9 @@ function dropboxSyncComplete() console.log("WEBPLAYER: Sync successful"); setupFileSystem("dropbox"); - setupFolderStructure(); preLoadingComplete(); } -var afs; - function dropboxSync(dropboxClient, cb) { var dbfs = new BrowserFS.FileSystem.Dropbox(dropboxClient); @@ -108,7 +105,6 @@ function preLoadingComplete() }); } - function setupFileSystem(backend) { /* create a mountable filesystem that will server as a root @@ -163,24 +159,6 @@ function getParam(name) { } } -function setupFolderStructure() -{ - FS.createPath('/', '/home/web_user', true, true); -} - -function stat(path) -{ - try{ - FS.stat(path); - } - catch(err) - { - console.log("WEBPLAYER: file " + path + " doesn't exist"); - return false; - } - return true; -} - function startRetroArch() { $('.webplayer').show(); @@ -363,7 +341,6 @@ $(function() { //$('#icnDrop').removeClass('fa-dropbox'); preLoadingComplete(); setupFileSystem("browser"); - setupFolderStructure(); } }); }); diff --git a/pkg/emscripten/libretro/libretro.js b/pkg/emscripten/libretro/libretro.js index 5954a21474..76205bb2f8 100644 --- a/pkg/emscripten/libretro/libretro.js +++ b/pkg/emscripten/libretro/libretro.js @@ -121,6 +121,12 @@ function setupFileSystem(backend) var lsfs = new BrowserFS.FileSystem.LocalStorage() /* 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 {