]> _ Git - fluidbook-html5.git/commitdiff
(no commit message)
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 30 Sep 2013 07:41:45 +0000 (07:41 +0000)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 30 Sep 2013 07:41:45 +0000 (07:41 +0000)
js/libs/gal/gal.filesystem.js
js/main.js

index f7229884a9fe6dc9189524d26fb47577ac8f65f1..47e1fa5007c8337670cdee52971cd7c97e5521e9 100644 (file)
                        that.regenerate(callback);
                };
 
+               console.log('fs init');
+
                // Callback when the filesystem API has granted quota
                var quotaCallback = function(grantedBytes) {
                        var persistent = LocalFileSystem.PERSISTENT;
                // And then recreate it
                var fs = this.fs;
 
+               console.log('regenerate');
+
                createDir_(fs.root, ROOT_DIR.split('/'), function(res) {
                        // Create a directory for the root of the GAL
                        fs.root.getDirectory(ROOT_DIR, {create: true}, function(dirEntry) {
                                that.root = dirEntry;
+                               console.log('root created');
                                callback();
                        }, onError);
                });
index 7af3663dafd2491ea935f23408191d098b5b98fe..c67cae5be762ae4f55420d72b044e2586f394888 100644 (file)
@@ -82,13 +82,16 @@ function onDeviceReady() {
        }
 
        console.log('cordova ready');
+       console.log(fsprefix);
+       console.log(manifest);
 
        if (navigator.onLine && manifest) {
                var readyToLoad = false;
                var finishedLoading = false;
                gal = new GameAssetLoader(JSON.parse(manifest), fsprefix);
-
+               console.log(gal);
                gal.init(function() {
+                       console.log('gal inited');
                        startAfterLoading = true;
                        init();
                });
@@ -116,8 +119,17 @@ function onDeviceReady() {
                        if (info.bundleName == 'extras') {
                                window.localStorage.setItem('offline.' + DATAS.id, '1');
                        }
-                       fluidbook.loader.retryErrorImages();
+                       try {
+                               if (fluidbook && fluidbook.loader) {
+                                       fluidbook.loader.retryErrorImages();
+                               }
+                       } catch (err) {
+
+                       }
+
+
                });
+               console.log('gal waiting...');
        } else {
                init();
        }
@@ -162,6 +174,8 @@ function init() {
                return;
        }
 
+       console.log('fluidbook inited');
+
        INITED = true;
 
        fluidbook = new Fluidbook(DATAS);