fusilli-client: update
authorGrazvydas Ignotas <notasas@gmail.com>
Mon, 24 Nov 2014 21:53:43 +0000 (23:53 +0200)
committerGrazvydas Ignotas <notasas@gmail.com>
Mon, 24 Nov 2014 21:53:43 +0000 (23:53 +0200)
recipes/fusilli-client/files/sparrowNet.c
recipes/fusilli-client/fusilli-client_git.bb

index e0986a0..fd20890 100644 (file)
@@ -1289,12 +1289,20 @@ int c4a_commit_thread(void* data)
                        remove(spCacheFilename);
                #endif
                //if cache is still existing, we need to write back the rest of the cache
-               while (cache)
+               if (cache)
                {
-                       cachePointer next = cache->next;
-                       write_to_cache(cache->game,cache->system,cache->prid,cache->score,0);
-                       free(cache);
-                       cache = next;
+                       SDL_RWops *file = SDL_RWFromFile(spCacheFilename, "ab");
+                       while (cache)
+                       {
+                               cachePointer next = cache->next;
+                               SDL_RWwrite(file,cache->game,256,1);
+                               SDL_RWwrite(file,cache->system,256,1);
+                               SDL_RWwrite(file,cache->prid,256,1);
+                               SDL_RWwrite(file,&(cache->score),sizeof(int),1);
+                               free(cache);
+                               cache = next;
+                       }
+                       SDL_RWclose(file);
                }
                        
        }
index edc8a43..ffac71b 100644 (file)
@@ -4,7 +4,7 @@ LICENSE = "GPLv3"
 DEPENDS = "virtual/libsdl libsdl-net pandora-libpnd"
 RDEPENDS = "libsdl-net pandora-libpnd"
 
-PR = "r1"
+PR = "r2"
 PR_append = "+gitr${SRCPV}"
 
 SRC_URI = " \
@@ -14,7 +14,7 @@ SRC_URI = " \
   file://sparrowDefines.h \
 "
 
-SRCREV = "ef70184115cf3da4e2f611dc0f86c0d7fe991235"
+SRCREV = "73642236bbce54852e2a40c4b373b96ee6055691"
 
 S = "${WORKDIR}/git"