(Android) asset manager nits

This commit is contained in:
ToadKing 2013-02-03 19:33:25 -05:00
parent c8169aa816
commit 305d40de30

View File

@ -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) {