Small fixes
This commit is contained in:
parent
1a572bd955
commit
09c540c896
2 changed files with 12 additions and 12 deletions
|
@ -15,7 +15,7 @@ public class AssetUtil {
|
||||||
public static boolean copyAsset(Context context, AssetManager am, boolean force) {
|
public static boolean copyAsset(Context context, AssetManager am, boolean force) {
|
||||||
File newDir = getSDDir(context);
|
File newDir = getSDDir(context);
|
||||||
File sd = Environment.getExternalStorageDirectory();
|
File sd = Environment.getExternalStorageDirectory();
|
||||||
if (sd != null && sd.exists() && sd.isDirectory() && newDir.exists() && newDir.isDirectory()) {
|
if (sd != null && sd.exists() && sd.isDirectory() && newDir != null && newDir.exists() && newDir.isDirectory()) {
|
||||||
File hpDir = new File(sd, ".hp48");
|
File hpDir = new File(sd, ".hp48");
|
||||||
if (hpDir.exists()) {
|
if (hpDir.exists()) {
|
||||||
File allFiles [] = hpDir.listFiles();
|
File allFiles [] = hpDir.listFiles();
|
||||||
|
|
|
@ -138,20 +138,11 @@ public class X48 extends Activity {
|
||||||
else
|
else
|
||||||
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR);*/
|
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR);*/
|
||||||
bitmapSkin = mPrefs.getBoolean("bitmapskin", false);
|
bitmapSkin = mPrefs.getBoolean("bitmapskin", false);
|
||||||
mainView.backBuffer = null;
|
String port1 = mPrefs.getString("port1", "0");
|
||||||
mainView.needFlip = true;
|
|
||||||
String port1 = mPrefs.getString("port1", "0");
|
|
||||||
managePort(1, port1);
|
managePort(1, port1);
|
||||||
String port2 = mPrefs.getString("port2", "0");
|
String port2 = mPrefs.getString("port2", "0");
|
||||||
managePort(2, port2);
|
managePort(2, port2);
|
||||||
saveonExit = mPrefs.getBoolean("saveOnExit", false);
|
saveonExit = mPrefs.getBoolean("saveOnExit", false);
|
||||||
if (mainView != null) {
|
|
||||||
mainView.setHapticFeedbackEnabled(mPrefs.getBoolean("haptic", true));
|
|
||||||
mainView.setFullWidth(mPrefs.getBoolean("large_width", false));
|
|
||||||
mainView.setScaleControls(mPrefs.getBoolean("scale_buttons", false));
|
|
||||||
mainView.setKeybLite(mPrefs.getBoolean("keybLite", false));
|
|
||||||
mainView.setSound(mPrefs.getBoolean("sound", false));
|
|
||||||
}
|
|
||||||
if (mPrefs.getBoolean("fullScreen", false)) {
|
if (mPrefs.getBoolean("fullScreen", false)) {
|
||||||
getWindow().addFlags(LayoutParams.FLAG_FULLSCREEN);
|
getWindow().addFlags(LayoutParams.FLAG_FULLSCREEN);
|
||||||
getWindow().clearFlags(LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
|
getWindow().clearFlags(LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
|
||||||
|
@ -159,7 +150,16 @@ public class X48 extends Activity {
|
||||||
getWindow().addFlags(LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
|
getWindow().addFlags(LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
|
||||||
getWindow().clearFlags(LayoutParams.FLAG_FULLSCREEN);
|
getWindow().clearFlags(LayoutParams.FLAG_FULLSCREEN);
|
||||||
}
|
}
|
||||||
mainView.requestLayout();
|
if (mainView != null) {
|
||||||
|
mainView.backBuffer = null;
|
||||||
|
mainView.needFlip = true;
|
||||||
|
mainView.setHapticFeedbackEnabled(mPrefs.getBoolean("haptic", true));
|
||||||
|
mainView.setFullWidth(mPrefs.getBoolean("large_width", false));
|
||||||
|
mainView.setScaleControls(mPrefs.getBoolean("scale_buttons", false));
|
||||||
|
mainView.setKeybLite(mPrefs.getBoolean("keybLite", false));
|
||||||
|
mainView.setSound(mPrefs.getBoolean("sound", false));
|
||||||
|
mainView.requestLayout();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void changeKeybLite() {
|
public void changeKeybLite() {
|
||||||
|
|
Loading…
Reference in a new issue