diff --git a/android/phoenix/src/org/retroarch/browser/RetroArch.java b/android/phoenix/src/org/retroarch/browser/RetroArch.java index 08f886ce78..32a1feb40c 100644 --- a/android/phoenix/src/org/retroarch/browser/RetroArch.java +++ b/android/phoenix/src/org/retroarch/browser/RetroArch.java @@ -90,7 +90,7 @@ public class RetroArch extends Activity implements Log.i(TAG, "Using refresh rate: " + rate + " Hz."); return rate; } - + private String readCPUInfo() { String result = ""; @@ -163,10 +163,13 @@ public class RetroArch extends Activity implements { DataInputStream cacheStream = new DataInputStream(new FileInputStream(cacheVersion)); - int curretnCacheVersion = cacheStream.readInt(); + int currentCacheVersion = 0; + try { + currentCacheVersion = cacheStream.readInt(); + } catch (IOException e) {} cacheStream.close(); - if (curretnCacheVersion == version) + if (currentCacheVersion == version) { Log.i(TAG, "assets already extracted, skipping..."); return; @@ -176,7 +179,7 @@ public class RetroArch extends Activity implements //extractAssets(assets, cacheDir, "Shaders", 1); extractAssets(assets, cacheDir, "Overlays", 1); - DataOutputStream outputCacheVersion = new DataOutputStream(new FileOutputStream(cacheVersion)); + DataOutputStream outputCacheVersion = new DataOutputStream(new FileOutputStream(cacheVersion, false)); outputCacheVersion.writeInt(version); outputCacheVersion.close(); } catch (IOException e) {