mirror of
https://github.com/jamessanford/kegs.git
synced 2025-02-08 03:30:41 +00:00
These files were removed earlier
This commit is contained in:
parent
a587ba4ed7
commit
7fd08733ec
@ -1,5 +1,3 @@
|
||||
# testing:
|
||||
# g_cfg_rom_path = /mnt/sdcard/ROM.03
|
||||
# 0 = unlimited 1 = 1mhz 2 = 2.8mhz 3 = 8mhz
|
||||
g_limit_speed = 2
|
||||
|
||||
|
@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:id="@+id/input_controls"
|
||||
android:title="@string/input_controls_hide" />
|
||||
<item android:id="@+id/warm_reset"
|
||||
android:title="@string/warm_reset" />
|
||||
<item android:id="@+id/power_cycle"
|
||||
android:title="@string/power_cycle" />
|
||||
</menu>
|
@ -1,52 +0,0 @@
|
||||
package com.froop.app.kegs;
|
||||
|
||||
import android.os.Environment;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
|
||||
// Ick.
|
||||
|
||||
class Config {
|
||||
// FIXME: use local directory here, not sdcard
|
||||
public static final File mPath = Environment.getExternalStorageDirectory();
|
||||
public static final String mConfigFile = "KEGS/config.kegs";
|
||||
public static final String mROM03 = "KEGS/ROM.03";
|
||||
public static final String mROM01 = "KEGS/ROM.01";
|
||||
|
||||
static public String whichRomFile() {
|
||||
File rom = new File(mPath, mROM03);
|
||||
if (rom != null && rom.exists()) {
|
||||
return rom.getPath();
|
||||
}
|
||||
|
||||
rom = new File(mPath, mROM01);
|
||||
if (rom != null && rom.exists()) {
|
||||
return rom.getPath();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void defaultConfig(String rom_path) {
|
||||
// FIXME: copy 'default' over to 'config.kegs'
|
||||
File config = new File(mPath, mConfigFile);
|
||||
if (config == null || !config.exists()) {
|
||||
createConfig(rom_path);
|
||||
}
|
||||
}
|
||||
|
||||
public static void createConfig(String rom_path) {
|
||||
try {
|
||||
final byte[] data_bytes = String.format(
|
||||
"g_cfg_rom_path = %s\ng_limit_speed = 3\n", rom_path).getBytes();
|
||||
File config = new File(mPath, mConfigFile);
|
||||
config.createNewFile();
|
||||
FileOutputStream out = new FileOutputStream(config);
|
||||
out.write(data_bytes, 0, data_bytes.length);
|
||||
out.close();
|
||||
} catch (java.io.IOException e) {
|
||||
// kegs will fail and exit with no config
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user