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) {
|
||||
File newDir = getSDDir(context);
|
||||
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");
|
||||
if (hpDir.exists()) {
|
||||
File allFiles [] = hpDir.listFiles();
|
||||
|
|
|
@ -138,20 +138,11 @@ public class X48 extends Activity {
|
|||
else
|
||||
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR);*/
|
||||
bitmapSkin = mPrefs.getBoolean("bitmapskin", false);
|
||||
mainView.backBuffer = null;
|
||||
mainView.needFlip = true;
|
||||
String port1 = mPrefs.getString("port1", "0");
|
||||
managePort(1, port1);
|
||||
String port2 = mPrefs.getString("port2", "0");
|
||||
managePort(2, port2);
|
||||
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)) {
|
||||
getWindow().addFlags(LayoutParams.FLAG_FULLSCREEN);
|
||||
getWindow().clearFlags(LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
|
||||
|
@ -159,8 +150,17 @@ public class X48 extends Activity {
|
|||
getWindow().addFlags(LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
|
||||
getWindow().clearFlags(LayoutParams.FLAG_FULLSCREEN);
|
||||
}
|
||||
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() {
|
||||
if (mainView != null) {
|
||||
|
|
Loading…
Reference in a new issue