From b5004bc5b55bed7699d52a7b4173e37fd76fc25a Mon Sep 17 00:00:00 2001 From: TwistedUmbrella Date: Sat, 15 Feb 2014 21:31:31 -0500 Subject: [PATCH] Eclipse pretends it is fixing an unclosed layout with excess --- core/nullDC.cpp | 7 +------ shell/android/res/layout/configure_fragment.xml | 6 ------ .../src/com/reicast/emulator/MainActivity.java | 13 +++++++------ 3 files changed, 8 insertions(+), 18 deletions(-) diff --git a/core/nullDC.cpp b/core/nullDC.cpp index c10639008..bf8380c62 100755 --- a/core/nullDC.cpp +++ b/core/nullDC.cpp @@ -142,14 +142,13 @@ int dc_init(int argc,wchar* argv[]) { return 69; } -#ifndef _ANDROID if(!cfgOpen()) { msgboxf("Unable to open config file",MBX_ICONERROR); return -4; } LoadSettings(); - +#ifndef _ANDROID os_CreateWindow(); #endif @@ -206,15 +205,12 @@ void dc_term() plugins_Term(); _vmem_release(); -#ifndef _ANDROID SaveSettings(); -#endif SaveRomFiles(GetPath("/data/")); } void LoadSettings() { -#ifndef _ANDROID settings.dynarec.Enable = cfgLoadInt("config","Dynarec.Enabled", 1)!=0; settings.dynarec.idleskip = cfgLoadInt("config","Dynarec.idleskip",1)!=0; settings.dynarec.unstable_opt = cfgLoadInt("config","Dynarec.unstable-opt",0); @@ -231,7 +227,6 @@ void LoadSettings() settings.pvr.ta_skip = cfgLoadInt("config","ta.skip",0); settings.pvr.rend = cfgLoadInt("config","pvr.rend",0); -#endif #if (HOST_OS != OS_LINUX || defined(_ANDROID) || defined(TARGET_PANDORA)) settings.aica.BufferSize=2048; diff --git a/shell/android/res/layout/configure_fragment.xml b/shell/android/res/layout/configure_fragment.xml index f50b0d014..1947ce26a 100644 --- a/shell/android/res/layout/configure_fragment.xml +++ b/shell/android/res/layout/configure_fragment.xml @@ -442,10 +442,4 @@ - - - - - - \ No newline at end of file diff --git a/shell/android/src/com/reicast/emulator/MainActivity.java b/shell/android/src/com/reicast/emulator/MainActivity.java index 5bd870c42..6ffa2d2d2 100644 --- a/shell/android/src/com/reicast/emulator/MainActivity.java +++ b/shell/android/src/com/reicast/emulator/MainActivity.java @@ -52,13 +52,9 @@ public class MainActivity extends SlidingFragmentActivity implements public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.mainuilayout_fragment); - setBehindContentView(R.layout.drawer_menu); + setBehindContentView(R.layout.drawer_menu); mPrefs = PreferenceManager.getDefaultSharedPreferences(this); - home_directory = mPrefs.getString("home_directory", home_directory); - JNIdc.config(home_directory); - - getFilesDir().mkdir(); mUEHandler = new Thread.UncaughtExceptionHandler() { public void uncaughtException(Thread t, Throwable error) { @@ -72,11 +68,16 @@ public class MainActivity extends SlidingFragmentActivity implements Thread.setDefaultUncaughtExceptionHandler(mUEHandler); String prior_error = mPrefs.getString("prior_error", null); - if (!prior_error.equals(null)) { + if (prior_error != null && !prior_error.equals(null)) { initiateReport(prior_error); mPrefs.edit().remove("prior_error").commit(); } + home_directory = mPrefs.getString("home_directory", home_directory); + JNIdc.config(home_directory); + + getFilesDir().mkdir(); + // Check that the activity is using the layout version with // the fragment_container FrameLayout if (findViewById(R.id.fragment_container) != null) {